From b717ab0383abdb015d3338286f1deda40bd6bb6a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 12 Aug 2019 20:23:29 +0200 Subject: [PATCH] doc/protocol.rst: improve binary chunk description --- doc/protocol.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/protocol.rst b/doc/protocol.rst index c4ee57bcd..9c580259c 100644 --- a/doc/protocol.rst +++ b/doc/protocol.rst @@ -66,7 +66,16 @@ Binary Responses Some commands can return binary data. This is initiated by a line containing ``binary: 1234`` (followed as usual by a newline). After that, the specified number of bytes of binary data follows, then a -newline, and finally the ``OK`` line. Example:: +newline, and finally the ``OK`` line. + +If the object to be transmitted is large, the server may choose a +reasonable chunk size and transmit only a portion. Usually, the +response also contains a ``size`` line which specifies the total +(uncropped) size, and the command usually has a way to specify an +offset into the object; this way, the client can copy the whole file +without blocking the connection for too long. + +Example:: foo: bar binary: 42