summaryrefslogtreecommitdiffstats
path: root/modules/websocket/packet_buffer.h
diff options
context:
space:
mode:
authorSpartan322 <Megacake1234@gmail.com>2024-11-12 13:46:08 -0500
committerSpartan322 <Megacake1234@gmail.com>2024-11-12 13:46:59 -0500
commit3a73c6ebd18bff0fa125be58d3ac9c7a63bab61d (patch)
treec7341bd56c977259578b127886c9a88eeef11820 /modules/websocket/packet_buffer.h
parent5094c2a5f7d506b0e685120f14d1df42e1e9d495 (diff)
parentcb411fa960f0b7fdbd97dcdb4c90f9346360ee0e (diff)
downloadredot-engine-3a73c6ebd18bff0fa125be58d3ac9c7a63bab61d.tar.gz
Merge commit godotengine/godot@cb411fa960f0b7fdbd97dcdb4c90f9346360ee0e
Diffstat (limited to 'modules/websocket/packet_buffer.h')
-rw-r--r--modules/websocket/packet_buffer.h8
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);