mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-10 00:48:12 +08:00
update 电单车协议
This commit is contained in:
@@ -15,7 +15,7 @@ import java.util.concurrent.TimeUnit;
|
|||||||
public class ElectricBicyclesServerChannelInitializer extends ChannelInitializer<SocketChannel> {
|
public class ElectricBicyclesServerChannelInitializer extends ChannelInitializer<SocketChannel> {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
ElectricBicyclesServerHandler nettyServerHandler;
|
ElectricBicyclesServerHandler electricBicyclesServerHandler;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initChannel(SocketChannel channel) throws Exception {
|
protected void initChannel(SocketChannel channel) throws Exception {
|
||||||
@@ -26,7 +26,7 @@ public class ElectricBicyclesServerChannelInitializer extends ChannelInitializer
|
|||||||
pipeline.addLast("encoder", new ByteArrayDecoder());
|
pipeline.addLast("encoder", new ByteArrayDecoder());
|
||||||
//读超时时间设置为10s,0表示不监控
|
//读超时时间设置为10s,0表示不监控
|
||||||
pipeline.addLast(new IdleStateHandler(60, 0, 0, TimeUnit.SECONDS));
|
pipeline.addLast(new IdleStateHandler(60, 0, 0, TimeUnit.SECONDS));
|
||||||
pipeline.addLast("handler", nettyServerHandler);
|
pipeline.addLast("handler", electricBicyclesServerHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user