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]
impl<S> Endpoint<S> where
S: Session, [src]pub fn new(
config: Arc<EndpointConfig<S>>,
server_config: Option<Arc<ServerConfig<S>>>
) -> Self[src]
config: Arc<EndpointConfig<S>>,
server_config: Option<Arc<ServerConfig<S>>>
) -> Self
Create a new endpoint
Returns Err if the configuration is invalid.
#[must_use]pub fn poll_transmit(&mut self) -> Option<Transmit>[src]
#[must_use]
pub fn poll_transmit(&mut self) -> Option<Transmit>Get the next packet to transmit
pub fn handle_event(
&mut self,
ch: ConnectionHandle,
event: EndpointEvent
) -> Option<ConnectionEvent>[src]
&mut self,
ch: ConnectionHandle,
event: EndpointEvent
) -> Option<ConnectionEvent>
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]
&mut self,
now: Instant,
remote: SocketAddr,
local_ip: Option<IpAddr>,
ecn: Option<EcnCodepoint>,
data: BytesMut
) -> Option<(ConnectionHandle, DatagramEvent<S>)>
Process an incoming UDP datagram
pub fn connect(
&mut self,
config: ClientConfig<S>,
remote: SocketAddr,
server_name: &str
) -> Result<(ConnectionHandle, Connection<S>), ConnectError>[src]
&mut self,
config: ClientConfig<S>,
remote: SocketAddr,
server_name: &str
) -> Result<(ConnectionHandle, Connection<S>), ConnectError>
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
Auto Trait Implementations
impl<S> !RefUnwindSafe for Endpoint<S>
impl<S> !RefUnwindSafe for Endpoint<S>impl<S> !UnwindSafe for Endpoint<S>
impl<S> !UnwindSafe for Endpoint<S>Blanket Implementations
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,