bill lam wrote:
> I think every TCP connection should already use a different PORT which is
> assigned by OS during cloning accepted socket.

TCP connections use two ports.  A client port and a server port.  Each
TCP connection must have a unique list of: client ip, client port, server
ip, server port.  As a general rule, server ip and server port and client ip
remain fixed, so the os allocates a new client port for each new connection.
 
On the server side, the socket interface has a listening socket.  When 
"accept" is run on a new connection, this generates a new socket.
(That's probably what you were thinking of.).  But this does not change
any of the ports involved.
 
As an aside: J 6.01's sdaccept is a rank 0 verb which takes a 
listening socket number (an integer) as an argument and whose
result is two integers, each in a box: status and new socket number.
The new socket number is 0 iff an error is encountered.\
 
(Also: I don't know what the "d" in "sdaccept" stands for.
Data?  Driver?  Datagram?)
 
-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to