t.p.b.IntNStringReceiver(protocol.Protocol, _PauseableMixin) : class documentation

Part of twisted.protocols.basic View Source View In Hierarchy

Known subclasses: twisted.protocols.basic.Int16StringReceiver, twisted.protocols.basic.Int32StringReceiver, twisted.protocols.basic.Int8StringReceiver

Generic class for length prefixed protocols.
Instance Variablesrecvdbuffer holding received data when splitted. (type: str )
structFormatformat used for struct packing/unpacking. Define it in subclass. (type: str )
prefixLengthlength of the prefix, in bytes. Define it in subclass, using struct.calcSize(structFormat) (type: int )
Method stringReceived Override this.
Method dataReceived Convert int prefixed strings into calls to stringReceived.
Method sendString Send an prefixed string to the other end of the connection.

Inherited from Protocol:

Method connectionLost Called when the connection is shut down.

Inherited from BaseProtocol (via Protocol):

Method makeConnection Make a connection to a transport and a server.
Method connectionMade Called when a connection is made.

Inherited from _PauseableMixin:

Method pauseProducing Undocumented
Method resumeProducing Undocumented
Method stopProducing Undocumented
def stringReceived(self, msg): (source)
Override this.
def dataReceived(self, recd): (source)
Convert int prefixed strings into calls to stringReceived.
def sendString(self, data): (source)
Send an prefixed string to the other end of the connection.
Parametersdata (type: str )
API Documentation for Twisted, generated by pydoctor at 2011-10-27 15:57:47.