twisted.conch.ssh.factory.SSHFactory.buildProtocol doesn't let you customize the protocol it creates
|Reported by:||Michael Hudson-Doyle||Owned by:|
branch-diff, diff-cov, branch-cov, buildbot
We want to set tcp keepalives on all connections to our ssh server, which would seem to be most logically done in connectionMade of the protocol object created on a connection -- but there's no way to influence the class of the protocol object created here, other than copy-paste-hacking buildProtocol into your factory subclass.
If SSHFactory.buildProtocol delegated to Factory.buildProtocol, you could do it by defining 'protocol' in your factory subclass, as in most of the rest of Twisted.
Diff attached, no tests though.
Change History (19)
comment:1 Changed 8 years ago by
|Component:||core → conch|
|Owner:||changed from Glyph to z3p|
|Type:||enhancement → defect|