1
0
Fork 0
godot/modules/websocket
Fabio Alessandrelli a2f5eb9cf0 [WS] Fix wslay multi-frame message parsing (again)
We incorrectly assumed that the `payload_length` in the recv start
callback of wslay was the final message size, but according to the
WebSocket  protocol, the payload length always refers to the current
frame's payload size.

The protocol, in fact, do not include a "message payload" length on
purpose to allow sending messages of unknown size without forcing the
sender to buffer the whole message (RFC6455 Section 5.4).

This means a receiving peer has no way to know beforehand how long a
message will be, and needs instead to keep track of the length of each
frame until the FIN one is received to properly reconstruct the message
at the end.
2025-01-28 16:26:11 +01:00
..
doc_classes [WebSocket] Clarify that connect_to_url is non-blocking 2024-11-27 13:31:28 +01:00
editor Remove unused header in drivers and modules. 2024-12-24 00:40:47 +08:00
SCsub SCons: Add unobtrusive type hints in SCons files 2024-09-25 09:34:35 -05:00
config.py
emws_peer.cpp Replace some problematic uses of `String::num` to `String::num_int64` 2025-01-15 12:51:51 -05:00
emws_peer.h Set clang-format `RemoveSemicolon` rule to `true` 2024-10-25 13:49:43 -04:00
library_godot_websocket.js
packet_buffer.h [WS] Implement wslay unbuffered message parsing 2024-11-12 17:19:39 +01:00
register_types.cpp Remove unused header in drivers and modules. 2024-12-24 00:40:47 +08:00
register_types.h
remote_debugger_peer_websocket.cpp Reduce and prevent unnecessary random-access to `List` 2024-05-04 16:08:55 +02:00
remote_debugger_peer_websocket.h
websocket_multiplayer_peer.cpp Remove unused header in drivers and modules. 2024-12-24 00:40:47 +08:00
websocket_multiplayer_peer.h Remove unused header in drivers and modules. 2024-12-24 00:40:47 +08:00
websocket_peer.cpp [WebSocket] Add optional heartbeat via "ping" control frames. 2024-11-07 15:18:46 +01:00
websocket_peer.h [WS] Implement wslay unbuffered message parsing 2024-11-12 17:19:39 +01:00
wsl_peer.cpp [WS] Fix wslay multi-frame message parsing (again) 2025-01-28 16:26:11 +01:00
wsl_peer.h Merge pull request #100631 from Faless/fix/wslay_frame_end_not_fin 2025-01-03 00:48:47 +01:00