Get an available TCP/UDP port
For more examples, check src/tests.rs
.
```rs // Return an available port, from the supplied range, available on localhost.
use getport::tcp::TcpPort; use getport::{Ops, Range}; use get_port::udp::UdpPort;
let tcpport = TcpPort::inrange("127.0.0.1", Range {min: 6000, max: 7000 }).unwrap(); let udpport = UdpPort::inrange("127.0.0.1", Range {min: 8000, max: 9000 }).unwrap(); ```