Trait simple_stream::TcpOptions [] [src]

pub trait TcpOptions {
    fn set_tcp_nodelay(&mut self, nodelay: bool) -> Result<()Error>;
}

The TcpOptions trait allows for various TCP level settings.

Required Methods

fn set_tcp_nodelay(&mut self, nodelay: bool) -> Result<()Error>

If set, disable the Nagle algorithm. This means that segments are always sent as soon as possible, even if there is only a small amount of data. When not set, data is buffered until there is a sufficient amount to send out, thereby avoiding the frequent sending of small packets, which results in poor utilization of the network. This option is overridden by TCP_CORK; however, setting this option forces an explicit flush of pending output, even if TCP_CORK is currently set.

Implementors