[Twisted-Python] ClientFactory design
![](https://secure.gravatar.com/avatar/e0114f22fcde3deed8ebe94c70652140.jpg?s=120&d=mm&r=g)
I'm studying an SSH client implementation using Conch, and was surprised to see that the ClientFactory subclass had a connect() method which calls connectTCP. This isn't really a problem - the code works - but it seems like an odd place to do the connection. Am I right to be surprised? Peter.
![](https://secure.gravatar.com/avatar/e589db6c27c54b03de756cae2843dba5.jpg?s=120&d=mm&r=g)
Hi Peter, ClientFactory doesn’t define a connect method, so that’s probably just a custom convenience method added by the author, rather than something involved in the twisted interface. As for if it’s weird or not, that’s hard to say without seeing the full implementation. - Colin
![](https://secure.gravatar.com/avatar/e589db6c27c54b03de756cae2843dba5.jpg?s=120&d=mm&r=g)
Hi Peter, ClientFactory doesn’t define a connect method, so that’s probably just a custom convenience method added by the author, rather than something involved in the twisted interface. As for if it’s weird or not, that’s hard to say without seeing the full implementation. - Colin
participants (3)
-
Colin Dunklau
-
Jean-Paul Calderone
-
Peter Westlake