The queued message type.
The queued message type.
Maximum number of messages the queue may hold before SendQueue.enqueue starts returning false.
Optional logger; a failed send during SendQueue.drain is reported here instead of propagating.
Discards all buffered messages without sending them.
Flushes the queue in FIFO order, invoking send for each message. The
batch is spliced out up front (a single O(n) pass, no O(n²) shifting). If
send throws, draining stops and the failed message plus every
not-yet-sent message are re-queued ahead of any newly enqueued items so
FIFO order is preserved; the exception is logged rather than propagated.
Callback that transmits a single message.
Appends a message unless the queue is at capacity.
The message to buffer.
true if buffered, false if the queue was full.
Bounded FIFO MessageQueue used by WebSocketTransport to hold outbound messages while the socket is closed or reconnecting. Once capacity is reached, further SendQueue.enqueue calls are rejected rather than evicting existing messages, so the transport can surface a "queue full" error.