Question about Asynch Sockets Callbacks
I am setting up a TCP Listener service that will accept mutliple connections and create a socket for each connection. I want to use a common send callback for the Async BeginSend, and a common callback for the Async BeginReceive. I will instantiate a state object for each socket that will be passed as an argument to the async functions. Since the state contains the information about which socket is being processed, a single callback function for each of the async functions makes sense; I just want to make sure that this is the best way to design this functionality, as opposed to creating a thread to manage each sockets communications.
Is this the right way to do this?
Thanks for all replies!
Stephen H. Stubbs
Software Systems Engineer
Smith Engineering, LLC