From dbc507900c8874687c92785dee632611a93dada2 Mon Sep 17 00:00:00 2001 From: Max Litruv Boonzaayer Date: Fri, 26 Apr 2019 03:49:51 +1000 Subject: [PATCH] more wss testing --- .gitignore | 2 ++ plugins/wss.js | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d71c927..b0640bc 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ googleapi\.json setup.json merged.mp3 output.mp3 +privkey.pem +cert.pem diff --git a/plugins/wss.js b/plugins/wss.js index a927f43..a396a4a 100644 --- a/plugins/wss.js +++ b/plugins/wss.js @@ -18,14 +18,16 @@ module.exports = { wss.on('connection', function connection(ws) { ws.on('message', function incoming(message) { - console.log('received: %s', message); + if (message == "name") + ws.send({ name: dclient.user.username }) ws.send(`something ${message}`); }); + ws.send('something'); }); - server.listen(8080, "0.0.0.0"); + server.listen(8080); } } \ No newline at end of file