In the main program you monitor a port constantly (I chose Synapse so I used the TTCPBlockSocket for that).
As soon as you receive a new request you accept it by instantiating a client specific socket (again, in my case I used something like 'ClientSocket := socket.accept;' ClientSocket is a TSocket object).
This client specific socket is going to be one of the attributes of the new thread you need to create: dynamically craete the new thread, give it this socket as one of its attributes and in the thread's Execute method, start processing all request that come in via the client's socket.
While this dynamically created thread is handling the client requests, your main program continues to monitor the port for new incoming requests.
Finally, if you wish your program to be respsonsive all the time, you could also put the code that monitors the port for incoming connections in a separate thread.
The sky is the limit...
