Subject: Re: TCPIP, sharing sockets via $QIO (programming, long and detailed) Date: Mon, 18 Mar 2002 09:59:30 +1030 From: Mark Daniel Organization: Opinions my own, and on loan from others. Newsgroups: comp.os.vms Mark Daniel wrote: > Compaq TCP/IP Services for OpenVMS Alpha Version V5.1-15 > on a DEC 3000 Model 300 running OpenVMS V7.3 > > I have an application where I would like two (and more) detached > processes to share a socket, in particular both to listen and accept on > that socket and share the incoming connections. Note: this is *not* > parent-child, it's peer. Both processes are independent. > > The TCP/IP socket sharing bit is not particularly well documented and > more implies that it can be done rather than stating it. Anyway, by > experiment I established that it was possible and the incoming requests > are shared in a round-robin fashion. Works fine - except under extreme > load, when eventually the backlog queue length grows and connections > stop being accepted (established using a TCPIP> SHOW DEVICE bgnnnn > /CONTINUOUS). 8< snip 8< > The C code is non-trivial so fully posting it here (or to CSC for that > matter) is not really an option. I hope this precis is enough. 8< snip 8< I have placed a short(ish), self-contained piece of code that reliably reproduces this issue, at least for the environments listed in the code description. If anyone wants to play with this and report the results back to me (or this forum) I'll add them, attributed, to said description. http://wasd.vsm.com.au/wasd/mgd.c