News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Creating more than one socket...

Started by travism, June 02, 2009, 03:29:49 AM

Previous topic - Next topic

travism

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.

Tedd

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.)
No snowflake in an avalanche feels responsible.

travism

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?