Struct asio::socket_base::BytesReadable [] [src]

pub struct BytesReadable(_);

IO control command to get the amount of data that can be read without blocking.

Implements the FIONREAD IO control command.

Examples

Gettable the IO control:

use asio::*;
use asio::ip::*;
use asio::socket_base::BytesReadable;

let io = &IoService::new();
let soc = UdpSocket::new(io, Udp::v4()).unwrap();

let mut bytes = BytesReadable::default();
soc.io_control(&mut bytes).unwrap();
let sized = bytes.get();

Methods

impl BytesReadable
[src]

fn get(&self) -> usize

Trait Implementations

impl Clone for BytesReadable
[src]

fn clone(&self) -> BytesReadable

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

impl Default for BytesReadable
[src]

fn default() -> BytesReadable

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

impl IoControl for BytesReadable
[src]

type Data = i32

fn name(&self) -> i32

fn data(&mut self) -> &mut Self::Data