Struct quic_socket::QuicListener[][src]

pub struct QuicListener {
    pub socket: QuicSocket,
    pub connection: Pin<Box<Connection>>,
}

Fields

socket: QuicSocketconnection: Pin<Box<Connection>>

Implementations

Uses the underlying quiche Connection send method in order to write a singular QUIC packet to send to the peer.

Examples
loop {
    let read = match listener.send_once(&mut out).await {
        Ok(v) => v,
        Err(std::io::Other) => {
            // done writing
            break;
        }
        Err(_) => {
            // handle error
            break;
        }
    }
}

Uses the underlying quiche Connection recv method in order to process QUIC packets received from the peer.

Examples:
loop {
    let read = match listener.recv(&mut buf).unwrap().await {
        Ok(v) => v,
        Err(e) => {
            // handle error
            break;
        }
    };
}

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.