pub fn record_socket_write(
backlog: usize,
elapsed: Duration,
bytes: Option<usize>,
)Expand description
The websocket write itself, and how many messages were already waiting when this one was taken off the queue.
Everything else between the engine and the player is now measured; this was the last gap. The outbound channel is unbounded and the writer awaits the sink, so a client that stops draining applies backpressure and every later message queues behind it. That is invisible in the handling metric, which stops at the hand-off, and it grows with seat count because a four-seat room enqueues five envelopes per decision where a two-seat room enqueues three.