Objects of the role.manager class
The instances of role.manager class have the following
methods:
- send_and_receive(req[, dst])
-
Attempt to send request data item req (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(req, [dst])
-
Attempt to send request data req (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 (rsp, src) where
rsp is server's 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 role.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 request re-transmissions. The retries
attribute is of integer type.
The default is 3 retries.
Need help? Try PySNMP mailing lists.
|