httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Stoddard <>
Subject Socket sharing on Win32
Date Fri, 11 Jun 1999 19:26:02 GMT
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

View raw message