openport 0.1.1

Find a free unused port
Documentation
  • Coverage
  • 83.33%
    5 out of 6 items documented1 out of 4 items with examples
  • Size
  • Source code size: 26.03 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.2 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • MoosicBox/MoosicBox
    35 2 106
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • BSteffaniak

openport - find a free unused port

Crates.io Documentation

Finds a free port, that is unused on both TCP and UDP.

Usage:

use openport::pick_unused_port;
let port: u16 = pick_unused_port(15000..16000).expect("No ports free");

License

openport is provided under the MPL v2.0 license. Please refer to the LICENSE file for more details.