Function esp_idf_hal::sys::httpd_stop

source ยท
pub unsafe extern "C" fn httpd_stop(handle: *mut c_void) -> i32
Expand description

@brief Stops the web server

Deallocates memory/resources used by an HTTP server instance and deletes it. Once deleted the handle can no longer be used for accessing the instance.

Example usage: @code{c}

// Function for stopping the webserver void stop_webserver(httpd_handle_t server) { // Ensure handle is non NULL if (server != NULL) { // Stop the httpd server httpd_stop(server); } }

@endcode

@param[in] handle Handle to server returned by httpd_start @return

  • ESP_OK : Server stopped successfully
  • ESP_ERR_INVALID_ARG : Handle argument is Null