Commit Graph

20 Commits

Author SHA1 Message Date
David Cermak
14992e62c5 ws_client: fix fragmented send setting proper opcodes
Previous implementation violated the RFC by having both the actual opcode and WS_FIN flag set for all fragments of a message.
Fixed by setting the opcode only for the first fragment and WS_FIN for the last one

Closes IDFGH-2938
Closes https://github.com/espressif/esp-idf/issues/4974
2020-04-14 16:11:32 +02:00
Konstantin Kondrashov
739eb05bb9 esp32: add implementation of esp_timer based on TG0 LAC timer
Closes: IDF-979
2020-02-06 14:00:18 +08:00
Marius Vikhammer
ffeda3003c tcp_transport/ws_client: websockets now correctly handle messages longer than buffer
transport_ws can now be read multiple times in a row to read frames larger than the buffer.

Added reporting of total payload length and offset to the user in websocket_client.

Added local example test for long messages.

Closes IDF-1083
2020-01-06 17:18:13 +08:00
Marius Vikhammer
7c0e3765ec websocket: added missing event data
user_context was missing from websocket event data, added. Also added the websocket client handle to the event data.

Removed  unused event data struct.

Closes: IDF-1271
2019-12-19 17:36:37 +08:00
David N. Junod
9200250f51 Add User-Agent and additional headers to esp_websocket_client
Merges https://github.com/espressif/esp-idf/pull/4345
2019-11-21 21:14:29 +01:00
David Cermak
e1f982921a 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
2019-11-18 10:59:41 +00:00
David Cermak
7c5011f411 websocket_client: fix locking mechanism in ws-client task and when sending data
closes https://github.com/espressif/esp-idf/issues/4169
2019-10-24 07:09:31 +00:00
David Cermak
abf9345b85 ws_client: fix for not sending ping responses, updated to pass events also for PING and PONG messages, added interfaces to send both binary and text data
closes https://github.com/espressif/esp-idf/issues/3982
2019-10-14 11:05:27 +02:00
Angus Gratton
92a507c0aa Merge branch 'bugfix/ws_client_fix_event_blocking' into 'master'
ws_client: fixed posting to event loop with websocket timeout

See merge request espressif/esp-idf!5901
2019-10-14 15:17:34 +08:00
David Cermak
271e6c4c9c websocket_client: fix URI parsing to include also query part in websocket connection path
closes https://github.com/espressif/esp-idf/issues/4090
2019-10-07 16:40:38 +02:00
David Cermak
50505068c4 ws_client: fixed posting to event loop with websocket timeout
Executing event loop `esp_event_loop_run()` with timeout causes delays in receiving events from user code. Fixed by removing the timeout to post synchronously.

closes https://github.com/espressif/esp-idf/issues/3957
2019-10-07 16:34:51 +02:00
David Cermak
de6ea396f1 ws_client: added subprotocol configuration option to websocket client
closes https://github.com/espressif/esp-idf/issues/3893
2019-10-03 07:33:32 +02:00
David Cermak
c0ba9e19fc ws_client: fixed path config issue when ws server configured using host and path instead of uri
closes https://github.com/espressif/esp-idf/issues/3892
2019-10-03 07:33:32 +02:00
David Cermak
adee25d90e ws_client: fixed transport config option when server address configured as host, port, transport rather then uri
closes https://github.com/espressif/esp-idf/issues/3891
2019-10-03 07:33:32 +02:00
liu zhifu
003a9872b7 esp_wifi: wifi support new event mechanism
1. WiFi support new event mechanism
2. Update examples to use new event mechanism
2019-08-20 09:39:51 +00:00
Anton Maklakov
afbaf74007 tools: Mass fixing of empty prototypes (for -Wstrict-prototypes) 2019-08-01 16:28:56 +07:00
David Cermak
9b507c45c8 ws_client: fix double delete issue in ws client initialization 2019-07-15 13:15:07 +02:00
David Cermak
d1433564ec ws_client: removed dependency on internal tcp_transport header 2019-07-04 20:55:10 +02:00
Renz Christian Bagaporo
6771eead80 examples: use new component registration api 2019-06-21 19:53:29 +08:00
Tuan
2a2d932cfe esp_websocket_client: Add websocket client component
Closes https://github.com/espressif/esp-idf/issues/2829
2019-06-20 15:37:40 +08:00