Im writing a http 1.1 compliant web server and Im trying to think how to create a new socket for each connection because im suppose to close the socket after each request. Just some basic questions after reading the rfc :) thanks guys.
You get a NEW socket from accept for each incoming connection, so you don't actually create them. And when you've closed one, destroy it and forget it (otherwise winsock will run out of handles.... eventually.)
Well that's what I was wondering if I close the handle to the socket all associated connections will die so how do I know which one to close. I'm almost thinking like what I used to do in high languages was index sockets. Would I need to do something like that?