abcfantasy
Programmer
I have a class (named Server) to handle multiple client connections, receive and send messages and so on.
What I wish to do is the following:
I have a method in that class which is called whenever a message is received from a client. In this method, I want some way to communicate to the Form class, and write that message on a textbox.
Just for the information, from my Form class, I create a Server object, then just call a method AcceptConnections which will create the listening port, accept client connections and start to receive messages.
I'm wondering if this is simple as it sounds, and maybe I'm thinking in a too 'complex' way. I tried using delegates but had problems with Cross threading. And I can't directly access the textbox, since I do not have a reference to the instance of the Form.
Any help is greatly appreciated
Thank you in advance
Andrew
ABC -
What I wish to do is the following:
I have a method in that class which is called whenever a message is received from a client. In this method, I want some way to communicate to the Form class, and write that message on a textbox.
Just for the information, from my Form class, I create a Server object, then just call a method AcceptConnections which will create the listening port, accept client connections and start to receive messages.
I'm wondering if this is simple as it sounds, and maybe I'm thinking in a too 'complex' way. I tried using delegates but had problems with Cross threading. And I can't directly access the textbox, since I do not have a reference to the instance of the Form.
Any help is greatly appreciated
Thank you in advance
Andrew
ABC -