[−][src]Struct winping::AsyncPinger
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]
Notable traits for PingFuture
impl Future for PingFuture type Output = AsyncResult;
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]
&self,
src: Ipv4Addr,
dst: Ipv4Addr,
buf: Buffer
) -> PingFutureⓘ
Notable traits for PingFuture
impl Future for PingFuture type Output = AsyncResult;
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]
Notable traits for PingFuture
impl Future for PingFuture type Output = AsyncResult;
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]
&self,
src: Ipv6Addr,
dst: Ipv6Addr,
buf: Buffer
) -> PingFutureⓘ
Notable traits for PingFuture
impl Future for PingFuture type Output = AsyncResult;
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]
Notable traits for PingFuture
impl Future for PingFuture type Output = AsyncResult;
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]
Notable traits for PingFuture
impl Future for PingFuture type Output = AsyncResult;
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]
fn clone(&self) -> AsyncPinger
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl RefUnwindSafe for AsyncPinger
impl Send for AsyncPinger
impl Sync for AsyncPinger
impl Unpin for AsyncPinger
impl UnwindSafe for AsyncPinger
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,