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.
- Owned
Buffer - 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.
- Pooled
Encoder - 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.
- Stream
With Address - A stream wrapper for streams with addresses
- TcpSocket
Listener - A socket listener for TCP
- TlsSocket
Listener - A socket listener that accepts TLS connections
Enums§
- Deserialize
Error - Errors that can occur when deserializing a message.
- Reactor
Status - What the connection should do after processing a batch of inbound messages.
- Socket
Result - 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.
- Message
Reactor - 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
- Socket
Listener - A pollable listener that produces socket connections