Expand description
In-process dartboard server + LocalClient.
The server owns the canonical Canvas, assigns globally monotonic
sequence numbers, and fans out ServerMsgs to connected clients. Each
LocalClient is a handle scoped to one session. Other transports can
integrate by implementing ServerSink and using
ServerHandle::register_transport.
Re-exports§
pub use store::CanvasStore;pub use store::InMemStore;
Modules§
Structs§
- Hello
- Introductory payload a client sends before any ops. Name is echoed back to
peers; color is a transport-level hint and may be replaced by the server’s
configured
ColorSelectionMode. - Local
Client - In-process client handle. Sends ops directly into the server under the shared state lock; receives events over a std mpsc channel.
- Server
Handle - A handle to the running server. Cloneable; every clone references the same canonical canvas and client registry.
Enums§
- Color
Selection Mode - Policy for assigning per-user colors on connect.
- Connect
Outcome - Outcome of a connect attempt. Rejected connections leave no registered state on the server.
Constants§
- MAX_
PLAYERS - Max concurrent players on a single shared canvas. Equal to the palette length so the seat cap preserves unique per-user colors.
Traits§
- Server
Sink - Minimal transport-facing sink used by the server to fan out
ServerMsgs.