writesBytes as in V3 instead of writeInt (RFC says 0 to 4 bytes)
This commit is contained in:
parent
92334b919e
commit
56a72c6456
@ -166,7 +166,7 @@ public class WebSocket08FrameEncoder extends MessageToByteEncoder<WebSocketFrame
|
||||
if (maskPayload) {
|
||||
int random = (int) (Math.random() * Integer.MAX_VALUE);
|
||||
mask = ByteBuffer.allocate(4).putInt(random).array();
|
||||
out.writeInt(random);
|
||||
header.writeBytes(mask);
|
||||
|
||||
int counter = 0;
|
||||
for (int i = data.readerIndex(); i < data.writerIndex(); i ++) {
|
||||
|
Loading…
Reference in New Issue
Block a user