You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/org/java_websocket/SSLSocketChannel2.java
+21-5Lines changed: 21 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,12 @@ public class SSLSocketChannel2 implements ByteChannel, WrappedByteChannel {
56
56
protectedSSLEngineResultreadEngineResult;
57
57
protectedSSLEngineResultwriteEngineResult;
58
58
59
+
/**
60
+
* Should be used to count the buffer allocations.
61
+
* But because of #190 where HandshakeStatus.FINISHED is not properly returned by nio wrap/unwrap this variable is used to check whether {@link #createBuffers(SSLSession)} needs to be called.
assert ( sslEngine.getHandshakeStatus() != HandshakeStatus.NOT_HANDSHAKING );// this function could only leave NOT_HANDSHAKING after createBuffers was called unless #190 occurs which means that nio wrap/unwrap never return HandshakeStatus.FINISHED
144
150
151
+
bufferallocations = 1; // look at variable declaration why this line exists and #190. Without this line buffers would not be be recreated when #190 AND a rehandshake occur.
* Allows to send continuous/fragmented frames conveniently. <br>
68
+
* For more into on this frame type see http://tools.ietf.org/html/rfc6455#section-5.4<br>
69
+
*
70
+
* If the first frame you send is also the last then it is not a fragmented frame and will received via onMessage instead of onFragmented even though it was send by this method.
71
+
*
72
+
* @param op
73
+
* This is only important for the first frame in the sequence. Opcode.TEXT, Opcode.BINARY are allowed.
74
+
* @param buffer
75
+
* The buffer which contains the payload. It may have no bytes remaining.
76
+
* @param fin
77
+
* true means the current frame is the last in the sequence.
0 commit comments