|
@@ -6,7 +6,7 @@ import io.netty.channel.ChannelHandlerContext;
|
|
import io.netty.channel.ChannelPipeline;
|
|
import io.netty.channel.ChannelPipeline;
|
|
import io.netty.channel.SimpleChannelInboundHandler;
|
|
import io.netty.channel.SimpleChannelInboundHandler;
|
|
import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler.HandshakeComplete;
|
|
import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler.HandshakeComplete;
|
|
-import com.incubator.core.protocol.BinaryWebSocketFrameCodec;
|
|
|
|
|
|
+import com.incubator.core.protocol.WebSocketBinaryFrameCodec;
|
|
import com.incubator.core.protocol.MsgPackCodec;
|
|
import com.incubator.core.protocol.MsgPackCodec;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -44,7 +44,7 @@ public class WebSocketHandshakeHandler extends SimpleChannelInboundHandler<Objec
|
|
protected void webSocketHandComplete(ChannelHandlerContext ctx) {
|
|
protected void webSocketHandComplete(ChannelHandlerContext ctx) {
|
|
ChannelPipeline pipeline = ctx.pipeline();
|
|
ChannelPipeline pipeline = ctx.pipeline();
|
|
// 添加 WebSocketFrame 到 ByteBuf 的编解码器
|
|
// 添加 WebSocketFrame 到 ByteBuf 的编解码器
|
|
- pipeline.addLast(new BinaryWebSocketFrameCodec());
|
|
|
|
|
|
+ pipeline.addLast(new WebSocketBinaryFrameCodec());
|
|
// 添加 MsgPack 编解码器
|
|
// 添加 MsgPack 编解码器
|
|
pipeline.addLast(new MsgPackCodec());
|
|
pipeline.addLast(new MsgPackCodec());
|
|
// 添加业务逻辑处理器(例如处理消息转发等)
|
|
// 添加业务逻辑处理器(例如处理消息转发等)
|