pub trait VirtualConnectionlessSocket: VirtualSocket + Debug + Send + Sync + 'static {
    fn send_to(&mut self, data: Bytes, addr: SocketAddr) -> Result<usize>;
    fn recv_from(&mut self) -> Result<SocketReceiveFrom>;
    fn peek_from(&mut self) -> Result<SocketReceiveFrom>;
}
Expand description

Connectionless sockets are able to send and receive datagrams and stream bytes to multiple addresses at the same time (peer-to-peer)

Required Methods§

Sends out a datagram or stream of bytes on this socket to a specific address

Recv a packet from the socket

Peeks for a packet from the socket

Implementors§