Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function() {
- var io;
- io = require('socket.io').listen(4000);
- io.sockets.on('connection', function(socket) {
- socket.on('drawClick', function(data) {
- socket.broadcast.emit('draw', {
- x: data.x,
- y: data.y,
- type: data.type
- });
- });
- });
- }).call(this);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement