By definition, a TCP port is an unsigned short, and so it can not
exceed 65535. Additionally, ports in the range 1024 to 49151 are
(possibly) registered by ICANN for specific uses.
random_port()
will simply generate a valid, non-registered
tcp port. random_unused_port()
will generate a port
that is available for socket connections.
random_open_port()
finds a random port not already bound
to an endpoint.