refactor: optimize websocket server

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2021-03-26 16:42:02 +08:00
parent 784ea2d65a
commit 6fd7174ca5
6 changed files with 60 additions and 8 deletions

View File

@@ -4,6 +4,7 @@ export abstract class WebSocketHandlerAdapter {
private _Handler
constructor() {
let ChannelInboundHandlerAdapterImpl = Java.extend(ChannelInboundHandlerAdapter, {
isSharable: () => true,
channelRead: this.channelRead.bind(this),
channelInactive: this.channelInactive.bind(this),
channelUnregistered: this.exceptionCaught.bind(this),