pub fn accept_hdr_with_config<S: Read + Write, C: Callback>(
    stream: S,
    callback: C,
    config: Option<WebSocketConfig>
) -> Result<WebSocket<S>, HandshakeError<ServerHandshake<S, C>>>
Expand description

Accept the given Stream as a WebSocket.

Uses a configuration provided as an argument. Calling it with None will use the default one used by accept_hdr().

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.