Functions§
- get_
available_ port - 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.
- get_
new_ ip - In non-simtest, we always only have one IP address which is localhost.
- localhost_
for_ testing - Returns localhost, which is always 127.0.0.1.
- new_
deterministic_ tcp_ address_ for_ testing - new_
deterministic_ udp_ address_ for_ testing - new_
local_ tcp_ address_ for_ testing - Returns a new unique TCP address (Multiaddr) for localhost, by finding a new available port on localhost.
- new_
local_ tcp_ socket_ for_ testing - Returns a new unique TCP address (SocketAddr) for localhost, by finding a new available port on localhost.
- new_
local_ udp_ address_ for_ testing - Returns a new unique UDP address for localhost, by finding a new available port.
- new_
tcp_ address_ for_ testing - Returns a new unique TCP address for the given host, by finding a new available port.
- new_
udp_ address_ for_ testing - Returns a new unique UDP address for the given host, by finding a new available port.