Crate unique_port

Source

Macros§

generate_unique_start_port
Generates a unique offset, from which get_unique_free_port will start to find free ports incrementally. The value is higher than 1000, and less than u16::MAX - 1000. It uses the full module path and the enclosed function name, so it’s always the same for the scope of the same function.

Functions§

get_unique_free_port
Returns a free unique local port. Every time a call to this function during one run should return a unique address.
set_port_index
Sets the port number, from which get_unique_free_port() will start generating free ports incrementally.