Let me try to answer that if i understood it correctly.
you can create seperate command processing threads
for each client request that you get along with some client
specific data to identify the client later when the thread is done processing. you can look at POSIX thread programming tutorials.