[][src]Struct winping::AsyncPinger

pub struct AsyncPinger { /* fields omitted */ }

A pinger that does not block when sending.

Implementations

impl AsyncPinger[src]

pub fn new() -> Self[src]

Creates a new AsyncPinger. Creating one or more AsyncPingers will spawn a single dedicated thread which handles all async IO for all AsyncPingers. If ICMP handle initialization fails, all ping requests will return an error.

Panics

This may panic if the compile-time environment variable WINPING_ASYNC_BUFFER_SIZE is set but cannot be parsed to a valid usize

pub fn set_ttl(&mut self, ttl: u8)[src]

Sets the IP TTL for future requets.

pub fn ttl(&self) -> u8[src]

Gets the current IP TTL value.

pub fn set_df(&mut self, df: bool)[src]

Sets the IP Don't Fragment bit for future requests.

pub fn df(&self) -> bool[src]

Gets the current IP Don't Fragment bit.

pub fn set_timeout(&mut self, timeout: u32)[src]

Sets the timeout, in milliseconds, for future requests.

pub fn timeout(&self) -> u32[src]

Gets the current timeout in milliseconds.

pub fn send4(&self, dst: Ipv4Addr, buf: Buffer) -> PingFuture

Notable traits for PingFuture

impl Future for PingFuture type Output = AsyncResult;
[src]

Send an ICMPv4 request to the destination address. On success, returns the round trip time in milliseconds.

pub fn send4_from(
    &self,
    src: Ipv4Addr,
    dst: Ipv4Addr,
    buf: Buffer
) -> PingFuture

Notable traits for PingFuture

impl Future for PingFuture type Output = AsyncResult;
[src]

Sends an ICMPv4 request from the source address to the destination address. On success, returns the round trip time in milliseconds.

pub fn send6(&self, dst: Ipv6Addr, buf: Buffer) -> PingFuture

Notable traits for PingFuture

impl Future for PingFuture type Output = AsyncResult;
[src]

Sends an ICMPv6 request to the destination address. On success, returns the round trip time in milliseconds.

pub fn send6_from(
    &self,
    src: Ipv6Addr,
    dst: Ipv6Addr,
    buf: Buffer
) -> PingFuture

Notable traits for PingFuture

impl Future for PingFuture type Output = AsyncResult;
[src]

Sends an ICMPv6 request from the source address to the destination address. On success, returns the round trip time in milliseconds.

pub fn send(&self, dst: IpAddr, buf: Buffer) -> PingFuture

Notable traits for PingFuture

impl Future for PingFuture type Output = AsyncResult;
[src]

Sends an ICMP request to the destination address. Supports both v4 and v6. On success, returns the round trip time in milliseconds.

pub fn send_from(&self, src_dst_pair: IpPair, buf: Buffer) -> PingFuture

Notable traits for PingFuture

impl Future for PingFuture type Output = AsyncResult;
[src]

Sends an ICMP request from the source address to the destination address. Supports both v4 and v6. On success, returns the round trip time in milliseconds.

Trait Implementations

impl Clone for AsyncPinger[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.