1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-18 14:21:41 +00:00

[WS] Implement wslay unbuffered message parsing

Ensure we never read more than we can store during poll.

Raise default max packets to 4096 to maintain the same performance for
the first 2048 packets.
This commit is contained in:
Fabio Alessandrelli
2024-10-19 10:25:02 +02:00
parent caff0ff591
commit 3114bda4e1
6 changed files with 72 additions and 17 deletions

View File

@@ -104,6 +104,14 @@ public:
return _queued;
}
int payload_space_left() const {
return _payload.space_left();
}
int packets_space_left() const {
return _packets.size() - _queued;
}
void clear() {
_payload.resize(0);
_packets.resize(0);