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§
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: SocketAddr
The address of the local endpoint.
peer_addr: SocketAddr
The address of the remote endpoint.
capabilities: SocketCapabilities
The SocketCapabilities
to use for this socket.
By default, Socket
s are constructed with all capabilities
disabled. On Linux, you can use apply_max_capabilities()
to (try
to) enable all supported capabilities.