Struct distant_core::Transport [−][src]
pub struct Transport<T, U>(_)
where
T: DataStream,
U: Codec;
Expand description
Represents a transport of data across the network
Implementations
pub fn pair(
buffer: usize
) -> (Transport<InmemoryStream, PlainCodec>, Transport<InmemoryStream, PlainCodec>)
pub fn pair(
buffer: usize
) -> (Transport<InmemoryStream, PlainCodec>, Transport<InmemoryStream, PlainCodec>)
Produces a pair of inmemory transports that are connected to each other using a standard codec
Sets the buffer for message passing for each underlying stream to the given buffer size
Establishes a connection to one of the specified addresses and uses the provided codec for transportation
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, XChaCha20Poly1305Codec>
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