Skip to main content

read_subscription_request

Function read_subscription_request 

Source
pub async fn read_subscription_request(
    socket: &mut WebSocket,
) -> Result<SubscriptionRequest, ServerError>
Expand description

Read the first subscription frame from an accepted WebSocket.

Ping/pong frames are ignored while waiting; a close, socket error, or malformed frame is a decode failure the caller reports as one terminal error frame.

ยงErrors

Returns ServerError::Wire (invalid_input) when the socket closes before a request arrives or the request cannot be decoded.