Total computer power - Cost of maintaining sockets = Available computer power to use sockets.
If total computer power - cost of maintaining sockets is close to 0, there's nothing one can really do with those sockets. If the system has 65K sockets open is it's barely breaking a sweat, you can still do plenty of work!
Edit: As masklin referenced in reply to me[1] that jsnell pointed out, that's the ports for a single IP. So yeah, it's not all the ports, but it is all the ports for a single source IP, unless I'm missing something. You can of course assign multiple source IPs to extend this, but it is a limit to be dealt with.
1: And then deleted it, at least as of now, even though I think it was a good point.
http://pubs.opengroup.org/onlinepubs/9699919799/functions/ac...
http://pubs.opengroup.org/onlinepubs/9699919799/functions/li...
Beej's guide is a popular intro, but I'd bet any text on network programming covers sockets.
It makes much more sense, and in fact I'd been pondering that since I commented as how that could work in practice with servers that actually keep connections open but can handle a lot of requests wasn't obvious in my prior mental model.
> Beej's guide is a popular intro, but I'd bet any text on network programming covers sockets.
I highly suspect I knew this at some point, but forgot it over the past 15-20 years since it didn't have direct relevance to most of my projects since that time. :/