update 电单车协议

This commit is contained in:
Guoqs
2024-07-16 15:00:45 +08:00
parent c3908e2ca9
commit f0e0bcc63f
2 changed files with 9 additions and 3 deletions

View File

@@ -26,8 +26,7 @@ public class ElectricBicyclesServerChannelInitializer extends ChannelInitializer
@Override
protected void initChannel(SocketChannel channel) throws Exception {
ChannelPipeline pipeline = channel.pipeline();
// pipeline.addLast("frameDecoder",new CustomDecoder());
pipeline.addLast("frameDecoder", new StartAndLengthFieldFrameDecoder());
pipeline.addLast("frameDecoder", new ChargingPileDecoder());
pipeline.addLast("decoder", new ByteArrayDecoder());
pipeline.addLast("encoder", new ByteArrayDecoder());
//读超时时间设置为10s0表示不监控