hi i'm trying to make a collaborative canvas with socket.io, this is my server side code 

```
var sanitizer = require('validator').sanitize;
var app = require('express')();
var server = require('http').createServer(app);
var io = require('socket.io')(server),

chat = io.of('/chat'),
canvas = io.of('/canvas')
;

function sanitize(string) {
return sanitizer(string).entityDecode()
} 

app.get(/(^\/.*$)/, function(request, response) {
var fileName = request.params[0];
if (fileName == '/')
    fileName = '/index.html';
response.sendFile(__dirname + '/client' + fileName);
});

io.sockets.on('connection', function(socket) {
socket.on('setName', function (name) {
    name = sanitize(name);
    socket.set('name', name);
    socket.broadcast.emit('receive', {
        sender:'Server',
        message:name + ' has joined.'
    })
});

socket.on('send', function (message) {
    socket.get('name', function(error, name) {
        if (name)
            socket.broadcast.emit('receive', {
                sender:name,
                message:sanitize(message)
            })
    })
});

socket.on('draw', function (command) {
    io.sockets.emit('draw', command)
});

socket.on('updateCursor', function(position) {
    socket.get('name', function(error, name) {
        if (name)
            socket.broadcast.emit('updateCursor', {
                name:name,
                position:position
            });
    });
});

socket.on('disconnect', function() {
    socket.get('name', function(error, name) {
        if (name) {
            socket.broadcast.emit('receive', {
                sender:'Server',
                message:name + ' has left.'
            });
            socket.broadcast.emit('removeCursor', name);
        }
    })
});
});
server.listen(3000, function(){
console.log('listening on *:3000');
});

```

but when i try to run it on localhost:3000 my console log said this

```
C:\h>node server.js
listening on *:3000

events.js:72
    throw er; // Unhandled 'error' event
          ^
TypeError: Object #<Socket> has no method 'set'
  at Socket.<anonymous> (C:\h\server.js:26:16)
  at Socket.emit (events.js:95:17)
  at Socket.onevent (C:\h\node_modules\socket.io\lib\socket.js:327:8)
  at Socket.onpacket (C:\h\node_modules\socket.io\lib\socket.js:287:12)
  at Client.ondecoded (C:\h\node_modules\socket.io\lib\client.js:193:14)
  at Decoder.Emitter.emit (C:\h\node_modules\socket.io\node_modules\socket.io-
parser\node_modules\component-emitter\index.js:134:20)
  at Decoder.add (C:\h\node_modules\socket.io\node_modules\socket.io-parser\in
dex.js:247:12)
  at Client.ondata (C:\h\node_modules\socket.io\lib\client.js:175:18)
  at Socket.emit (events.js:95:17)
  at Socket.onPacket (C:\h\node_modules\socket.io\node_modules\engine.io\lib\s
ocket.js:99:14)

```

and my program terminated,
can anyone please help me with this? is anything wrong with my socket.io version?? im using socket.io version 1.2.1 

Thanks~