Skip to content

Commit

Permalink
Merge pull request #25 from deathcap/java-noframe
Browse files Browse the repository at this point in the history
Update wsmc/Java for mc framing removal in wsmc/JS
  • Loading branch information
deathcap committed Jan 17, 2016
2 parents 8941163 + fd27b77 commit 11741d3
Show file tree
Hide file tree
Showing 2 changed files with 128,061 additions and 28,177 deletions.
4 changes: 1 addition & 3 deletions src/main/java/deathcap/wsmc/web/WebSocketHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,7 @@ protected void messageReceived(final ChannelHandlerContext ctx, BinaryWebSocketF

if (verbose) logger.info("ws received "+buf.readableBytes()+" bytes: " + HexDumper.hexByteBuf(buf));

// strip length header since Varint21LengthFieldPrepender re-adds it TODO: refactor
int length = DefinedPacket.readVarInt(buf);
byte bytes[] = new byte[length];
byte bytes[] = new byte[buf.readableBytes()];
buf.readBytes(bytes);

// read packet id type for filtering
Expand Down
Loading

0 comments on commit 11741d3

Please sign in to comment.