Skip to main content

websocket_pair

Function websocket_pair 

Source
pub fn websocket_pair() -> Result<WebSocketPair, CfError>
Expand description

Create a raw [WebSocketPair] without building the upgrade response.

Use this if you need more control over the response (e.g., custom headers). For most cases, prefer websocket_upgrade().

ยงErrors

Returns CfError if WebSocketPair::new() fails.