wasmer_vnet

Trait VirtualWebSocket

Source
pub trait VirtualWebSocket:
    Debug
    + Send
    + Sync
    + 'static {
    // Required methods
    fn send(&mut self, data: Bytes) -> Result<usize>;
    fn flush(&mut self) -> Result<()>;
    fn recv(&mut self) -> Result<SocketReceive>;
}
Expand description

Interface used for sending and receiving data from a web socket

Required Methods§

Source

fn send(&mut self, data: Bytes) -> Result<usize>

Sends out a datagram or stream of bytes on this socket

Source

fn flush(&mut self) -> Result<()>

FLushes all the datagrams

Source

fn recv(&mut self) -> Result<SocketReceive>

Recv a packet from the socket

Implementors§