forked from espressif/esp-protocols
Make esp_websocket_client_abort_connection not static
This commit is contained in:
@ -226,7 +226,7 @@ static esp_err_t esp_websocket_client_dispatch_event(esp_websocket_client_handle
|
|||||||
return esp_event_loop_run(client->event_handle, 0);
|
return esp_event_loop_run(client->event_handle, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static esp_err_t esp_websocket_client_abort_connection(esp_websocket_client_handle_t client, esp_websocket_error_type_t error_type)
|
esp_err_t esp_websocket_client_abort_connection(esp_websocket_client_handle_t client, esp_websocket_error_type_t error_type)
|
||||||
{
|
{
|
||||||
ESP_WS_CLIENT_STATE_CHECK(TAG, client, return ESP_FAIL);
|
ESP_WS_CLIENT_STATE_CHECK(TAG, client, return ESP_FAIL);
|
||||||
esp_transport_close(client->transport);
|
esp_transport_close(client->transport);
|
||||||
|
@ -247,6 +247,16 @@ esp_err_t esp_websocket_client_initiate_stop(esp_websocket_client_handle_t clien
|
|||||||
*/
|
*/
|
||||||
bool esp_websocket_client_is_already_stopped(esp_websocket_client_handle_t client);
|
bool esp_websocket_client_is_already_stopped(esp_websocket_client_handle_t client);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Closes a websocket connection and causes a reconnect to happen
|
||||||
|
*
|
||||||
|
* @param[in] client The client
|
||||||
|
* @param[in] error_type The error type
|
||||||
|
*
|
||||||
|
* @return esp_err_t
|
||||||
|
*/
|
||||||
|
esp_err_t esp_websocket_client_abort_connection(esp_websocket_client_handle_t client, esp_websocket_error_type_t error_type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Destroy the WebSocket connection and free all resources.
|
* @brief Destroy the WebSocket connection and free all resources.
|
||||||
* This function must be the last function to call for an session.
|
* This function must be the last function to call for an session.
|
||||||
|
Reference in New Issue
Block a user