diff --git a/src/main/java/org/java_websocket/WebSocketImpl.java b/src/main/java/org/java_websocket/WebSocketImpl.java index 8629a61bc..c9097ed7a 100644 --- a/src/main/java/org/java_websocket/WebSocketImpl.java +++ b/src/main/java/org/java_websocket/WebSocketImpl.java @@ -649,6 +649,10 @@ public boolean hasBufferedData() { return !this.outQueue.isEmpty(); } + public int getBufferentDataChunkCount() { + return this.outQueue.size(); + } + private HandshakeState isFlashEdgeCase( ByteBuffer request ) throws IncompleteHandshakeException { request.mark(); if( request.limit() > Draft.FLASH_POLICY_REQUEST.length ) {