twisted.conch.test.test_session.MockProtocol(protocol.Protocol)
class documentationtwisted.conch.test.test_session
(View In Hierarchy)
A sample Protocol which stores the data passed to it.
Instance Variable | packetData | a bytes
of data to be sent when the connection is made. |
Instance Variable | data | a bytes
of the data passed to us. |
Instance Variable | open | True if the channel is open. |
Instance Variable | reason | if not None, the reason the protocol was closed. |
Method | connectionMade | Set up the instance variables. If we have any packetData, send it along. |
Method | dataReceived | Store the received data and write it back with a tilde appended. The tilde is appended so that the tests can verify that we processed the data. |
Method | connectionLost | Close the protocol and store the reason. |
Inherited from Protocol:
Method | logPrefix | Return a prefix matching the class name, to identify log messages related to this protocol instance. |
Inherited from BaseProtocol (via Protocol):
Method | makeConnection | Make a connection to a transport and a server. |
Store the received data and write it back with a tilde appended. The tilde is appended so that the tests can verify that we processed the data.