Migrating to uWS

This commit is contained in:
David Négrier 2020-09-28 18:52:54 +02:00
parent 783d58d3cb
commit 6a4c0c8678
31 changed files with 2056 additions and 1123 deletions

View file

@ -1,9 +1,14 @@
import {Connection} from "../front/src/Connection";
import * as WebSocket from "ws"
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
Connection.setWebsocketFactory((url: string) => {
return new WebSocket(url);
});
async function startOneUser(): Promise<void> {
const connection = await Connection.createConnection('foo', ['male3']);