perf: 优化性能
This commit is contained in:
@@ -13,10 +13,6 @@ import org.slf4j.LoggerFactory;
|
||||
public class BallServerChannelHandler extends SimpleChannelInboundHandler<String> {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger("BallServerChannelHandler");
|
||||
|
||||
public BallServerChannelHandler() {
|
||||
super(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext context, String message) {
|
||||
if ("ping".equals(message)) {
|
||||
|
@@ -24,9 +24,6 @@ public class BallServerChannelInitializer extends ChannelInitializer<SocketChann
|
||||
public static final List<Channel> CHANNELS = new ArrayList<>();
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger("BallServerChannelInitializer");
|
||||
|
||||
public BallServerChannelInitializer() {
|
||||
}
|
||||
|
||||
public static void broadcastMessage(BallMessageInfo messageInfo) {
|
||||
String string = messageInfo.toString();
|
||||
synchronized (CHANNELS) {
|
||||
|
@@ -11,10 +11,6 @@ import org.slf4j.LoggerFactory;
|
||||
public class BallServerKeepAliveHandler extends SimpleUserEventChannelHandler<IdleStateEvent> {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger("BallServerKeepAliveHandler");
|
||||
|
||||
public BallServerKeepAliveHandler() {
|
||||
super(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void eventReceived(ChannelHandlerContext context, IdleStateEvent event) {
|
||||
context.close();
|
||||
|
Reference in New Issue
Block a user