[Twisted-Python] protocol factory interfaces?? (FTP)

Christopher Armstrong radix at twistedmatrix.com
Wed Nov 26 03:59:02 EST 2003


On Wed, Nov 26, 2003 at 03:10:11AM -0500, Jonathan Simms wrote:
> Is it possible (or even useful) to have a protocol which expects the
> factory which builds it to have a specific interface? (as the protocol
> has a .factory attribute and therefore can access methods and attributes
> on it's factory)
> 
> or must all twisted.protocols be able to work with
> internet.protocol.Factory() off-the-shelf?

Nope, it's perfectly fine to have a factory tightly bound to the
protocol. The reason that they're separate objects isn't for
separation of knowledge, but for having a 1-N relationship (N protocol
instances (i.e., connections) per factory).

-- 
 Twisted | Christopher Armstrong: International Man of Twistery
  Radix  |          Release Manager,  Twisted Project
---------+           http://radix.twistedmatrix.com/




More information about the Twisted-Python mailing list