[Twisted-Python] How to get the Python socket object for an TLS connection?
itamar at futurefoundries.com
Wed Dec 12 09:11:42 EST 2012
On Wed, Dec 12, 2012 at 8:22 AM, Michael Schlenker <msc at contact.de> wrote:
> i use twisted for some volume streaming over fat pipes (10 GE) and need
> to tweak the rcv and send buffer sizes when streaming via
> socket.setsockopt(). Otherwise Twisted spends lots of time calling the
> producer with tiny blocksizes and writing those tiny buffers to the tiny
> OS buffer. Speedup for streaming was around 40x when using a large
> buffer instead of default block and buffer sizes, so this is really needed.
> I'm using Twisted 12.2.
> It works fine when using reactor.listenTCP(), but fails when using
> reactor.listenSSL() because transport.getHandle() does not return a
> socket object in that case (i get some SSL.Connection object instead).
Probably the thing to do is listenTCP() rather than listenSSL(), and then:
Ideally, of course, Twisted would have an API for changing the
producer/consumer buffer sizes and corresponding OS buffers.
Itamar Turner-Trauring, Future Foundries LLC
http://futurefoundries.com/ — Twisted consulting, training and support.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-Python