From 8935e7711873a20f999bd6a18aba7d070e81ec81 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 14 Mar 2013 19:49:31 +1100 Subject: [PATCH] Use the Netty byte array encoder now that it is fixed. --- .../net/md_5/bungee/netty/ByteArrayEncoder.java | 17 ----------------- .../net/md_5/bungee/netty/PipelineUtils.java | 1 + 2 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 proxy/src/main/java/net/md_5/bungee/netty/ByteArrayEncoder.java diff --git a/proxy/src/main/java/net/md_5/bungee/netty/ByteArrayEncoder.java b/proxy/src/main/java/net/md_5/bungee/netty/ByteArrayEncoder.java deleted file mode 100644 index acc264350..000000000 --- a/proxy/src/main/java/net/md_5/bungee/netty/ByteArrayEncoder.java +++ /dev/null @@ -1,17 +0,0 @@ -package net.md_5.bungee.netty; - -import io.netty.buffer.ByteBuf; -import io.netty.channel.ChannelHandler; -import io.netty.channel.ChannelHandlerContext; -import io.netty.handler.codec.MessageToByteEncoder; - -@ChannelHandler.Sharable -public class ByteArrayEncoder extends MessageToByteEncoder -{ - - @Override - protected void encode(ChannelHandlerContext ctx, byte[] msg, ByteBuf out) throws Exception - { - out.writeBytes( msg ); - } -} diff --git a/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java b/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java index 6c4a4980c..be42aa951 100644 --- a/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java +++ b/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java @@ -4,6 +4,7 @@ import io.netty.channel.Channel; import io.netty.channel.ChannelException; import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelOption; +import io.netty.handler.codec.bytes.ByteArrayEncoder; import io.netty.handler.timeout.ReadTimeoutHandler; import io.netty.util.AttributeKey; import java.util.concurrent.TimeUnit;