ping

Function ping 

Source
pub fn ping(
    addrs: Vec<IpAddr>,
    popt: PingOption,
    enable_print_stat: bool,
    tx: Option<Sender<TargetResult>>,
) -> Result<()>
Expand description

Ping function.

ยงArguments

  • addrs is a vector of ip address.
  • popt is a PingOption struct.
  • enable_print_stat is a bool value to enable print ping stat in log.
  • `tx`` is a Sender for send ping result. If tx is None, ping will not send result. You can use mpsc::Receiver to receive ping results.