[Twisted-Python] dataReveived() buffer best practice?
exarkun at twistedmatrix.com
exarkun at twistedmatrix.com
Thu Oct 6 15:06:35 MDT 2011
On 04:22 pm, fabian.rothfuchs at googlemail.com wrote:
>Hey there,
>
>I'm currently implementing a Telnet Client, which is actually talking
>to a
>Console Server mapping Telnet to an RS232 interface.
>
>[snip]
>
>and this is the result:
>#------
>drudge:Desktop rothfuchs$ p s12.py
>received:
>>
>
>received: MM
>USE
>
>received: RID:
>#------
>
>I also ran a tcpdump to confirm The opposite server is obviously
>pushing
>content to the socket in arbitrary frequencies, ending up in my
>dataReceived() method to get called arbitrarily as well.
This is not so obvious. Any hop along the route may fragment the data.
>My question: is there any best practice for buffer techniques here?
This question is too vague. What problem are you trying to solve?
Jean-Paul
More information about the Twisted-Python
mailing list