https://github.com/dentosal/portpicker-rs
Pick a free unused port
https://github.com/dentosal/portpicker-rs
Last synced: over 1 year ago
JSON representation
Pick a free unused port
- Host: GitHub
- URL: https://github.com/dentosal/portpicker-rs
- Owner: Dentosal
- License: unlicense
- Created: 2019-02-06T00:39:30.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-11-26T03:22:03.000Z (over 3 years ago)
- Last Synced: 2025-04-09T18:18:23.694Z (over 1 year ago)
- Language: Rust
- Size: 4.88 KB
- Stars: 39
- Watchers: 2
- Forks: 14
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Portpicker-rs - Pick a free unused port
[](https://crates.io/crates/portpicker)
[](https://docs.rs/portpicker)
Picks a free port, that is unused on both TCP and UDP.
Usage:
```rust
portpicker::pick_unused_port().expect("No ports free")
```
## License
[The Unlicense](https://unlicense.org/): free to use, modify, and distribute.