[twisted-python] Communication between GUI thread and twisted thread.

Francisco Herrero francisco.herrero at gmail.com
Mon Jun 18 10:47:19 EDT 2007

> ClientCreator is not proper for my case, because I need the re-connect
> ability.
I made a tricky for access to the protocol instance created, but I don't
know if this is sane for the structure of twisted. Is something like this:
class P(Protocol):
    def connectionMade(self):
        self.factory.instance = self

    def connectionLost(self):
        self.factory.instance = None

class F(Factory):
    protocol = P
    instance = None
then you can access to protocol instance inside the factory, if it's not
If somebody see an inconsistency or a better sugestion please let me know.

"El hombre se descubre cuando se mide con un obstáculo"
(Saint Exupéry)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20070618/9907c8c8/attachment.htm 

More information about the Twisted-Python mailing list