[−][src]Function async_tungstenite::tokio::accept_hdr_async
pub async fn accept_hdr_async<S, C>(
stream: S,
callback: C
) -> Result<WebSocketStream<TokioAdapter<S>>, Error> where
S: AsyncRead + AsyncWrite + Unpin,
C: Callback + Unpin,
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.