mirror of
https://github.com/espressif/esp-idf.git
synced 2026-05-05 12:25:03 +02:00
ws_client: fix handling timeouts by websocket client.
tcp-transport component did not support wait forever. this update uses value of -1 to request this state. websocket client uses timeouts in RTOS ticks. fixed recalculation to ms (including special value of -1) to use correctly tcp-transport component Closes https://github.com/espressif/esp-idf/issues/4316
This commit is contained in:
@@ -133,7 +133,7 @@ esp_err_t esp_transport_set_default_port(esp_transport_handle_t t, int port);
|
||||
* @param t The transport handle
|
||||
* @param[in] host Hostname
|
||||
* @param[in] port Port
|
||||
* @param[in] timeout_ms The timeout milliseconds
|
||||
* @param[in] timeout_ms The timeout milliseconds (-1 indicates wait forever)
|
||||
*
|
||||
* @return
|
||||
* - socket for will use by this transport
|
||||
@@ -147,7 +147,7 @@ int esp_transport_connect(esp_transport_handle_t t, const char *host, int port,
|
||||
* @param t The transport handle
|
||||
* @param[in] host Hostname
|
||||
* @param[in] port Port
|
||||
* @param[in] timeout_ms The timeout milliseconds
|
||||
* @param[in] timeout_ms The timeout milliseconds (-1 indicates wait forever)
|
||||
*
|
||||
* @return
|
||||
* - socket for will use by this transport
|
||||
@@ -161,7 +161,7 @@ int esp_transport_connect_async(esp_transport_handle_t t, const char *host, int
|
||||
* @param t The transport handle
|
||||
* @param buffer The buffer
|
||||
* @param[in] len The length
|
||||
* @param[in] timeout_ms The timeout milliseconds
|
||||
* @param[in] timeout_ms The timeout milliseconds (-1 indicates wait forever)
|
||||
*
|
||||
* @return
|
||||
* - Number of bytes was read
|
||||
@@ -173,7 +173,7 @@ int esp_transport_read(esp_transport_handle_t t, char *buffer, int len, int time
|
||||
* @brief Poll the transport until readable or timeout
|
||||
*
|
||||
* @param[in] t The transport handle
|
||||
* @param[in] timeout_ms The timeout milliseconds
|
||||
* @param[in] timeout_ms The timeout milliseconds (-1 indicates wait forever)
|
||||
*
|
||||
* @return
|
||||
* - 0 Timeout
|
||||
@@ -188,7 +188,7 @@ int esp_transport_poll_read(esp_transport_handle_t t, int timeout_ms);
|
||||
* @param t The transport handle
|
||||
* @param buffer The buffer
|
||||
* @param[in] len The length
|
||||
* @param[in] timeout_ms The timeout milliseconds
|
||||
* @param[in] timeout_ms The timeout milliseconds (-1 indicates wait forever)
|
||||
*
|
||||
* @return
|
||||
* - Number of bytes was written
|
||||
@@ -200,7 +200,7 @@ int esp_transport_write(esp_transport_handle_t t, const char *buffer, int len, i
|
||||
* @brief Poll the transport until writeable or timeout
|
||||
*
|
||||
* @param[in] t The transport handle
|
||||
* @param[in] timeout_ms The timeout milliseconds
|
||||
* @param[in] timeout_ms The timeout milliseconds (-1 indicates wait forever)
|
||||
*
|
||||
* @return
|
||||
* - 0 Timeout
|
||||
|
||||
@@ -63,7 +63,7 @@ esp_err_t esp_transport_ws_set_subprotocol(esp_transport_handle_t t, const char
|
||||
* @param[in] opcode ws operation code
|
||||
* @param[in] buffer The buffer
|
||||
* @param[in] len The length
|
||||
* @param[in] timeout_ms The timeout milliseconds
|
||||
* @param[in] timeout_ms The timeout milliseconds (-1 indicates block forever)
|
||||
*
|
||||
* @return
|
||||
* - Number of bytes was written
|
||||
|
||||
Reference in New Issue
Block a user