Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var io = require('socket.io').listen(8000)
- io.sockets.on('connection', function (socket) {
- socket.emit('news', { hello: 'world' });
- socket.on('my other event', function (data) {
- console.log(data);
- });
- });
Add Comment
Please, Sign In to add comment