[Twisted-Python] From factory to protocol
acapnotic at twistedmatrix.com
Thu Feb 13 12:04:37 EST 2003
On Thu, 2003-02-13 at 06:08, Thomas Heller wrote:
> Now, the models I have sometimes create events which must be sent to the
> protocol again, but how can I access the actual protocol instance
> from the Factory?
You'll have to override the factory's buildProtocol() to have it store
the protocol instance someplace. For an example, see
twisted.words.tendril.TendrilFactory, which I think has similar needs to
yours. I don't think that code has been peer-reviewed much, so I won't
promise it exemplifies Best Practices, but the answer should be in that
The moon is waxing gibbous, 84.9% illuminated, 11.0 days old.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20030213/24770621/attachment.pgp
More information about the Twisted-Python