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

Objects of the role.manager class

The instances of manager class have the following methods:

send_and_receive(question[, dst])

Attempt to send request data item question (string) to remote server by either dst address (given in socket module notation), if specified, or default destination whenever given on manager class instaniation, and receive a response. Raise an error.NoResponse exception if no response arrived within manager.timeout seconds.

Return server reply as string.

open()

Create optionally connected socket object to be used for communication with remote server process.

Return socket object.

send(question, [dst])

Attempt to send request data question (string) to remote server by either dst address (given in socket module notation), if specified, or default destination whenever given on manager class instaniation.

receive()

Wait for server response for manager.timeout seconds and raise an error.NoResponse exception if no response arrived in time.

Return a tuple of (answer, src) where answer is server response (string) and src is server's address (in socket module notation).

close()

Terminate communication with server and release all associated resources.

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

timeout

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

The default is 1.0 second.

retries

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

The default is 3 retries.


ilya@glas.net