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]

[src]

[src]

Get an application-facing event

[src]

Get a pending IO operation

[src]

Process an incoming UDP datagram

[src]

Initiate a connection

[src]

Handle a timer expiring

[src]

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

[src]

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

[src]

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

[src]

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

[src]

Abandon transmitting data on a stream

Panics

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

[src]

Instruct the peer to abandon transmitting data on a stream

Panics

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

[src]

Create a new stream

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

[src]

Ping the remote endpoint

Useful for preventing an otherwise idle connection from timing out.

[src]

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.

[src]

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

[src]

The ConnectionId used for conn locally.

[src]

The ConnectionId used for conn by the peer.

[src]

[src]

[src]

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

[src]

Trait Implementations

Auto Trait Implementations

impl Send for Endpoint

impl Sync for Endpoint