Re: [Twisted-Python] Flush socket

2011-08-12 Thread Tobias Oberstein
__': factory = TricklingServerFactory() reactor.listenTCP(9000, factory) reactor.run() Von: twisted-python-boun...@twistedmatrix.com [mailto:twisted-python-boun...@twistedmatrix.com] Im Auftrag von Glyph Lefkowitz Gesendet: Freitag, 12. August 2011 06:06 An: Twisted general discussion Bet

Re: [Twisted-Python] Flush socket

2011-08-12 Thread Tobias Oberstein
> 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 mor

Re: [Twisted-Python] Flush socket

2011-08-12 Thread Tobias Oberstein
> > I do already disable Nagle by setting TCP NoDelay. > > > > And I do a reactor.select(0), which sometimes breaks I guess because > > of reactor reentry not expected, and it will break when the reactor is > > not select() based I guess. > > > > So the question is: is there an alternative to react

Re: [Twisted-Python] Flush socket

2011-08-11 Thread Glyph Lefkowitz
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

Re: [Twisted-Python] Flush socket

2011-08-11 Thread exarkun
On 09:54 pm, tobias.oberst...@tavendo.de wrote: >sorry, my question wasn't clear: > >I do already disable Nagle by setting TCP NoDelay. > >And I do a reactor.select(0), which sometimes breaks I guess >because of reactor reentry not expected, and it will break >when the reactor is not select() based

Re: [Twisted-Python] Flush socket

2011-08-11 Thread Itamar Turner-Trauring
> but again, the OS will split > things up across TCP packets however you want. That should read "however *it* wants". ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] Flush socket

2011-08-11 Thread Itamar Turner-Trauring
> sorry, my question wasn't clear: > > I do already disable Nagle by setting TCP NoDelay. > > And I do a reactor.select(0), which sometimes breaks I guess > because of reactor reentry not expected, and it will break > when the reactor is not select() based I guess. > > So the question is: is there

Re: [Twisted-Python] Flush socket

2011-08-11 Thread Tobias Oberstein
sorry, my question wasn't clear: I do already disable Nagle by setting TCP NoDelay. And I do a reactor.select(0), which sometimes breaks I guess because of reactor reentry not expected, and it will break when the reactor is not select() based I guess. So the question is: is there an alternative

Re: [Twisted-Python] Flush socket

2011-08-11 Thread Itamar Turner-Trauring
> so there is no Twisted sanctioned (reactor independent and reentry safe) > alternative to disable nagle (tcp nodelay) and doing a select()? You can disable nagle in Twisted, if that's the question (transport.setTcpNoDelay(True)). But you can't determine TCP packet size, that's up to the operatin

Re: [Twisted-Python] Flush socket

2011-08-11 Thread Tobias Oberstein
yes. for FF and Chrome, and other WebSockets clients On 11.08.11 23:40, "Christopher Armstrong" wrote: On Thu, Aug 11, 2011 at 5:18 PM, Tobias Oberstein wrote: well, it does not necessarily correspond, but from what I see on tcpdump with loopback device and on LAN (with TCP NoDelay set), it p

Re: [Twisted-Python] Flush socket

2011-08-11 Thread Christopher Armstrong
On Thu, Aug 11, 2011 at 5:18 PM, Tobias Oberstein < tobias.oberst...@tavendo.de> wrote: > well, it does not necessarily correspond, but from what I see on tcpdump > with > loopback device and on LAN (with TCP NoDelay set), it practically works. > > the problem with your suggestion: I want to test

Re: [Twisted-Python] Flush socket

2011-08-11 Thread Tobias Oberstein
so there is no Twisted sanctioned (reactor independent and reentry safe) alternative to disable nagle (tcp nodelay) and doing a select()? ps: to give an example of how that was at least practically useful in what i try to do .. and not only blabbing away: http://www.tavendo.de/autobahn/testsuit

Re: [Twisted-Python] Flush socket

2011-08-11 Thread Tobias Oberstein
well, it does not necessarily correspond, but from what I see on tcpdump with loopback device and on LAN (with TCP NoDelay set), it practically works. the problem with your suggestion: I want to test the other end .. and that is not Twisted (its i.e. Firefox .. the protocol to test is WebSockets)

Re: [Twisted-Python] Flush socket

2011-08-11 Thread Christopher Armstrong
On Thu, Aug 11, 2011 at 5:06 PM, Tobias Oberstein < tobias.oberst...@tavendo.de> wrote: > For testing implementations of a TCP-based protocol, I am testing > if an implementation is agnostic wrt to in what chops in receives > octets from the wire ("stream clean"). > > To do that, I force out octet