[Twisted-Python] ClientFactory design
Peter Westlake
peter.westlake at pobox.com
Mon Nov 30 11:07:01 MST 2020
On Mon, 30 Nov 2020, at 13:38, Jean-Paul Calderone wrote:
> 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.
That was my feeling too. Thanks!
Peter.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20201130/0adf9672/attachment.htm>
More information about the Twisted-Python
mailing list