Received: from eggs.gnu.org ([2001:4830:134:3::10]:56579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btWoY-0002fO-TJ for qemu-devel@nongnu.org; Mon, 10 Oct 2016 05:24:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1btWoW-0003ag-Mg for qemu-devel@nongnu.org; Mon, 10 Oct 2016 05:24:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37216) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btWoW-0003a2-G1 for qemu-devel@nongnu.org; Mon, 10 Oct 2016 05:24:04 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 108144E03F for ; Mon, 10 Oct 2016 09:24:04 +0000 (UTC) From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Mon, 10 Oct 2016 13:22:53 +0400 Message-Id: <20161010092301.14974-17-marcandre.lureau@redhat.com> In-Reply-To: <20161010092301.14974-1-marcandre.lureau@redhat.com> References: <20161010092301.14974-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 16/24] qmp: update qmp-spec about async capability List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: eblake@redhat.com, berrange@redhat.com, armbru@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Signed-off-by: Marc-Andr=C3=A9 Lureau --- docs/qmp-spec.txt | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/docs/qmp-spec.txt b/docs/qmp-spec.txt index f8b5356..a40706e 100644 --- a/docs/qmp-spec.txt +++ b/docs/qmp-spec.txt @@ -83,9 +83,32 @@ The greeting message format is: 2.2.1 Capabilities ------------------ =20 -As of the date this document was last revised, no server or client -capability strings have been defined. +- "async" =20 +This capability indicates that the server can handle async commands. +An async command is a regular message request with the "id" member +mandatory (see 2.3), but the reply may be delayed. + +The client should match the incoming replies with the "id" member +associated with the requests. + +If both the server and the client have the "async" capability, the +client is allowed to make requests while previous async requests are +pending. The responses may come out of order. + +If the client doesn't have the "async" capability, it may still call +an async command, and make multiple outstanding calls. In this case, +the commands are processed in order, so the replies will also be in +order (pipelining). + +When a client is disconnected, the pending commands are not +necessarily canceled. But the future clients will not get replies +from commands they didn't make (they might receive side-effects +events). + +Note that even without "async", a client may receive events from the +server between a request and its reply, and must thus be prepared to +handle it. =20 2.3 Issuing Commands -------------------- --=20 2.10.0