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
config.py SCons: Format buildsystem files with psf/black 2020-03-30 09:05:53 +02:00
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 Merge pull request #79407 from zaevi/fix_web_websocket-close-reason 2023-10-13 11:42:41 +02:00
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 One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
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 Style: Harmonize header includes in modules 2023-06-15 14:35:45 +02:00
SCsub SCons: Add unobtrusive type hints in SCons files 2024-09-25 09:34:35 -05:00
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