fix: listener proxy

This commit is contained in:
linyuchen committed 2024-04-27 17:04:53 +08:00
1 parent 768cef648d
commit c9b47b41e6
7 files changed
+32 -15

No files matched your search

+3 -1
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());
}