Trait dhcp_client_core::deps::UdpSocketProvider
source · 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§
sourcetype Sock: Socket<SocketAddr>
type Sock: Socket<SocketAddr>
The type of sockets provided by this UdpSocketProvider
.
Required Methods§
sourceasync fn bind_new_udp_socket(
&self,
bound_addr: SocketAddr
) -> Result<Self::Sock, SocketError>
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.