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.

Return

lwespOK on success, member of lwespr_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