pub async fn accept_hdr_async<S, T, C>(
stream: T,
callback: C,
) -> Result<WebSocketStream<S>, Error>where
S: Splittable + 'static,
T: IntoMaybeTlsStream<S>,
C: Callback + Unpin,
<S as Splittable>::ReadHalf: AsyncRead + Unpin,
<S as Splittable>::WriteHalf: AsyncWrite + Unpin,Available on crate feature
ws only.Expand description
Accepts a new WebSocket connection with the provided stream.
This function does the same as accept_async() 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.