pub async fn serve_io<IO>(
io: IO,
local_addr: SocketAddr,
client_addr: SocketAddr,
state: Arc<AppState>,
is_tls: bool,
) -> Result<(), Box<dyn Error + Send + Sync>>Expand description
Serve a connection on any I/O type that implements AsyncRead + AsyncWrite + Unpin.
This is the generic entry point used by both plain TCP and TLS connections,
as well as connections wrapped in a PrefixedStream (when PROXY protocol
is enabled).