Make websockets benchmarkable
This commit is contained in:
parent
7fdba0bdbd
commit
fb10ac9b61
3 changed files with 40 additions and 12 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue