Known subclasses: twisted.protocols.test.test_basic.Int16Tests, twisted.protocols.test.test_basic.Int32Tests, twisted.protocols.test.test_basic.Int8Tests

Mixin defining tests for string receiving protocols with a recvd attribute which should be settable by application code, to be combined with IntNTestCaseMixin on a TestCase subclass

Method makeMessage Return data prefixed with message length in protocol.structFormat form.
Method test_recvdContainsRemainingData In stringReceived, recvd contains the remaining data that was passed to dataReceived that was not part of the current message.
Method test_recvdChanged In stringReceived, if recvd is changed, messages should be parsed from it rather than the input to dataReceived.
Method test_switching Data already parsed by IntNStringReceiver.dataReceived is not reparsed if stringReceived consumes some of the IntNStringReceiver.recvd buffer.
Method test_recvdInLengthLimitExceeded The IntNStringReceiver.recvd buffer contains all data not yet processed by IntNStringReceiver.dataReceived if the lengthLimitExceeded event occurs.
def makeMessage(self, protocol, data):

Return data prefixed with message length in protocol.structFormat form.

def test_recvdContainsRemainingData(self):

In stringReceived, recvd contains the remaining data that was passed to dataReceived that was not part of the current message.

def test_recvdChanged(self):

In stringReceived, if recvd is changed, messages should be parsed from it rather than the input to dataReceived.

def test_switching(self):

Data already parsed by IntNStringReceiver.dataReceived is not reparsed if stringReceived consumes some of the IntNStringReceiver.recvd buffer.

def test_recvdInLengthLimitExceeded(self):

The IntNStringReceiver.recvd buffer contains all data not yet processed by IntNStringReceiver.dataReceived if the lengthLimitExceeded event occurs.

API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.