Struct libicmp::icmp::Icmp
[−]
[src]
pub struct Icmp { /* fields omitted */ }
An object for sending and receiving ICMP messages.
Methods
impl Icmp
[src]
fn new(ip: &str) -> Icmp
[src]
Creates a new object for sending and receiving ICMP messages between
the local machine and a host machine identified by ip
.
fn poll(&self) -> Option<bool>
[src]
Polls for new messages. Returns true if data becomes available before the timeout expires.
fn echo_request(&mut self)
[src]
Send an echo request with an incrementing sequence number.
fn get_echo_reply(&self) -> Option<(EchoRequest, Duration)>
[src]
Issue a non-blocking read for any available echo replies from the host. Returns an object representing the reply and the time elapsed between sending the request and receiving its reply.