mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-22 18:32:29 +01:00
hmm
This commit is contained in:
parent
2453c2e73d
commit
2779233117
@ -22,18 +22,18 @@ export class Server {
|
||||
});
|
||||
}
|
||||
|
||||
this.server.on("upgrade", (request, socket, head) => {
|
||||
if (!request.url?.includes("voice")) return;
|
||||
this.ws.handleUpgrade(request, socket, head, (socket) => {
|
||||
// @ts-ignore
|
||||
socket.server = this;
|
||||
this.ws.emit("connection", socket, request);
|
||||
});
|
||||
});
|
||||
// this.server.on("upgrade", (request, socket, head) => {
|
||||
// if (!request.url?.includes("voice")) return;
|
||||
// this.ws.handleUpgrade(request, socket, head, (socket) => {
|
||||
// // @ts-ignore
|
||||
// socket.server = this;
|
||||
// this.ws.emit("connection", socket, request);
|
||||
// });
|
||||
// });
|
||||
|
||||
this.ws = new ws.Server({
|
||||
maxPayload: 1024 * 1024 * 100,
|
||||
noServer: true
|
||||
server: this.server,
|
||||
});
|
||||
this.ws.on("connection", Connection);
|
||||
this.ws.on("error", console.error);
|
||||
|
Loading…
Reference in New Issue
Block a user