【fix】数据通信失败原因需要使用 ByteBuf格式 发送数据 ByteBuf realBuf = nextChannel.config().getAllocator().buffer(bytes.length);

realBuf.writeBytes(bytes);
This commit is contained in:
wujiawei
2024-09-17 20:41:42 +08:00
parent 4a7bdb366f
commit 2683bb4dee
9 changed files with 53 additions and 39 deletions

View File

@ -22,6 +22,11 @@ public class NettyClientVisitorRealHandler extends SimpleChannelInboundHandler<N
this.channelTypeAdapter = channelTypeAdapter;
}
@Override
public void channelActive(ChannelHandlerContext ctx) throws Exception {
super.channelActive(ctx);
}
@Override
public void channelRead0(ChannelHandlerContext ctx, NettyProxyMsg nettyProxyMsg) throws Exception {
Channel channel = ctx.channel();
@ -29,11 +34,6 @@ public class NettyClientVisitorRealHandler extends SimpleChannelInboundHandler<N
}
@Override
public void channelActive(ChannelHandlerContext ctx) throws Exception {
super.channelActive(ctx);
}
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {