Advertisement
Guest User

Untitled

a guest
Feb 9th, 2012
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. (function() {
  2. var io;
  3. io = require('socket.io').listen(4000);
  4. io.sockets.on('connection', function(socket) {
  5. socket.on('drawClick', function(data) {
  6. socket.broadcast.emit('draw', {
  7. x: data.x,
  8. y: data.y,
  9. type: data.type
  10. });
  11. });
  12. });
  13. }).call(this);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement