pub trait UdpSocketProvider {
    type Sock: Socket<SocketAddr>;

    // Required method
    async fn bind_new_udp_socket(
        &self,
        bound_addr: SocketAddr
    ) -> Result<Self::Sock, SocketError>;
}
Expand description

Provides access to UDP sockets.

Required Associated Types§

source

type Sock: Socket<SocketAddr>

The type of sockets provided by this UdpSocketProvider.

Required Methods§

source

async fn bind_new_udp_socket( &self, bound_addr: SocketAddr ) -> Result<Self::Sock, SocketError>

Gets a UDP socket bound to the given address. The UDP socket should be allowed to send broadcast packets.

Object Safety§

This trait is not object safe.

Implementors§