[Twisted-Python] ClientFactory design

Jean-Paul Calderone exarkun at twistedmatrix.com
Mon Nov 30 06:38:36 MST 2020


On Mon, Nov 30, 2020 at 6:48 AM Peter Westlake <peter.westlake at pobox.com>
wrote:

> 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?
>

Putting transport setup on the factory unnecessarily couples protocol and
transport logic.  More flexibility is provided by keeping these concerns
independent.


>
> Peter.
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20201130/e3768872/attachment.htm>


More information about the Twisted-Python mailing list