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
This commit is contained in:
David Cermak
2020-03-25 21:22:25 +01:00
parent d85d3d969f
commit 14992e62c5
3 changed files with 10 additions and 5 deletions
@@ -20,6 +20,7 @@ typedef enum ws_transport_opcodes {
WS_TRANSPORT_OPCODES_CLOSE = 0x08,
WS_TRANSPORT_OPCODES_PING = 0x09,
WS_TRANSPORT_OPCODES_PONG = 0x0a,
WS_TRANSPORT_OPCODES_FIN = 0x80,
} ws_transport_opcodes_t;
/**