mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
使用ChannelHandlerContext
This commit is contained in:
@@ -92,7 +92,7 @@ public class ElectricBicyclesServerHandler extends ChannelInboundHandlerAdapter
|
||||
}
|
||||
|
||||
// 处理数据
|
||||
byte[] response = ykcService.process(msg, channel);
|
||||
byte[] response = ykcService.process(msg, ctx);
|
||||
if (Objects.nonNull(response)) {
|
||||
// 响应客户端
|
||||
ByteBuf buffer = ctx.alloc().buffer().writeBytes(response);
|
||||
|
||||
@@ -92,7 +92,7 @@ public class NettyServerHandler extends SimpleChannelInboundHandler {
|
||||
}
|
||||
|
||||
// 处理数据
|
||||
byte[] response = ykcService.process(msg, channel);
|
||||
byte[] response = ykcService.process(msg, ctx);
|
||||
if (Objects.nonNull(response)) {
|
||||
// 响应客户端
|
||||
ByteBuf buffer = ctx.alloc().buffer().writeBytes(response);
|
||||
|
||||
Reference in New Issue
Block a user