summaryrefslogtreecommitdiffstats
path: root/modules/websocket/packet_buffer.h
diff options
context:
space:
mode:
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);