Struct quinn_proto::generic::Endpoint[][src]

pub struct Endpoint<S> where
    S: Session
{ /* fields omitted */ }

The main entry point to the library

This object performs no I/O whatsoever. Instead, it generates a stream of packets to send via poll_transmit, and consumes incoming packets and connection-generated events via handle and handle_event.

Implementations

impl<S> Endpoint<S> where
    S: Session
[src]

pub fn new(
    config: Arc<EndpointConfig<S>>,
    server_config: Option<Arc<ServerConfig<S>>>
) -> Self
[src]

Create a new endpoint

Returns Err if the configuration is invalid.

#[must_use]
pub fn poll_transmit(&mut self) -> Option<Transmit>
[src]

Get the next packet to transmit

pub fn handle_event(
    &mut self,
    ch: ConnectionHandle,
    event: EndpointEvent
) -> Option<ConnectionEvent>
[src]

Process EndpointEvents emitted from related Connections

In turn, processing this event may return a ConnectionEvent for the same Connection.

pub fn handle(
    &mut self,
    now: Instant,
    remote: SocketAddr,
    local_ip: Option<IpAddr>,
    ecn: Option<EcnCodepoint>,
    data: BytesMut
) -> Option<(ConnectionHandle, DatagramEvent<S>)>
[src]

Process an incoming UDP datagram

pub fn connect(
    &mut self,
    config: ClientConfig<S>,
    remote: SocketAddr,
    server_name: &str
) -> Result<(ConnectionHandle, Connection<S>), ConnectError>
[src]

Initiate a connection

pub fn reject_new_connections(&mut self)[src]

Unconditionally reject future incoming connections

pub fn config(&self) -> &EndpointConfig<S>[src]

Access the configuration used by this endpoint

Trait Implementations

impl<S> Debug for Endpoint<S> where
    S: Session
[src]

Auto Trait Implementations

impl<S> !RefUnwindSafe for Endpoint<S>

impl<S> Send for Endpoint<S>

impl<S> !Sync for Endpoint<S>

impl<S> Unpin for Endpoint<S>

impl<S> !UnwindSafe for Endpoint<S>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,