Update IDF and Tools

This commit is contained in:
me-no-dev
2020-10-13 16:52:16 +03:00
parent 8900e8fca9
commit 659e9a51dd
475 changed files with 4511 additions and 1535 deletions

View File

@ -406,6 +406,12 @@ typedef struct httpd_uri {
* If this flag is true, then method must be HTTP_GET. Otherwise the handshake will not be handled.
*/
bool is_websocket;
/**
* Flag indicating that control frames (PING, PONG, CLOSE) are also passed to the handler
* This is used if a custom processing of the control frames is needed
*/
bool handle_ws_control_frames;
#endif
} httpd_uri_t;
@ -1466,6 +1472,20 @@ esp_err_t httpd_sess_trigger_close(httpd_handle_t handle, int sockfd);
*/
esp_err_t httpd_sess_update_lru_counter(httpd_handle_t handle, int sockfd);
/**
* @brief Returns list of current socket descriptors of active sessions
*
* @param[in] handle Handle to server returned by httpd_start
* @param[in,out] fds In: Number of fds allocated in the supplied structure client_fds
* Out: Number of valid client fds returned in client_fds,
* @param[out] client_fds Array of client fds
*
* @return
* - ESP_OK : Successfully retrieved session list
* - ESP_ERR_INVALID_ARG : Wrong arguments or list is longer than allocated
*/
esp_err_t httpd_get_client_list(httpd_handle_t handle, size_t *fds, int *client_fds);
/** End of Session
* @}
*/
@ -1526,6 +1546,15 @@ typedef enum {
HTTPD_WS_TYPE_PONG = 0xA
} httpd_ws_type_t;
/**
* @brief Enum for client info description
*/
typedef enum {
HTTPD_WS_CLIENT_INVALID = 0x0,
HTTPD_WS_CLIENT_HTTP = 0x1,
HTTPD_WS_CLIENT_WEBSOCKET = 0x2,
} httpd_ws_client_info_t;
/**
* @brief WebSocket frame format
*/
@ -1586,6 +1615,19 @@ esp_err_t httpd_ws_send_frame(httpd_req_t *req, httpd_ws_frame_t *pkt);
*/
esp_err_t httpd_ws_send_frame_async(httpd_handle_t hd, int fd, httpd_ws_frame_t *frame);
/**
* @brief Checks the supplied socket descriptor if it belongs to any active client
* of this server instance and if the websoket protocol is active
*
* @param[in] hd Server instance data
* @param[in] fd Socket descriptor
* @return
* - HTTPD_WS_CLIENT_INVALID : This fd is not a client of this httpd
* - HTTPD_WS_CLIENT_HTTP : This fd is an active client, protocol is not WS
* - HTTPD_WS_CLIENT_WEBSOCKET : This fd is an active client, protocol is WS
*/
httpd_ws_client_info_t httpd_ws_get_fd_info(httpd_handle_t hd, int fd);
#endif /* CONFIG_HTTPD_WS_SUPPORT */
/** End of WebSocket related stuff
* @}