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]

Returns the "default value" for a type. Read more

impl Clone for NoDelay
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl SocketOption<Tcp> for NoDelay
[src]

impl GetSocketOption<Tcp> for NoDelay
[src]

impl SetSocketOption<Tcp> for NoDelay
[src]