Ping support

group ESP_PING

Ping server and get response time.

Functions

espr_t esp_ping(const char *host, uint32_t *time, const esp_api_cmd_evt_fn evt_fn, void *const evt_arg, const uint32_t blocking)

Ping server and get response time from it.

Return

espOK on success, member of espr_t enumeration otherwise

Parameters
  • [in] host: Host name to ping

  • [out] time: Pointer to output variable to save ping time in units of milliseconds

  • [in] evt_fn: Callback function called when command has finished. Set to NULL when not used

  • [in] evt_arg: Custom argument for event callback function

  • [in] blocking: Status whether command should be blocking or not