pub(crate) async fn connect_tcp_inner(
addr: SocketAddr,
) -> Result<Pin<Box<TimeoutStream<TcpStream>>>>
Expand description
Returns a TCP connection stream with read/write timeouts set
and Nagle’s algorithm disabled with TCP_NODELAY
.
TCP_NODELAY
ensures writing to the stream always results in immediate sending of the packet
to the network, which is important to reduce the latency of interactive protocols such as IMAP.