fix: listener proxy

This commit is contained in:
linyuchen
2024-04-27 17:04:53 +08:00
parent bc2da8a645
commit e3a8285f6c
7 changed files with 32 additions and 15 deletions

View File

@@ -27,12 +27,14 @@ export class WebsocketServerBase {
constructor() {
}
start(port: number) {
start(port: number, host: string = '') {
try {
this.ws = new WebSocketServer({
port ,
host: '',
maxPayload: 1024 * 1024 * 1024
});
log(`ws服务启动成功, ${host}:${port}`);
} catch (e: any) {
throw Error('ws服务启动失败, ' + e.toString());
}