Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA
Path: utzoo!watmath!clyde!burl!ulysses!allegra!bellcore!decvax!wivax!ucadmus!harvard!seismo!brl-tgr!tgr!ron@BRL-TGR
From: ron%BRL-TGR@tgr.UUCP
Newsgroups: net.unix-wizards
Subject: Re:  TCP/IP and the server<->client model in 4.2BSD
Message-ID: <6603@brl-tgr.ARPA>
Date: Mon, 17-Dec-84 08:16:38 EST
Article-I.D.: brl-tgr.6603
Posted: Mon Dec 17 08:16:38 1984
Date-Received: Thu, 20-Dec-84 01:55:19 EST
Sender: news@brl-tgr.ARPA
Organization: Ballistic Research Lab
Lines: 14


> 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