Return an ephemeral, available port. On unix systems, the port returned will
be in the TIME_WAIT state ensuring that the OS won’t hand out this port for
some grace period. Callers should be able to bind to this port given they
use SO_REUSEADDR.
In non-simtest, we always only have one IP address which is localhost.
Returns localhost, which is always 127.0.0.1.
Returns a new unique TCP address (Multiaddr) for localhost, by finding a new
available port on localhost.
Returns a new unique TCP address (SocketAddr) for localhost, by finding a
new available port on localhost.
Returns a new unique UDP address for localhost, by finding a new available
port.
Returns a new unique TCP address for the given host, by finding a new
available port.
Returns a new unique UDP address for the given host, by finding a new
available port.