Hostname

group LWESP_HOSTNAME

Hostname API.

Functions

lwespr_t lwesp_hostname_set(const char *hostname, const lwesp_api_cmd_evt_fn evt_fn, void *const evt_arg, const uint32_t blocking)

Set hostname of WiFi station.

Return

lwespOK on success, member of lwespr_t enumeration otherwise

Parameters
  • [in] hostname: Name of ESP host

  • [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

lwespr_t lwesp_hostname_get(char *hostname, size_t size, const lwesp_api_cmd_evt_fn evt_fn, void *const evt_arg, const uint32_t blocking)

Get hostname of WiFi station.

Return

lwespOK on success, member of lwespr_t enumeration otherwise

Parameters
  • [in] hostname: Pointer to output variable holding memory to save hostname

  • [in] size: Size of buffer for hostname. Size includes memory for NULL termination

  • [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