Struct distant_core::Transport[][src]

pub struct Transport<T> where
    T: DataStream
{ /* fields omitted */ }
Expand description

Represents a transport of data across the network

Implementations

Produces a pair of inmemory transports that are connected to each other with matching auth and encryption keys

Sets the buffer for message passing for each underlying stream to the given buffer size

Establishes a connection using the provided session and performs a handshake to establish means of encryption, returning a transport ready to communicate with the other side

Takes an optional authentication key

Returns the address of the peer the transport is connected to

Establishes a connection using the provided session and performs a handshake to establish means of encryption, returning a transport ready to communicate with the other side

Takes an optional authentication key

Returns the address of the peer the transport is connected to

Creates a new instance of the transport, wrapping the stream in a Framed<T, DistantCodec>

Takes a pre-existing connection and performs a handshake to build out the encryption key with the remote system, returning a transport ready to communicate with the other side

An optional authentication key can be provided that will be used alongside encryption when communicating across the wire

Sends some data across the wire, waiting for it to completely send

Receives some data from out on the wire, waiting until it’s available, returning none if the transport is now closed

Returns a textual description of the transport’s underlying connection

Splits transport into read and write halves

Trait Implementations

Formats the value using the given formatter. 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.

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.