1 2 3 4 5 6 7 8 9 10 11
pub mod grpc;
use std::net::{SocketAddr, UdpSocket};
/// Returns a localhost address with next available port.
pub fn new_socket_addr() -> SocketAddr {
return UdpSocket::bind("127.0.0.1:0")
.unwrap()
.local_addr()
.unwrap();
}