twisted.protocols.test.test_basic.RecvdAttributeMixin(object)
class documentationtwisted.protocols.test.test_basic
(View In Hierarchy)
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. |
Return data
prefixed with message length in
protocol.structFormat
form.
In stringReceived, recvd contains the remaining data that was passed to dataReceived that was not part of the current message.
In stringReceived, if recvd is changed, messages should be parsed from it rather than the input to dataReceived.
Data already parsed by IntNStringReceiver.dataReceived
is not reparsed if stringReceived
consumes some of the
IntNStringReceiver.recvd
buffer.
The IntNStringReceiver.recvd
buffer contains all data not
yet processed by IntNStringReceiver.dataReceived
if the lengthLimitExceeded
event occurs.