mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
update 电单车协议
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.jsowell.netty.server;
|
||||
|
||||
import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.netty.server.electricbicycles.ElectricBicyclesServerChannelInitializer;
|
||||
import com.jsowell.netty.server.mqtt.BootNettyMqttChannelInboundHandler;
|
||||
import com.jsowell.netty.server.yunkuaichong.NettyServerChannelInitializer;
|
||||
import io.netty.bootstrap.ServerBootstrap;
|
||||
@@ -28,6 +29,9 @@ public class NettyServerManager implements CommandLineRunner {
|
||||
@Resource
|
||||
private NettyServerChannelInitializer nettyServerChannelInitializer;
|
||||
|
||||
@Resource
|
||||
private ElectricBicyclesServerChannelInitializer electricBicyclesServerChannelInitializer;
|
||||
|
||||
@Override
|
||||
public void run(String... args) throws Exception {
|
||||
startNettyServer(Constants.SOCKET_IP, 9011);
|
||||
@@ -82,7 +86,7 @@ public class NettyServerManager implements CommandLineRunner {
|
||||
.option(ChannelOption.SO_REUSEADDR, true)
|
||||
.childOption(ChannelOption.SO_KEEPALIVE, true)
|
||||
.childOption(ChannelOption.SO_REUSEADDR, true)
|
||||
.childHandler(nettyServerChannelInitializer)
|
||||
.childHandler(electricBicyclesServerChannelInitializer)
|
||||
.localAddress(new InetSocketAddress(host, port));
|
||||
|
||||
ChannelFuture future = bootstrap.bind(port).sync();
|
||||
|
||||
Reference in New Issue
Block a user