websocket: Added new API esp_websocket_client_destroy_on_exit

This commit is contained in:
Suren Gabrielyan
2023-01-23 22:36:22 +04:00
parent dc8b916561
commit f9b47900f2
2 changed files with 46 additions and 15 deletions

View File

@ -166,6 +166,18 @@ esp_err_t esp_websocket_client_stop(esp_websocket_client_handle_t client);
*/
esp_err_t esp_websocket_client_destroy(esp_websocket_client_handle_t client);
/**
* @brief If this API called, WebSocket client will destroy and free all resources at the end of event loop.
*
* Notes:
* - After event loop finished, client handle would be dangling and should never be used
*
* @param[in] client The client
*
* @return esp_err_t
*/
esp_err_t esp_websocket_client_destroy_on_exit(esp_websocket_client_handle_t client);
/**
* @brief Write binary data to the WebSocket connection (data send with WS OPCODE=02, i.e. binary)
*