>>151379First of all thanks for your answer.
That's kind of what i thought.
I found this:
http://stackoverflow.com/questions/3329641/how-do-multiple-clients-connect-simultaneously-to-one-port-say-80-on-a-serverBasically this is what happens:
1.) On a server, a process is listening on a port. Once it gets a connection, it hands it off to another thread. The communication never hogs the listening port.
2.) Connections are uniquely identified by the OS by the following 5-tuple: (local-IP, local-port, remote-IP, remote-port, protocol). If any element in the tuple is different, then this is a completely independent connection.
3.) When a client connects to a server, it picks a random, unused high-order source port. This way, a single client can have up to ~64k connections to the server for the same destination port.
So a client simply uses another random port instead of 80 and that's why we can have 65536 simultanisously? Is that correct?
But what is the limitation of UDP?
On SO one guy said:
For a stateless protocol (ie UDP), there is no problem because "connections" don't exist - multiple people can send packets to the same port, and their packets will arrive in whatever sequence. Nobody is ever in the "connected" state.
Then another dude says:
There is no relation to state-fullness or statelessness to answer this question