Function mrpt::comms::net::Ping

Function Documentation

bool mrpt::comms::net::Ping(const std::string &address, const int max_attempts, std::string *output_str = nullptr)

Ping an IP address.

Note

{ I am redirecting stderr to stdout, so that the overall process is simplified. Otherwise see: https://jineshkj.wordpress.com/2006/12/22/how-to-capture-stdin-stdout-and-stderr-of-child-program/ }

Parameters:
  • address[in] Address to ping.

  • max_attempts[in] Number of attempts to try and ping.

  • output[out] String containing output information

Returns:

True if responsive, false otherwise.