TCP/IP and the server<->client model in 4.2BSD

ron%BRL-TGR at tgr.UUCP ron%BRL-TGR at tgr.UUCP
Mon Dec 17 23:16:38 AEST 1984


> The question is, how can I make all the clients talk to one socket...

You can't but I don't think this is what you mean.  You want them to
tail to one port number.  Well,  you are allowed to do multiple accepts
on the same original socket.  Accept returns you new sockets rather than
just twiddling the one you give it (see accept(2)), just use the REUSEADDR
option.

The only problem that remains is how to multiplex new connections into
existing ones and you can handle this with select.  Select returns
a "ready for reading" condition when there is a connection available.

-Ron



More information about the Comp.unix.wizards mailing list