In general, for TCP servers, each client has a socket that the server sends responses back to.
In a general communications crossbar, you will pass along a "client" object to each handler of a command.
This handler will then call some "enqueue message" function on that "client" object.
The client object in turn is responsible for taking those enqueued messages and turning them into byte streams you send back out over the socket.
Thanks. That makes sense. I was thinking to send the data over the socket via callback, but I'm stuck since the service is in a different class with the protocol.
Can you please give the example code to do this? It will help me a lot.