http_finalize_accept

Function http_finalize_accept 

Source
pub async fn http_finalize_accept<T>(
    stream: &mut T,
    reply: &HttpReply,
) -> Result<()>
where T: AsyncWrite + Unpin,
Available on crate feature http only.
Expand description

Completes an HTTP proxy connection by sending a response to the client.

After processing a client’s HTTP CONNECT request with http_accept, this function sends the appropriate HTTP response to indicate success or failure.

§Arguments

  • stream - A mutable reference to an asynchronous stream.
  • reply - The HTTP reply status to send to the client.

§Returns

  • Result<()> - Success if the response is sent, or an IO error if writing fails.