Function esp_idf_sys::protocomm_httpd_start

source ยท
pub unsafe extern "C" fn protocomm_httpd_start(
    pc: *mut protocomm_t,
    config: *const protocomm_httpd_config_t,
) -> esp_err_t
Expand description

@brief Start HTTPD protocomm transport

This API internally creates a framework to allow endpoint registration and security configuration for the protocomm.

@note This is a singleton. ie. Protocomm can have multiple instances, but only one instance can be bound to an HTTP transport layer.

@param[in] pc Protocomm instance pointer obtained from protocomm_new() @param[in] config Pointer to config structure for initializing HTTP server

@return

  • ESP_OK : Success
  • ESP_ERR_INVALID_ARG : Null arguments
  • ESP_ERR_NOT_SUPPORTED : Transport layer bound to another protocomm instance
  • ESP_ERR_INVALID_STATE : Transport layer already bound to this protocomm instance
  • ESP_ERR_NO_MEM : Memory allocation for server resource failed
  • ESP_ERR_HTTPD_* : HTTP server error on start