Google

LINK="#0000bb" VLINK="#551a8b" ALINK="#ff0000">

Objects of the manager class

The following methods are defined to instances of the manager class:

dispatch()

Attempt to send out pending requests (previously committed to class instance as list members), wait for replies for manager.timeout seconds and receive those arrived in time.

This method replaces request data with response counterpart in list element tuple.

Timed out requests would be represented by a None value of data tuple member on answer.

clear()

Drop the list elements. This method should be invoked before re-using the same instance of manager class.

The following methods comprise standard list interface:

append((dst, data, ctx))

Append request tuple (dst, data, ctx) to the list of requests.

This method can not be used after the manager.dispatch() is invoked and the manager.clear() method is used.

insert(idx, (dst, data, ctx))
__setitem__(idx, (dst, data, ctx))

Insert request tuple (dst, data, ctx) at list position idx (integer).

This method can not be used after the manager.dispatch() is invoked and the manager.clear() method is used.

remove((dst, data, ctx))

Remove the first occurrence of the (dst, data, ctx) request tuple.

This method can not be used after the manager.dispatch() is invoked and the manager.clear() method is used.

pop([idx])

Remove from list and return request tuple item at index idx (default last).

__getitem__(idx)

Return request tuple item at index idx.

count((dst, data, ctx))

Return number of occurrences of request tuple (dst, data) in the list.

index((dst, data, ctx))

Return index of first occurrence of request tuple (dst, data, ctx) in the list.

This method can not be used after the manager.dispatch() is invoked and the manager.clear() method is used.

Objects of the manager class have the following public instance variables:

timeout

Specify for how many seconds to wait for response from remote servers. The timeout attribute is of floating point type.

The default is 1.0 second.

retries

Specify the number of request re-transmissions. The retries attribute is of integer type.

The default is 3 retries.


ilya@glas.net