Skip to main content

accept

Function accept 

Source
pub async fn accept(
    stream: TcpStream,
    expected_token: &str,
) -> Result<WebSocketStream<TcpStream>>
Expand description

Accept a WebSocket connection on stream, requiring the x-claude-code-ide-authorization header to match expected_token (constant-time). Rejects with HTTP 401 otherwise — the returned future resolves to an error and the connection is dropped.