Use socket.io for communication with the client

Client should receive `error` and `update` events.