From c622abecdae4df7d6a7dae8a244c31c9fc380035 Mon Sep 17 00:00:00 2001 From: MiaoWoo Date: Thu, 14 May 2020 19:04:19 +0800 Subject: [PATCH] feat: optimize import Signed-off-by: MiaoWoo --- packages/websocket/src/server/websocket_handler.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/websocket/src/server/websocket_handler.ts b/packages/websocket/src/server/websocket_handler.ts index 886048f7..11f9d9f8 100644 --- a/packages/websocket/src/server/websocket_handler.ts +++ b/packages/websocket/src/server/websocket_handler.ts @@ -1,13 +1,10 @@ -import { EventEmitter } from 'events' - -import { Keys, ServerEvent } from './constants' -import { WebSocketHandlerAdapter } from "../netty" -import { HttpRequestHandler } from './httprequest' -import { TextWebSocketFrameHandler } from './text_websocket_frame' import { ServerOptions } from '../socket-io' +import { Keys, ServerEvent } from './constants' +import { HttpRequestHandler } from './httprequest' +import { WebSocketHandlerAdapter } from "../netty" +import { TextWebSocketFrameHandler } from './text_websocket_frame' const CharsetUtil = Java.type('io.netty.util.CharsetUtil') - const HttpServerCodec = Java.type('io.netty.handler.codec.http.HttpServerCodec') const ChunkedWriteHandler = Java.type('io.netty.handler.stream.ChunkedWriteHandler') const HttpObjectAggregator = Java.type('io.netty.handler.codec.http.HttpObjectAggregator')