Closes the connection permanently, clears the queue, and cancels any pending reconnect.
Opens the connection, resolving when the socket is open and rejecting on failure/timeout.
Flushes any queued messages to the open socket. Called after (re)join to drain the offline buffer.
Removes a previously registered listener for event.
The event name the listener was registered for.
This emitter, for chaining.
Registers a listener that is invoked every time event is emitted.
The event name to listen for.
Callback invoked with the event's argument tuple.
This emitter, for chaining.
Registers a listener that is invoked at most once: it is removed automatically before
being called the first time event is emitted.
The event name to listen for.
Callback invoked with the event's argument tuple on the next emission.
This emitter, for chaining.
Remove a pending one-time listener by passing the same function reference to off.
Sends a message immediately if connected, otherwise buffers it in the send queue.
The signaling channel abstraction between RTCForgeClient and the server. WebSocketTransport is the default implementation; provide an alternative through RTCForgeClientOptions.transportFactory to swap in a different socket or a test double.
Remarks
A transport owns connection lifecycle, offline message queuing, and reconnection. It emits TransportEvents and only surfaces messages that pass schema validation.