Make websockets benchmarkable

This commit is contained in:
Alex Hultman 2018-12-26 15:23:14 +01:00
parent 7fdba0bdbd
commit fb10ac9b61
3 changed files with 40 additions and 12 deletions

View file

@ -11,10 +11,10 @@ const app = uWS./*SSL*/App({
res.end('Hejdå!');
}).ws('/*', {
open: (ws, req) => {
console.log('hello websocket!');
console.log(ws);
},
message: () => {
console.log('message from websocket yo');
message: (ws, message) => {
ws.send(message);
}
}).listen(port, (token) => {
if (token) {