On Sun, Feb 15, 2015 at 4:09 PM, Kevin Malachowski wrote:
In most (maybe all?) tcp implementations the server does indeed assign a new port to the connection when it Accepts it. This way other clients may continue to connect using the same port, the functionality you want. Try printing out the local address information from the connection returned from Accept.
In most (maybe all?) tcp implementations the server does indeed assign a new port to the connection when it Accepts it. This way other clients may continue to connect using the same port, the functionality you want. Try printing out the local address information from the connection returned from Accept.
connection is determined by four numbers: local IP address, local port
number, remote IP address, remote port number. So you can many TCP
connections to the same local port on your system, as long as they
each have a different remote IP address and/or different remote port.
Ian
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.