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

2013-07-18 Thread Phil Mayers
On 17/07/13 18:44, Glyph wrote: Anyhow, I think this certainly means a ticket should be filed for introducing some API - but it seems that a little more discussion about what the API should be will still be necessary. Agreed. But then, it's been a couple days and nobody else has contributed t

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

2013-07-18 Thread exarkun
On 10:27 am, p.may...@imperial.ac.uk wrote: On 17/07/13 18:44, Glyph wrote: Anyhow, I think this certainly means a ticket should be filed for introducing some API - but it seems that a little more discussion about what the API should be will still be necessary. Agreed. But then, it's been a c

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

2013-07-18 Thread Phil Mayers
On 18/07/13 13:10, exar...@twistedmatrix.com wrote: It wasn't so much an API as a "Hey, I have an idea... endpoints... here is an example I can think of in 10 seconds." :) Understood! I guess it might be ok if there was a way to reliably inject unknown options with arbitrary payloads, but I'

[Twisted-Python] Best way to trigger a future connection with data

2013-07-18 Thread Nick Johnson
Hi, I'm porting some code to twisted and got a little stuck. The current (non-twisted) code connects to a server, gives it some data (a job to do), gets a job-id and then terminates the connection. Sometime later, it reconnects and gets the output using the job-id. I've a factory and protocol set

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

2013-07-18 Thread exarkun
On 01:09 pm, p.may...@imperial.ac.uk wrote: On 18/07/13 13:10, exar...@twistedmatrix.com wrote: I prefer the approach taken elsewhere in Twisted, where a particular option is given some consideration and an API that understands the option is introduced. This approach certainly has its shortcomi

Re: [Twisted-Python] SQL ORM for Twisted & PostgreSQL?

2013-07-18 Thread Glyph
On Jul 17, 2013, at 5:04 PM, Jeffrey Ollie wrote: > I know that this has been asked before, but it's been a while and I'm > hoping for some good news. Is there a SQL ORM that works well with > Twisted and PostgreSQL? In particular I'm hoping to find something > that works with txpostgres as th

Re: [Twisted-Python] Best way to trigger a future connection with data

2013-07-18 Thread Laurens Van Houtven
Hi Nick, You're pretty much there already. Instantiate a ClientFactory that holds all the necessary state. By default, your protocol will have access to that state through its factory attribute (unless you override the Factory's buildProtocol method). cheers lvh __

[Twisted-Python] SQL ORM for Twisted & PostgreSQL

2013-07-18 Thread Matt Haggard
> On Jul 17, 2013, at 5:04 PM, Jeffrey Ollie wrote: > > > I know that this has been asked before, but it's been a while and I'm > > hoping for some good news. Is there a SQL ORM that works well with > > Twisted and PostgreSQL? In particular I'm hoping to find something > > that works with txpos