Updated the socket.io code to work with socket.io 1.0