Winsock - create new thread and assign a port number
View Single Post
If you are unable to create thread you can refer to
Interprocess communication through Named pipes
. Its a multithreaded client server program but the process communication is htough pipes and it should help you to start off.