[Twisted-Python] How to create a new service and listen on a new port?
Eric Hsu
nkeric at gmail.com
Mon May 23 04:50:34 MDT 2005
2005/5/23, Jp Calderone <exarkun at divmod.com>:
> Since nothing is likely to call datagramReceived unless the reactor is running, and calling reactor.run() while the reactor is running is a terribly broken thing to do, the above code is likely mistaken in calling reactor.run().
>
> I bet shutdown behavioor will become much nicer if you remove the call to reactor.run() here, and in any other similar places.
>
> twistd will start and stop the reactor for you.
>
> Jp
Mmm... you're right! However, it seems that without reactor.run(), the
newly created AnotherService instance would not serve the client as
expected... but it will with reactor.run().. that's why I'm looking
for a better/elegant/formal way to achieve what I want, any ideas?
best regards
- Eric
More information about the Twisted-Python
mailing list