Skip to main content

Crate protosocket

Crate protosocket 

Source
Expand description

Low-level connection types for protosocket.

This is the core of protosocket, providing the Connection type. This type is used to create both client and server channels. Normally you will use Connection via the protosocket-prost or protosocket-server crates.

Structs§

Connection
A bidirectional, message-oriented AsyncRead/AsyncWrite stream wrapper.
OwnedBuffer
A basic Buf wrapper for a byte array. This works for simple apis, but if you have latency, memory, or cpu constraints, you should be using PooledEncoder or another more sophisticated memory reuse mechanism.
PooledEncoder
An encoder that wraps a serializer, offering it raw byte vectors. These vectors are reset and reused to minimize allocation cost.
Reusable
A reusable wrapper for a serializer buffer, which can be treated as a bytes::Buf.
StreamWithAddress
A stream wrapper for streams with addresses
TcpSocketListener
A socket listener for TCP
TlsSocketListener
A socket listener that accepts TLS connections

Enums§

DeserializeError
Errors that can occur when deserializing a message.
ReactorStatus
What the connection should do after processing a batch of inbound messages.
SocketResult
A stream or a disconnect from a SocketListener.

Traits§

Codec
A codec combines an encoder and decoder for a message type.
Decoder
A decoder takes inbound bytes and produces messages.
Encoder
An encoder takes messages and produces outbound bytes.
MessageReactor
A message reactor is a stateful object that processes inbound messages. You receive &mut self, and you receive your messages by value.
Serialize
Raw serializer for a buffer pool
SocketListener
A pollable listener that produces socket connections