chore: token

This commit is contained in:
手瓜一十雪
2024-08-10 17:07:23 +08:00
parent b5d24d751d
commit 89188958ec
5 changed files with 14 additions and 12 deletions

View File

@@ -10,10 +10,11 @@ export class OB11PassiveWebSocketAdapter implements IOB11NetworkAdapter {
wsClientsMutex = new Mutex();
isOpen: boolean = false;
hasBeenClosed: boolean = false;
heartbeatInterval:number = 0;
private actionMap: Map<string, BaseAction<any, any>> = new Map();
constructor(ip: string, port: number, token: string) {
constructor(ip: string, port: number, heartbeatInterval: number, token: string) {
this.heartbeatInterval = heartbeatInterval;
this.wsServer = new WebSocketServer({ port: port, host: ip });
this.wsServer.on('connection', async (wsClient) => {
if (!this.isOpen) {