Replaced http api by socket.io api.