Package sysmon :: Module remote :: Class RemoteContact
[hide private]
[frames] | no frames]

Class RemoteContact

source code

Communicates with a remote machine.

Objects of this class may be used for communication with the remote machine. The necessary locking is handled automatically, so this class is thread-safe.

Instance Methods [hide private]
 
__init__(self, addr, port)
Connects to the remote machine.
source code
 
query(self, query)
Queries the remote machine.
source code
 
socket(self)
Returns the backing socket.
source code
 
lock(self)
Returns the backing lock.
source code
 
acquire(self)
Calls acquire on the backing lock.
source code
 
release(self)
Releases the backing lock.
source code
 
addr(self)
Returns the remote address in use.
source code
 
port(self)
Returns the remote port in use.
source code
Method Details [hide private]

query(self, query)

source code 

Queries the remote machine.

This method automatically handles the necessary locking to be thread-safe. Do NOT acquire this object's lock before calling this method - the method will block and never return.

socket(self)

source code 

Returns the backing socket.

Because using this socket erases the thread safety, this method should never be used.