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
editor Remove unused header in drivers and modules. 2024-12-24 00:40:47 +08:00
SCsub
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
library_godot_websocket.js
packet_buffer.h
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
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_peer.h
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