Function esp_idf_sys::httpd_stop

source ·
pub unsafe extern "C" fn httpd_stop(
    handle: httpd_handle_t
) -> esp_err_t
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