Crates.io | openport |
lib.rs | openport |
version | 0.1.1 |
source | src |
created_at | 2024-09-24 14:49:56.930234 |
updated_at | 2024-09-24 15:50:04.187308 |
description | Find a free unused port |
homepage | |
repository | https://github.com/MoosicBox/MoosicBoxServer |
max_upload_size | |
id | 1385306 |
size | 23,260 |
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");
openport is provided under the MPL v2.0 license. Please refer to the LICENSE file for more details.