pub fn random_unallocated_port() -> u16Expand description
Returns the “magic” port number that tells the operating system to choose a random unallocated port.
The OS chooses a different port each time it opens a connection or listener with this magic port number.
Bind the real listener using this port, then query its local address while keeping it open. Do not probe and release a temporary listener: another process can take the released port.