Struct quicr_core::Endpoint[][src]

pub struct Endpoint { /* fields omitted */ }

The main entry point to the library

This object performs no I/O whatsoever. Instead, it generates a stream of I/O operations for a backend to perform via poll_io, and consumes incoming packets and timer expirations via handle and timeout.

Methods

impl Endpoint
[src]

Get an application-facing event

Get a pending IO operation

Process an incoming UDP datagram

Initiate a connection

Handle a timer expiring

Transmit data on a stream

Returns the number of bytes written on success.

Panics

  • when applied to a stream that does not have an active outgoing channel

Indicate that no more data will be sent on a stream

All previously transmitted data will still be delivered. Incoming data on bidirectional streams is unaffected.

Panics

  • when applied to a stream that does not have an active outgoing channel

Read data from a stream

Treats a stream like a simple pipe, similar to a TCP connection. Subject to head-of-line blocking within the stream. Consider read_unordered for higher throughput.

Panics

  • when applied to a stream that does not have an active incoming channel

Read data from a stream out of order

Unlike read, this interface is not subject to head-of-line blocking within the stream, and hence can achieve higher throughput over lossy links.

Some segments may be received multiple times.

On success, returns Ok((data, offset)) where offset is the position data begins in the stream.

Panics

  • when applied to a stream that does not have an active incoming channel

Abandon transmitting data on a stream

Panics

  • when applied to a receive stream or an unopened send stream

Instruct the peer to abandon transmitting data on a stream

Panics

  • when applied to a stream that has not begin receiving data

Create a new stream

Returns None if the maximum number of streams currently permitted by the remote endpoint are already open.

Ping the remote endpoint

Useful for preventing an otherwise idle connection from timing out.

Close a connection immediately

This does not ensure delivery of outstanding data. It is the application's responsibility to call this only when all important communications have been completed.

Look up whether we're the client or server of conn.

The ConnectionId used for conn locally.

The ConnectionId used for conn by the peer.

The number of bytes of packets containing retransmittable frames that have not been acknowleded or declared lost

Number of bytes worth of non-ack-only packets that may be sent.

The name a client supplied via SNI.

None if no name was supplied or if this connection was locally-initiated.

Whether a previous session was successfully resumed by conn.

Auto Trait Implementations

impl Send for Endpoint

impl Sync for Endpoint