Struct asio::ip::NoDelay
[−]
[src]
pub struct NoDelay(_);
Socket option for disabling the Nagle algorithm.
Implements the IPPROTO_TCP/TCP_NODELAY socket option.
Examples
Setting the option:
use asio::*; use asio::ip::*; let io = &IoService::new(); let soc = TcpSocket::new(io, Tcp::v4()).unwrap(); soc.set_option(NoDelay::new(true)).unwrap();
Getting the option:
use asio::*; use asio::ip::*; let io = &IoService::new(); let soc = TcpSocket::new(io, Tcp::v4()).unwrap(); let opt: NoDelay = soc.get_option().unwrap(); let is_set: bool = opt.get();
Methods
impl NoDelay[src]
Trait Implementations
impl Clone for NoDelay[src]
fn clone(&self) -> NoDelay
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more