Expand description
§MSG Sockets
This crate exposes a set of socket types that can be used to facilitate multiple communication patterns, such as:
- Request-Reply
- Publish-Subscribe
Sockets are the main entrypoint in this library and facilitate all connectivity, like binding or connecting, and sending and receiving messages over connections.
Re-exports§
pub use hooks::ConnectionHook;pub use hooks::Error as HookError;pub use hooks::HookResult;
Modules§
Structs§
- Conn
Options - Options for the connection manager.
- Exponential
Backoff - A stream that yields exponentially increasing backoff durations.
- PubMessage
- A message received from a publisher. Includes the source, topic, and payload.
- PubOptions
- PubSocket
- A publisher socket. This is thread-safe and can be cloned.
- RepOptions
- The reply socket options.
- RepSocket
- A reply socket. This socket implements
Streamand yields incomingRequests. - ReqMessage
- A message sent from a
ReqSocketto the backend task. - ReqOptions
- The request socket options.
- ReqSocket
- The request socket.
- Request
- A request received by the socket.
- Request
Id - A request Identifier.
- Send
Command - A command to send a request message and wait for a response.
- SubOptions
- SubSocket
- A subscriber socket. This socket implements
Streamand yields incomingPubMessages.
Enums§
- Connection
State - Abstraction to represent the state of a connection.
- Profile
- The performance profile to tune socket options for.
- PubError
- Errors that can occur when using a publisher socket.
- RepError
- Errors that can occur when using a reply socket.
- ReqError
- Errors that can occur when using a request socket.
- SubError
- Errors that can occur when using a subscriber socket.
Constants§
- DEFAULT_
BUFFER_ SIZE - The default buffer size for a socket.
- DEFAULT_
QUEUE_ SIZE - The default queue size for a channel.
Traits§
- Backoff
- Helper trait alias for backoff streams.
We define any stream that yields
Durations as a backoff