Hi All, I am working on a C# windows application. This application is mainly related to sockets.
I have a class called tcpsocket, which handles all socket level functionality of sending, receiving data, etc. A controller class calls this tcpsocket. In addition, it does all other work of logging data to a file and updating GUI. I thought it will be good to have this controller in the backgroundworker, to ensure that gui is responsive at all times. First of all, is it a good idea to do this?
As i am trying to do this, i am facing a problem regarding the progresschanged handler for the backgroundworker. I want to be able to display connection status (type: String) in a text field and data being sent/received by the application (type: Byte[]) in richTextBox. Since the controller can only send data to gui through the progressChanged event, how do i pass different types of data (String/byte[]) to the gui?