Module handle

Module handle 

Source
Expand description

ClientHandle — one linked client as tracked by the reflector.

The pool stores protocol-erased [ServerSessionCore] instances keyed by SocketAddr. A phantom P: Protocol marker threads the protocol type through the API so callers can get DExtra/DPlus/DCS typed accessors without the storage itself being generic.

This module also defines TokenBucket, the per-client rate limiter used to cap the number of fan-out voice frames a single client can consume per second. It lives here (rather than in a dedicated module) to keep the per-handle state co-located.

Structs§

ClientHandle
One entry in super::ClientPool.
TokenBucket
Rate limiter that caps the number of tokens consumed per second.

Constants§

DEFAULT_TX_BUDGET_MAX_TOKENS
Default burst capacity for per-client TX rate limiting, in frames.
DEFAULT_TX_BUDGET_REFILL_PER_SEC
Default steady-state refill rate for per-client TX rate limiting, in frames per second.