Expand description
§openport
Find a free unused port
§Features
rand: Addpick_random_unused_portpub fn that allows finding a random port within the range15000..25000
§Usage
The following steps describe a basic usage of openport:
- Call
openport::pick_unused_portand pass a range of ports you want to find a free port in - Enable the
randfeature and callopenport::pick_random_unused_portto find a random open port within the range15000..16000 - Call
openport::is_freeto check if a specific port is open on both TCP and UDP - Call
openport::is_free_tcpto check if a specific port is open on TCP - Call
openport::is_free_udpto check if a specific port is open on UDP
Functions§
- is_free
- Check if a port is free on both TCP and UDP
- is_
free_ tcp - Check if a port is free on TCP
- is_
free_ udp - Check if a port is free on UDP
- pick_
unused_ port - Picks an available port that is available on both TCP and UDP within a range