Struct asyncio::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 asyncio::*; use asyncio::ip::*; let ctx = &IoContext::new().unwrap(); let soc = TcpSocket::new(ctx, Tcp::v4()).unwrap(); soc.set_option(NoDelay::new(true)).unwrap();
Getting the option:
use asyncio::*; use asyncio::ip::*; let ctx = &IoContext::new().unwrap(); let soc = TcpSocket::new(ctx, Tcp::v4()).unwrap(); let opt: NoDelay = soc.get_option().unwrap(); let is_set: bool = opt.get();
Methods
impl NoDelay
[src]
Trait Implementations
impl Default for NoDelay
[src]
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