Hostname

group ESP_HOSTNAME

Hostname API.

Functions

espr_t esp_hostname_set(const char *hostname, const esp_api_cmd_evt_fn evt_fn, void *const evt_arg, const uint32_t blocking)

Set hostname of WiFi station.

Return

espOK on success, member of espr_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

espr_t esp_hostname_get(char *hostname, size_t size, const esp_api_cmd_evt_fn evt_fn, void *const evt_arg, const uint32_t blocking)

Get hostname of WiFi station.

Return

espOK on success, member of espr_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