[Twisted-Python] Flush socket
tobias.oberstein at tavendo.de
Fri Aug 12 08:52:36 EDT 2011
> 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.
> A more reliable way might be to synthesize the IP datagrams yourself, and
> inject them into the recipient's TCP/IP stack. Or skip the TCP/IP stack and
Ok, I see. Thats wicked. I don't feel ready to go that far though .. would be
probably a multi-week project.
Perhaps there is a network testing tool which receives TCP on one leg and
trickles out octets (by varying/random amounts) on a forwarding leg to the receiver?
Kind of "trickling" TCP forwarder to test stream cleanness of endpoints
implementing some TCP based protocol .. is there something?
> inject them into the recipient process directly, by replacing the BSD socket
> APIs with an alternate implementation you control (perhaps using an
> LD_PRELOAD hook, for example).
Sounds less work than above ..
> Twisted doesn't offer much in the way of assistance for those latter
> approaches, though.
.. I see. Both would require more or less tricky stuff to be created
outside Python/Twisted and take significant (for me) efforts.
More information about the Twisted-Python