On Aug 11, 2011, at 7:43 PM, exar...@twistedmatrix.com wrote:

> This will always be a somewhat unreliable way to test a remote process's 
> handling of packetization, since there are still two TCP/IP stacks which 
> can mess around with the data in a variety of ways, but it's as good as 
> you can do if you want to use normal sockets for this testing.

This bears repeating.  It's really unreliable.  Really.  The sizes of buffers 
passed to send() and recv() bear only a coincidental resemblance to each other; 
one test setup may reproduce them reliably when the next will suddenly behave 
completely differently.  If you want even a reasonably reliable heuristic here, 
you need to send() and then introduce a delay.  You can do this without your 
own IWriteDescriptor implementation though; just implement an ITransport that 
does its write() by breaking things up and then calling the underlying write() 
with callLater()s in-between.

-glyph
_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to