| Class | Requester | Abstract base class for an object that can issue requests on a smart |
| Class | SmartProtocolBase | Methods common to client and server |
| Class | SmartServerRequestProtocolOne | Server-side encoding and decoding logic for smart version 1. |
| Class | SmartServerRequestProtocolTwo | Version two of the server side of the smart protocol. |
| Class | ChunkedBodyDecoder | Decoder for chunked body data. |
| Class | LengthPrefixedBodyDecoder | Decodes the length-prefixed bulk data. |
| Class | SmartClientRequestProtocolOne | The client-side protocol for smart version 1. |
| Class | SmartClientRequestProtocolTwo | Version two of the client side of the smart protocol. |
| Function | build_server_protocol_three | Undocumented |
| Class | ProtocolThreeDecoder | Undocumented |
| Class | ProtocolThreeResponder | Undocumented |
| Class | ProtocolThreeRequester | No class docstring; 2/6 methods documented |
| Function | _recv_tuple | Undocumented |
| Function | _decode_tuple | Undocumented |
| Function | _encode_tuple | Encode the tuple args to a bytestream. |
| Function | _send_stream | Undocumented |
| Function | _send_chunks | Undocumented |
| Class | _NeedMoreBytes | Raise this inside a _StatefulDecoder to stop decoding until more bytes |
| Class | _StatefulDecoder | Base class for writing state machines to decode byte streams. |
| Class | _ProtocolThreeEncoder | No class docstring; 1/13 methods documented |
| Function | _iter_with_errors | Handle errors from iterable.next(). |
Use like:
for exc_info, value in _iter_with_errors(iterable):
...
This is a safer alternative to:
try:
for value in iterable:
...
except:
...
Because the latter will catch errors from the for-loop body, not just iterable.next()
If an error occurs, exc_info will be a exc_info tuple, and the generator will terminate. Otherwise exc_info will be None, and value will be the value from iterable.next(). Note that KeyboardInterrupt and SystemExit will not be itercepted.