Package Products :: Package ZenStatus :: Module ZenTcpClient :: Class ZenTcpTest
[hide private]
[frames] | no frames]

Class ZenTcpTest

source code

twisted.internet.protocol.BaseProtocol --+    
                                         |    
        twisted.internet.protocol.Protocol --+
                                             |
                                            ZenTcpTest

Twisted class to make a TCP/IP connection to a remote IP service and report back the result.

Instance Methods [hide private]
 
connectionMade(self)
Connected successfully to the remote device, now test against any regex that we might have and record the result.
source code
 
dataReceived(self, data)
Compare the data from the remote device to what we expect in the regex.
source code
 
expectTimeout(self)
Called if we timeout waiting for the service to connect or for receiving a response from the service that matches our regex.
source code
 
loseConnection(self)
Shut down the connection and cleanup.
source code

Inherited from twisted.internet.protocol.Protocol: connectionLost

Inherited from twisted.internet.protocol.BaseProtocol: makeConnection

Class Variables [hide private]
  defer = None
  data = ""

Inherited from twisted.internet.protocol.BaseProtocol: connected, transport

Method Details [hide private]

connectionMade(self)

source code 

Connected successfully to the remote device, now test against any regex that we might have and record the result.

Overrides: twisted.internet.protocol.BaseProtocol.connectionMade

dataReceived(self, data)

source code 

Compare the data from the remote device to what we expect in the regex.

Parameters:
  • data (string) - output from remote service
Overrides: twisted.internet.protocol.Protocol.dataReceived