Trees | Indices | Help |
|
---|
|
Low-level transport class.
This is used on the client side.
This could be replaced by any other class that provides the same semantics to the Client. This means:
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
|
|||
|
|
Constructor for the Client class. There are two timeouts used since we might want to wait for a long time for a response, but the connect timeout should be lower. If not passed, we use a default of 10 and respectively 60 seconds. Note that on reading data, since the timeout applies to an invidual receive, it might be that the total duration is longer than timeout value passed (we make a hard limit at twice the read timeout).
|
Send a message. This just sends a message and doesn't wait for the response. |
Try to receive a message from the socket. In case we already have messages queued, we just return from the queue. Otherwise, we try to read data with a _rwtimeout network timeout, and making sure we don't go over 2x_rwtimeout as a global limit. |
Send a message and wait for the response. This is just a wrapper over Send and Recv. |
Calls a given function, retrying if it fails on a network IO exception. This allows to re-establish a broken connection and retry an IO operation. The function receives one an integer argument stating the current retry number, 0 being the first call, 1 being the first retry, 2 the second, and so on. If any exception occurs, on_error is invoked first with the exception given as an argument. Then, if the exception is a network exception, the function call is retried once more. |
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Aug 22 11:13:33 2016 | http://epydoc.sourceforge.net |