bind_udp_with_address

Function bind_udp_with_address 

pub async fn bind_udp_with_address<A>(
    addr: A,
) -> Result<UdpSocket, Box<dyn Error + Send + Sync>>
Available on crate feature udp only.
Expand description

Creates a new UdpSocket, which will be bound to the specified address.

The returned socket is ready for accepting connections and connecting to others.

Binding with a port number of 0 will request that the OS assigns a port to this listener. The port allocated can be queried via the local_addr method.