Why does your OS only allow you to bind 65535 ports? The port is stored as two bytes, 16 bits, 2**16 = 65536. 0 Is reserved, so you get 65535 ports!
@atax1a At least with IPv6 you might be able to arrange for child addresses with more ports. 😅
@mauve Not many people know that the 16 bit value is signed, so you connect to negative ports. It's the shadow internet, for instance port -80 is the evil web, and port -25 is used to send spam emails.
@mauve yep! this is a hard limit of the packet format and expanding it would be worse than expanding the address size itself (ipv6 still keeps a 16-bit port number)