accept_header

Function accept_header 

Source
pub fn accept_header<S: Read + Write, C: Callback>(
    stream: S,
    callback: C,
) -> Result<WebSocket<S>, HandshakeError<ServerHandshake<S, C>>>
Expand description

Accept the given Stream as a WebSocket.

This function does the same as accept() but accepts an extra callback for header processing. The callback receives headers of the incoming requests and is able to add extra headers to the reply.