Ping support

group LWESP_PING

Ping server and get response time.

Functions

lwespr_t lwesp_ping(const char *host, uint32_t *time, const lwesp_api_cmd_evt_fn evt_fn, void *const evt_arg, const uint32_t blocking)

Ping server and get response time from it.

Parameters
  • host[in] Host name to ping

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

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

  • evt_arg[in] Custom argument for event callback function

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

Returns

lwespOK on success, member of lwespr_t enumeration otherwise