Struct asyncio::socket_base::RecvLowWatermark [] [src]

pub struct RecvLowWatermark(_);

Socket option for the receive low watermark.

Implements the SOL_SOCKET/SO_RCVLOWAT socket option.

Examples

Setting the option:

use asyncio::*;
use asyncio::ip::*;
use asyncio::socket_base::RecvLowWatermark;

let ctx = &IoContext::new().unwrap();
let soc = TcpSocket::new(ctx, Tcp::v4()).unwrap();

soc.set_option(RecvLowWatermark::new(1024)).unwrap();

Getting the option:

use asyncio::*;
use asyncio::ip::*;
use asyncio::socket_base::RecvLowWatermark;

let ctx = &IoContext::new().unwrap();
let soc = TcpSocket::new(ctx, Tcp::v4()).unwrap();

let opt: RecvLowWatermark = soc.get_option().unwrap();
let size: usize = opt.get();

Methods

impl RecvLowWatermark
[src]

Trait Implementations

impl Default for RecvLowWatermark
[src]

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

impl Clone for RecvLowWatermark
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<P: Protocol> SocketOption<P> for RecvLowWatermark
[src]

impl<P: Protocol> GetSocketOption<P> for RecvLowWatermark
[src]

impl<P: Protocol> SetSocketOption<P> for RecvLowWatermark
[src]