mirror of
https://github.com/litruv/DAdmin.git
synced 2026-07-24 02:36:11 +10:00
more wss testing
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -6,3 +6,5 @@ googleapi\.json
|
|||||||
setup.json
|
setup.json
|
||||||
merged.mp3
|
merged.mp3
|
||||||
output.mp3
|
output.mp3
|
||||||
|
privkey.pem
|
||||||
|
cert.pem
|
||||||
|
|||||||
@@ -18,14 +18,16 @@ module.exports = {
|
|||||||
|
|
||||||
wss.on('connection', function connection(ws) {
|
wss.on('connection', function connection(ws) {
|
||||||
ws.on('message', function incoming(message) {
|
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 ${message}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
ws.send('something');
|
ws.send('something');
|
||||||
});
|
});
|
||||||
|
|
||||||
server.listen(8080, "0.0.0.0");
|
server.listen(8080);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user