[twisted-python] Communication between GUI thread and twisted thread.
Francisco Herrero
francisco.herrero at gmail.com
Mon Jun 18 08:47:19 MDT 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
return
...
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
None.
If somebody see an inconsistency or a better sugestion please let me know.
Francisco
--
"El hombre se descubre cuando se mide con un obstáculo"
(Saint Exupéry)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20070618/9907c8c8/attachment.html>
More information about the Twisted-Python
mailing list