pub async fn forward_subscription(
socket: WebSocket,
subscription: EventSubscription,
gate: NamespaceEventGate,
outbound_buffer_bound: usize,
) -> Result<(), ServerError>Expand description
Forward a previously authorized engine subscription to a WebSocket.
The reader task is aborted on every exit path — success, terminal error frame, and frame-encoding failure alike — so it can never linger holding a broadcast receiver after the socket loop ends.
§Errors
Returns ServerError when the stream ends with a terminal error frame
(lag, gate failure, encoding failure) or a wire frame cannot be encoded.