feat(websocket): add events for begin/end thread

Add events to signal the start and end of the
websocket thread handler, only once each per client.
This commit is contained in:
Richard Allen
2024-08-16 14:31:41 -05:00
parent 9cf4163663
commit d7fa24bc20
5 changed files with 18 additions and 0 deletions

View File

@ -36,6 +36,8 @@ typedef enum {
WEBSOCKET_EVENT_DATA, /*!< When receiving data from the server, possibly multiple portions of the packet */
WEBSOCKET_EVENT_CLOSED, /*!< The connection has been closed cleanly */
WEBSOCKET_EVENT_BEFORE_CONNECT, /*!< The event occurs before connecting */
WEBSOCKET_EVENT_BEGIN, /*!< The event occurs once after thread creation, before event loop */
WEBSOCKET_EVENT_FINISH, /*!< The event occurs once after event loop, before thread destruction */
WEBSOCKET_EVENT_MAX
} esp_websocket_event_id_t;