今天才出现的情况,之前都没有出现过。。。
操作系统是 win10,用 android 作为连接前端,真机和虚拟机都有。
我猜测这是 win10 或者 android 上的哪个地方限制了,求大佬支招。。。。
netty 服务端的代码非常简单,虽然我认为肯定不是这里的问题,但是我也放出来了:
@PostConstruct
public void startServer() {
for(int i = 1; i <= 300; i++) playerMap.put(i, new Player());
for(int j = 1; j <= 100; j++) tableMap.put(j, new Table());
ServerBootstrap b = new ServerBootstrap();
b.group(boss, work)
.channel(NioServerSocketChannel.class)
.option(ChannelOption.SO_BACKLOG, 128)
.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 10 * 1000)
.childOption(ChannelOption.TCP_NODELAY, true)
.childHandler(this)
.bind(6789)
.addListener(new ChannelFutureListener() {
@Override
public void operationComplete(ChannelFuture future) throws Exception {
future.removeListener(this);
if(!future.isSuccess() && future.cause() != null) log.error("服务器绑定端口失败", future.cause());
if(future.isSuccess()) log.info("服务器绑定端口成功");
}
});
}
操作系统是 win10,用 android 作为连接前端,真机和虚拟机都有。
我猜测这是 win10 或者 android 上的哪个地方限制了,求大佬支招。。。。
netty 服务端的代码非常简单,虽然我认为肯定不是这里的问题,但是我也放出来了:
@PostConstruct
public void startServer() {
for(int i = 1; i <= 300; i++) playerMap.put(i, new Player());
for(int j = 1; j <= 100; j++) tableMap.put(j, new Table());
ServerBootstrap b = new ServerBootstrap();
b.group(boss, work)
.channel(NioServerSocketChannel.class)
.option(ChannelOption.SO_BACKLOG, 128)
.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 10 * 1000)
.childOption(ChannelOption.TCP_NODELAY, true)
.childHandler(this)
.bind(6789)
.addListener(new ChannelFutureListener() {
@Override
public void operationComplete(ChannelFuture future) throws Exception {
future.removeListener(this);
if(!future.isSuccess() && future.cause() != null) log.error("服务器绑定端口失败", future.cause());
if(future.isSuccess()) log.info("服务器绑定端口成功");
}
});
}
