wasmer_vnet

Trait VirtualConnectionlessSocket

Source
pub trait VirtualConnectionlessSocket:
    VirtualSocket
    + Debug
    + Send
    + Sync
    + 'static {
    // Required methods
    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§

Source

fn send_to(&mut self, data: Bytes, addr: SocketAddr) -> Result<usize>

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

Source

fn recv_from(&mut self) -> Result<SocketReceiveFrom>

Recv a packet from the socket

Source

fn peek_from(&mut self) -> Result<SocketReceiveFrom>

Peeks for a packet from the socket

Implementors§