[Twisted-Python] New client APIs

Andrew Bennetts andrew-twisted at puzzling.org
Sun Jul 28 09:06:58 MDT 2002


On Sat, Jul 27, 2002 at 07:26:29PM -0400, Itamar Shtull-Trauring wrote:
> 
> For example, FTP tests are failing right now, due to my not making the 

Ah, FTP failing again :)

FTP seems to be the Twisted canary -- it's always the first to break...

> backwards compatability code totally backwards compatible. This is fine by 
> me - the new API is much nicer and will make everyone's life easier, so 
> it's not worth the time making the old API work exactly the same.
> 
> Documentation can be found by looking at:
> IConnector, protocol.ClientFactory, IReactorTCP.connectTCP

I've taken a look at the documentation, but I'm not certain of the best way
to proceed to fix FTP.

FTP doesn't want any sort of reconnection funny-business going on.  If the
data connection fails, I just want to know about that and send an error
message, rather than do any sort of reconnection.  reactor.clientTCP used to
do that.  I'm not sure what the equivalent now is?  Do I need to make a
ClientFactory subclass that implements these "try once then give up" sematics?
If so, should that be a standard utility class?

I get the feeling that the answer is quite simple and staring me in the
face, so please tell me what it is :)

-Andrew.





More information about the Twisted-Python mailing list