I need to add a TCP server to an existing code. The TCP server is started as a thread and it should raise an event to the parent as soon as a message is received in the socket from a client. The parent should stop the TCP thread, treat the message and restart the TCP server with a back message to be sent via the socket to the client.
There are several issues here; I know how to create the TCP server and to create a thread. I would like to have some guidance on how to put all together so that to implement a custom event when the TCP input buffer is full.
Thanks