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 f98ee12ef9..4ab0579912 100644
--- a/modules/websocket/packet_buffer.h
+++ b/modules/websocket/packet_buffer.h
@@ -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);