implementing latest comet and websocket response message formats