Expand description
ChatServer and ChatListener traits for server-side implementations,
plus the concrete protocol-agnostic Server.
A server is a named container of listeners. It owns no address, port, or protocol of its own — those belong to the listeners. Different listeners may speak entirely different protocols (e.g. IRC on one port, WebSocket on another) while still feeding messages into the same server event loop.
A listener is a single (protocol, address, port) combination. It handles
all wire-protocol details: accepting connections, parsing inbound data into
Messages, calling the message handler, and formatting replies back in the
appropriate wire format.
Structs§
- Server
- The standard, protocol-agnostic
ChatServerimplementation.
Traits§
- Chat
Listener - A single network endpoint: one (protocol, address, port) combination.
- Chat
Server - A protocol-agnostic chat server.
Functions§
- into_
handler - Wrap a generic async closure into a
MessageHandler.
Type Aliases§
- Message
Handler - A type-erased, cloneable, async message handler.