io.connect('/your_namespace', {query: "namespace=your_namespace"})
io.configure(function (){
io.set('authorization', function (handshakeData, callback) {
// custom namespace validation
handshakeData.namespace = handshakeData.query["namespace"],;
callback(null, true);
});
});