Re: [Twisted-Python] Setting socket options before connect

2013-07-12 Thread exarkun
On 10:42 am, p.may...@imperial.ac.uk wrote: On 12/07/13 11:34, Itamar Turner-Trauring wrote: Subclass twisted.internet.tcp.Client, override createInternetSocket() so it calls setsockopt() on the socket after you've called base implementation to create it. This breaks some abstraction boundaries

Re: [Twisted-Python] Setting socket options before connect

2013-07-12 Thread Phil Mayers
On 12/07/13 11:34, Itamar Turner-Trauring wrote: Subclass twisted.internet.tcp.Client, override createInternetSocket() so it calls setsockopt() on the socket after you've called base implementation to create it. This breaks some abstraction boundaries, so it isn't great, but very little code dupl

Re: [Twisted-Python] Setting socket options before connect

2013-07-12 Thread Itamar Turner-Trauring
Subclass twisted.internet.tcp.Client, override createInternetSocket() so it calls setsockopt() on the socket after you've called base implementation to create it. This breaks some abstraction boundaries, so it isn't great, but very little code duplication is involved. -- Itamar Turner-Trauring, F

[Twisted-Python] Setting socket options before connect

2013-07-12 Thread Phil Mayers
I have a use case (namely setting the Linux-specific SO_MARK socket option) where I need to set the socket option after the socket object is created but before Twisted starts to try and connect. Is there a clean way to do this? Ideally there would be some sort of pre-connect function, similar

Re: [Twisted-Python] Twisted web, giant-file POST forwarding and early bail-out.

2013-07-12 Thread Michael Schlenker
Am 09.07.2013 13:40, schrieb Itamar Turner-Trauring: > On 07/09/2013 07:30 AM, Itamar Turner-Trauring wrote: >> HTTP clients can send a "Expects: 100-continue" header (or something >> like that), which tells the server it should give an early rejection >> or acceptance before the client sends the d