socket.io rewrite