Hi,
Is there a way to maintain some per-connexion state with a python twisted
thrift server?
Currently, my twisted thrift server's code is inside a handler which is
instanciated only once, when initializing the server, with this kind of code:
factory = ThriftServerFactory(
processor = MyService.Processor(MyHandler()),
iprot_factory = TBinaryProtocol.TBinaryProtocolFactory())
reactor.listenTCP(some_port, factory)
reactor.run()
There is only one MyHandler instance, thus this instance is shared for all
incoming client connexions, i see no way to maintain per-connexion state.
regards,
--
Matthieu Imbert <[email protected]>
INRIA engineer / SED / GRAAL and RESO teams
http://www.inria.fr http://www.ens-lyon.fr/LIP
+33(0)472728741 / +33(0)437287473
LIP ENS-Lyon, 46 allée d'Italie
69364 Lyon cedex 07, FRANCE