-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master'
# Conflicts: # src/main/java/org/nethergames/proxytransport/compression/ProxyTransportCompressionCodec.java # src/main/java/org/nethergames/proxytransport/impl/TransportChannelInitializer.java # src/main/java/org/nethergames/proxytransport/impl/TransportClientConnection.java
- Loading branch information
Showing
6 changed files
with
76 additions
and
43 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
src/main/java/org/nethergames/proxytransport/compression/FrameIdCodec.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.nethergames.proxytransport.compression; | ||
|
||
import io.netty.buffer.ByteBuf; | ||
import io.netty.channel.ChannelHandlerContext; | ||
import io.netty.handler.codec.MessageToMessageCodec; | ||
import org.cloudburstmc.protocol.bedrock.netty.BedrockBatchWrapper; | ||
|
||
import java.util.List; | ||
|
||
public class FrameIdCodec extends MessageToMessageCodec<ByteBuf, BedrockBatchWrapper> { | ||
public static final String NAME = "frame-id-codec"; | ||
|
||
@Override | ||
protected void encode(ChannelHandlerContext ctx, BedrockBatchWrapper msg, List<Object> out) throws Exception { | ||
out.add(msg.getCompressed().retain()); | ||
} | ||
|
||
@Override | ||
protected void decode(ChannelHandlerContext ctx, ByteBuf msg, List<Object> out) throws Exception { | ||
out.add(BedrockBatchWrapper.newInstance(msg.readRetainedSlice(msg.readableBytes()), null)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
src/main/java/org/nethergames/proxytransport/utils/CompressionType.java
This file was deleted.
Oops, something went wrong.