5 ms·
The 65k limit is because of the port limit. WebSocket is using the “trick” of opening a port without answering before the server have any news to give, this way
by punnerud 4y ago
The 65k limit is because of the port limit. WebSocket is using the “trick” of opening a port without answering before the server have any news to give, this way the messages are more push-like.
How can this be fixed without more IP-addresses?
- supermatt 4y agoWhat port limit? The server is listening on a single port.
- forkerenok 4y agoEDIT: I was wrong, see child comments and the sibling comment from jacuqesm. --- Yes, it is listening on a single port, but accepted connections bind to a separate socket. Here's how it works under the hood: > The accept() call creates a new socket descriptor with the same properties as socket and returns it to the caller. [...] The new socket descriptor cannot be used to accept new connections. The original socket, socket, remains available to accept more connection requests. Pulled this from random IBM zOS docs, but it's in compliance with the Unix standard: https://www.ibm.com/docs/en/zos/2.4.0?topic=functions-accept-accept-new-connection-socket https://www.ibm.com/docs/en/zos/2.4.0?topic=functions-accept...
- tgma 4y agoSeparate socket; does not mean a separate [server] port.
- forkerenok 4y agoYes, you're right! Huge gap in understanding on my side.
- DougN7 4y agoI don’t understand - how is it not a server port? When a datagram arrives from the network it’s addressed to the server’s IP and a port (and from a client IP and port). How is the data delivered to the correct socket if not through the 5-tuple (which includes server port) to socket mapping?
- tgma 4y agoIt can be distinguished via its client IP and port.
- jacquesm 4y agoIP Backlog in answering connections all re-use the same port though. Simply put: if you had a webserver answering on port 443 then the backlog will be a number of prepared slots that all eventually will have 443 in them as the local port for the connection. You can have as many of those as you want. But only one process gets to listen to port 443 on any given IP.
- deleted 4y ago[deleted]