Bug Hunter wrote:
> Only one program can respond to one port at one time.
>
> To be a server, you listen to a port and fork a child after
> renegotiating the new port number the child and contactor will be
> communicating on. You then go back to listening on the original port for
> a new request.
Note that accept()ing a connection *doesn't* create a new port number.
The individual connections are distinguished by the *remote* IP
address and port number.
The initial SYN-without-ACK segment causes an accept() on the original
(listening) socket to complete. Subsequent segments are associated
with a particular socket, and then used to satisfy read()s on that
socket.
--
Glynn Clements <[EMAIL PROTECTED]>