mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
feat(esp_http_server): Make HTTP(S)_SERVER_EVENT events optional
Make it possible to disable http(s) server events. This improves performance of the server, as http server creates events on every signle read or write to the socket.
This commit is contained in:
committed by
Hrushikesh Bhosale
parent
8f3d8b41c3
commit
6036ec961d
@@ -23,8 +23,6 @@ extern "C" {
|
||||
|
||||
#define ESP_HTTPD_DEF_CTRL_PORT (32768) /*!< HTTP Server control socket port*/
|
||||
|
||||
ESP_EVENT_DECLARE_BASE(ESP_HTTP_SERVER_EVENT);
|
||||
|
||||
/**
|
||||
* @brief HTTP Server events id
|
||||
*/
|
||||
@@ -40,11 +38,15 @@ typedef enum {
|
||||
HTTP_SERVER_EVENT_STOP, /*!< This event occurs when HTTP Server is stopped */
|
||||
} esp_http_server_event_id_t;
|
||||
|
||||
#if CONFIG_HTTPD_ENABLE_EVENTS || __DOXYGEN_
|
||||
ESP_EVENT_DECLARE_BASE(ESP_HTTP_SERVER_EVENT);
|
||||
|
||||
/** Argument structure for HTTP_SERVER_EVENT_ON_DATA and HTTP_SERVER_EVENT_SENT_DATA event */
|
||||
typedef struct {
|
||||
int fd; /*!< Session socket file descriptor */
|
||||
int data_len; /*!< Data length */
|
||||
} esp_http_server_event_data;
|
||||
#endif // CONFIG_HTTPD_ENABLE_EVENTS || __DOXYGEN_
|
||||
|
||||
/*
|
||||
note: esp_https_server.h includes a customized copy of this
|
||||
|
||||
Reference in New Issue
Block a user