/// Send ICMP request and wait for response.
Send ICMP request and wait for response.
Send ICMP request and wait for response .
pub fn send(&mut self) -> PingFuture {
        let ident = match self.ident {
            Some(ident) => ident,
            None => {
                let ident = random();
                self.ident = Some(ident);
                ident
            }
        };
        let seq_cnt = match self.seq_cnt {
            Some(seq_cnt) => {
                self.seq_cnt = Some(seq_cnt.wrapping_add(1));
                seq_cnt
            }
            None => {
                self.seq_cnt = Some(1);
                0
            }
        };
        let timeout = match self.timeout {
            Some(timeout) => timeout,
            None => {
                let timeout = Duration::from_secs(DEFAULT_TIMEOUT);
                self.timeout = Some(timeout);
                timeout
            }
        };
        self.pinger.ping(self.hostname, ident, seq_cnt, timeout)
    }
pub fn send ( & mut self ) -> PingFuture { let ident = match self . ident { Some ( ident ) => ident , None => { let ident = random ( ) ; self . ident = Some ( ident ) ; ident } } ; let seq_cnt = match self . seq_cnt { Some ( seq_cnt ) => { self . seq_cnt = Some ( seq_cnt . wrapping_add ( 1 ) ) ; seq_cnt } None => { self . seq_cnt = Some ( 1 ) ; 0 } } ; let timeout = match self . timeout { Some ( timeout ) => timeout , None => { let timeout = Duration :: from_secs ( DEFAULT_TIMEOUT ) ; self . timeout = Some ( timeout ) ; timeout } } ; self . pinger . ping ( self . hostname , ident , seq_cnt , timeout ) }
Send ICMP request and wait for response.
Send ICMP request and wait for response .
&mut self