You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Bill Stoddard <re...@ibm.net> on 1999/06/11 21:26:02 UTC

Socket sharing on Win32

I've managed to get socket sharing working on NT using winsock 2 calls.
Still have a long ways to go to make it useful...

Here is how it works:
Open a socket in the parent, then issue setsockopt, bind and listen.
Then I create the child process, then call WASDuplicateSocket(socket,
&protocol_info, child_process_id), which initializes a WSAPROTOCOL_INFO
structure I provide on the call. I pass this structure to the child,
which then issues a WSASocket() on the protocol info structure which
returns a socket I can use to select and accept in the child. 

I should be able to have multiple processes consuming from the listen
queue at once, which is good for graceful restarts. More later...

-- 
Bill Stoddard
stoddard@raleigh.ibm.com