[plt-scheme] Multiple network sockets on the same port?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed Jul 19 09:04:44 EDT 2006

At Wed, 19 Jul 2006 11:35:00 +1000, Jepri wrote:
> The error:
> ..\actinic\actinic.ss::15268: tcp-connect: connection to 10.0.5.5, port 
> 80 failed (at step 6: Only one usage of each socket address 
> (protocol/network address/port) is normally permitted.; errno=10048)
> 
> I am writing web crawlers and file transfer agents using lots of 
> threads.  This error occurs when I try to shift a file using multiple 
> threads (to reduce latency).
> 
> I'm not quite sure what that error means.  If there has been a collision 
> of source ports, then something has gone very wrong in network layer.  
> But I think it means that I can't open two connections to the same port 
> on the same server.
> 
> If the latter, would it be possible to have that restriction lifted or 
> is it too fundamental to change?  It's very common to open multiple 
> connections to a server when doing web work.

Yes, you certainly should be able to open multiple connections to the
same remote port.

Are you supplying the 3rd and 4th (optional) arguments to
`tcp-connect', which determine the local interface and port for the
connection? If so, that could be the problem, since you can use each
local port only once. But supplying the 3rd and 4th arguments is
unusual.

Matthew



Posted on the users mailing list.