Struct asio::ip::IcmpSocket [] [src]

pub struct IcmpSocket {
    // some fields omitted
}

The ICMP(v6) socket type.

Methods

impl IcmpSocket
[src]

fn new(pro: Icmp) -> Result<Self>

Make a ICMP(v6) socket.

Example

use asio::ip::{Icmp, IcmpSocket};

// Make a ICMP socket.
let icmp = IcmpSocket::new(Icmp::v4());

// Make a ICMPv6 socket.
let icmpv6 = IcmpSocket::new(Icmp::v6());

Trait Implementations

impl AsRawFd for IcmpSocket
[src]

fn as_raw_fd(&self) -> RawFd

Extracts the raw file descriptor. Read more

impl NonBlocking for IcmpSocket
[src]

fn get_non_blocking(&self) -> bool

fn set_non_blocking(&self, on: bool)

fn native_get_non_blocking(&self) -> Result<bool>

fn native_set_non_blocking(&self, on: bool) -> Result<()>

impl Socket for IcmpSocket
[src]

type Protocol = Icmp

type Endpoint = IcmpEndpoint

fn bind(&self, ep: &Self::Endpoint) -> Result<()>

fn local_endpoint(&self) -> Result<Self::Endpoint>

fn io_control<T: IoControl<Self>>(&self, cmd: &mut T) -> Result<()>

fn get_option<T: GetSocketOption<Self>>(&self) -> Result<T>

fn set_option<T: SetSocketOption<Self>>(&self, cmd: &T) -> Result<()>

impl IpSocket for IcmpSocket
[src]

impl Cancel for IcmpSocket
[src]

fn cancel<A, T>(a: A, obj: &Strand<T>) where A: Fn(&T) -> &Self + 'static, T: 'static

impl SocketConnector for IcmpSocket
[src]

fn connect<T: IoObject>(&self, io: &T, ep: &Self::Endpoint) -> Result<()>

fn async_connect<A, F, T>(a: A, ep: &Self::Endpoint, callback: F, obj: &Strand<T>) where A: Fn(&T) -> &Self + Send + 'static, F: FnOnce(Strand<T>, Result<()>) + Send + 'static, T: 'static

fn remote_endpoint(&self) -> Result<Self::Endpoint>

fn available(&self) -> Result<usize>

impl SendRecv for IcmpSocket
[src]

fn recv<T: IoObject>(&self, io: &T, buf: &mut [u8], flags: i32) -> Result<usize>

fn async_recv<A, F, T>(a: A, flags: i32, callback: F, obj: &Strand<T>) where A: Fn(&mut T) -> (&Self, &mut [u8]) + Send + 'static, F: FnOnce(Strand<T>, Result<usize>) + Send + 'static, T: 'static

fn send<T: IoObject>(&self, io: &T, buf: &[u8], flags: i32) -> Result<usize>

fn async_send<A, F, T>(a: A, flags: i32, callback: F, obj: &Strand<T>) where A: Fn(&T) -> (&Self, &[u8]) + Send + 'static, F: FnOnce(Strand<T>, Result<usize>) + Send + 'static, T: 'static

impl SendToRecvFrom for IcmpSocket
[src]

fn recv_from<T: IoObject>(&self, io: &T, buf: &mut [u8], flags: i32) -> Result<(usize, Self::Endpoint)>

fn async_recv_from<A, F, T>(a: A, flags: i32, callback: F, obj: &Strand<T>) where A: Fn(&mut T) -> (&Self, &mut [u8]) + Send + 'static, F: FnOnce(Strand<T>, Result<(usize, Self::Endpoint)>) + Send + 'static, T: 'static

fn send_to<T: IoObject>(&self, io: &T, buf: &[u8], flags: i32, ep: &Self::Endpoint) -> Result<usize>

fn async_send_to<A, F, T>(a: A, flags: i32, ep: &Self::Endpoint, callback: F, obj: &Strand<T>) where A: Fn(&T) -> (&Self, &[u8]) + Send + 'static, F: FnOnce(Strand<T>, Result<usize>) + Send + 'static, T: 'static

impl RawSocket for IcmpSocket
[src]