From f89fabaf11c14a1d2f09741b23b8ed6efebb3e31 Mon Sep 17 00:00:00 2001 From: Zaxar163 Date: Fri, 27 Sep 2019 19:31:09 +0200 Subject: [PATCH] =?UTF-8?q?[FEATURE][EXP]=20=D0=92=D0=BE=D0=B7=D0=BC=D0=BE?= =?UTF-8?q?=D0=B6=D0=BD=D0=BE=D1=81=D1=82=D1=8C=20=D0=BE=D0=B1=D1=80=D0=B0?= =?UTF-8?q?=D0=B1=D0=B0=D1=82=D1=8B=D0=B2=D0=B0=D1=82=D1=8C=20=D1=81=D0=BE?= =?UTF-8?q?=D0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8=D1=8F=20WebSocket...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/pro/gravit/launchserver/socket/WebSocketService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java index 6749d352..ec7c74f6 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java @@ -37,6 +37,7 @@ public class WebSocketService { public final ChannelGroup channels; public static ProviderMap providers = new ProviderMap<>(); + public final BiHookSet packetHook = new BiHookSet<>(); public static class WebSocketRequestContext { public WebSocketServerResponse response; @@ -64,6 +65,7 @@ public WebSocketService(ChannelGroup channels, LaunchServer server) { private final Gson gson; public void process(ChannelHandlerContext ctx, TextWebSocketFrame frame, Client client, String ip) { + if (packetHook.hook(frame, ctx)) return; String request = frame.text(); WebSocketServerResponse response = gson.fromJson(request, WebSocketServerResponse.class); process(ctx, response, client, ip);