pub type BoxedSocket = Socket<Box<dyn DatagramSocketSend + Send + 'static>, Box<dyn DatagramSocketRecv + Sync + 'static>>;Expand description
A type-erased variant of Socket with boxed Tx and Rx halves.
Aliased Type§
pub struct BoxedSocket {
pub send: Box<dyn DatagramSocketSend + Send>,
pub recv: Box<dyn DatagramSocketRecv + Sync>,
pub local_addr: SocketAddr,
pub peer_addr: SocketAddr,
pub capabilities: SocketCapabilities,
}Fields§
§send: Box<dyn DatagramSocketSend + Send>The sending half of the connection. This generally supports concurrent senders.
recv: Box<dyn DatagramSocketRecv + Sync>The receiving half of the connection. This is generally owned by a single caller.
local_addr: SocketAddrThe address of the local endpoint.
peer_addr: SocketAddrThe address of the remote endpoint.
capabilities: SocketCapabilitiesThe SocketCapabilities to use for this socket.
By default, Sockets are constructed with all capabilities
disabled. On Linux, you can use apply_max_capabilities() to (try
to) enable all supported capabilities.