You can do this in a few different ways. I don't know windows, so some of the following ways might not work, or might be different.
You can listen for a connection and accept it, then fork out the processess. I dont think windows does this, but it can be a resournce hog.
So, you can thread out the processess. This is a lot faster and kinder on resources.
With a threaded process you can access all global variables, which makes it easier to communicate between connections.
Again, I dont know anything about windows programming so I would recommend reading whatever socket API windows uses. If I remember correctly its the winsock API.