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:
@@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user