class documentation
class MockProtocol(protocol.Protocol):
A sample Protocol which stores the data passed to it.
Method | connection |
Close the protocol and store the reason. |
Method | connection |
Set up the instance variables. If we have any packetData, send it along. |
Method | data |
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. |
Instance Variable | data |
a bytes of the data passed to us. |
Instance Variable | open |
True if the channel is open. |
Instance Variable | packet |
a bytes of data to be sent when the connection is made. |
Instance Variable | reason |
if not None, the reason the protocol was closed. |
Inherited from Protocol
:
Method | log |
Return a prefix matching the class name, to identify log messages related to this protocol instance. |
Class Variable | factory |
Undocumented |
Inherited from BaseProtocol
(via Protocol
):
Method | make |
Make a connection to a transport and a server. |
Instance Variable | connected |
Undocumented |
Instance Variable | transport |
Undocumented |