Part of bzrlib.smart.protocol View In Hierarchy
Known subclasses: bzrlib.smart.protocol.SmartClientRequestProtocolTwo
Method | __init__ | Construct a SmartClientRequestProtocolOne. |
Method | set_headers | Undocumented |
Method | call | Make a remote call. |
Method | call_with_body_bytes | Make a remote call of args with body bytes 'body'. |
Method | call_with_body_readv_array | Make a remote call with a readv array. |
Method | call_with_body_stream | Undocumented |
Method | cancel_read_body | After expecting a body, a response code may indicate one otherwise. |
Method | read_response_tuple | Read a response tuple from the wire. |
Method | read_body_bytes | Read bytes from the body, decoding into a byte stream. |
Method | query_version | Return protocol version number of the server. |
Method | _read_response_tuple | Undocumented |
Method | _raise_args_if_error | Undocumented |
Method | _response_is_unknown_method | Raise UnexpectedSmartServerResponse if the response is an 'unknonwn |
Method | _recv_tuple | Receive a tuple from the medium request. |
Method | _write_args | Undocumented |
Method | _write_protocol_version | Write any prefixes this protocol requires. |
Inherited from SmartProtocolBase:
Method | _encode_bulk_data | Encode body as a bulk data chunk. |
Method | _serialise_offsets | Serialise a readv offset list. |
Inherited from ResponseHandler:
Method | read_streamed_body | Returns an iterable that reads and returns a series of body chunks. |
Parameters | request | A SmartClientMediumRequest to serialise onto and deserialise from. |
Parameters | args | the arguments of this call. |
After calling this, call read_response_tuple to find the result out.
The body is encoded with one line per readv offset pair. The numbers in each pair are separated by a comma, and no trailing n is emitted.
This method lets the domain client inform the protocol that no body will be transmitted. This is a terminal method: after calling it the protocol is not able to be used further.
This should only be called once.
Parameters | response | The response from a smart client call_expecting_body call. |
verb | The verb used in that call. | |
Raises | UnexpectedSmartServerResponse |
We read all bytes at once to ensure we've checked the trailer for errors, and then feed the buffer back as read_body_bytes is called.
Version one doesn't send protocol versions.