Struct sosistab::Session[][src]

pub struct Session { /* fields omitted */ }
Expand description

This struct represents a session: a single end-to-end connection between a client and a server. This can be thought of as analogous to TcpStream, except all reads and writes are datagram-based and unreliable. Session is thread-safe and can be wrapped in an Arc to be shared between threads.

Session should be used directly only if an unreliable connection is all you need. For most applications, use Multiplex, which wraps a Session and provides QUIC-like reliable streams as well as unreliable messages, all multiplexed over a single Session.

Implementations

Adds a closure to be run when the Session is dropped. This can be used to manage associated “worker” resources.

Takes a Buff to be sent and stuffs it into the session.

Waits until the next application input is decoded by the session.

“Upgrades” this session into a Multiplex

Trait Implementations

Executes the destructor for this type. Read more

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

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.