Updated socket.io server code to match socket.io v1 API changes.