diff options
author | Spartan322 <Megacake1234@gmail.com> | 2024-11-12 13:46:08 -0500 |
---|---|---|
committer | Spartan322 <Megacake1234@gmail.com> | 2024-11-12 13:46:59 -0500 |
commit | 3a73c6ebd18bff0fa125be58d3ac9c7a63bab61d (patch) | |
tree | c7341bd56c977259578b127886c9a88eeef11820 /modules/websocket/packet_buffer.h | |
parent | 5094c2a5f7d506b0e685120f14d1df42e1e9d495 (diff) | |
parent | cb411fa960f0b7fdbd97dcdb4c90f9346360ee0e (diff) | |
download | redot-engine-3a73c6ebd18bff0fa125be58d3ac9c7a63bab61d.tar.gz |
Merge commit godotengine/godot@cb411fa960f0b7fdbd97dcdb4c90f9346360ee0e
Diffstat (limited to 'modules/websocket/packet_buffer.h')
-rw-r--r-- | modules/websocket/packet_buffer.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/websocket/packet_buffer.h b/modules/websocket/packet_buffer.h index 41975e34d4..cb7fd02e30 100644 --- a/modules/websocket/packet_buffer.h +++ b/modules/websocket/packet_buffer.h @@ -106,6 +106,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); |