From b60bdb72fa748ebc7fbe363df7b5e8ebd925514b Mon Sep 17 00:00:00 2001 From: Gravit Date: Mon, 1 Oct 2018 17:01:10 +0700 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D0=B1=D1=8B=D1=82=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../websocket/WebSocketFrameHandler.java | 10 ++------ .../socket/websocket/WebSocketService.java | 24 +++++++++++++++++-- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/WebSocketFrameHandler.java b/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/WebSocketFrameHandler.java index ec879c5a..ae007545 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/WebSocketFrameHandler.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/WebSocketFrameHandler.java @@ -1,26 +1,20 @@ package ru.gravit.launchserver.socket.websocket; -import com.google.gson.Gson; import com.google.gson.GsonBuilder; -import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.SimpleChannelInboundHandler; -import io.netty.channel.group.ChannelGroup; import io.netty.channel.group.DefaultChannelGroup; import io.netty.handler.codec.http.websocketx.TextWebSocketFrame; import io.netty.handler.codec.http.websocketx.WebSocketFrame; -import io.netty.util.AttributeKey; -import io.netty.util.AttributeMap; import io.netty.util.concurrent.GlobalEventExecutor; import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.socket.Client; import ru.gravit.utils.helper.IOHelper; import ru.gravit.utils.helper.LogHelper; public class WebSocketFrameHandler extends SimpleChannelInboundHandler { - public static final ChannelGroup channels = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE); public static LaunchServer server; public static GsonBuilder builder = new GsonBuilder(); - public static WebSocketService service = new WebSocketService(LaunchServer.server,builder); + public static WebSocketService service = new WebSocketService(new DefaultChannelGroup(GlobalEventExecutor.INSTANCE), LaunchServer.server,builder); private Client client; static { service.registerResponses(); @@ -29,7 +23,7 @@ public class WebSocketFrameHandler extends SimpleChannelInboundHandler