[Twisted-Python] How to stop a TCP server without stoping the reactor?
xuan tang
xt1_tm at yahoo.com
Thu May 11 12:43:14 MDT 2006
Thanks for your help Johann.
Xuan
Johann Borck <johann.borck at densedata.com> wrote: xuan tang wrote:
> I am trying to create a TCP server using twisted reactor. I want to
> stop the server from accepting TCP bind requests (and restart it
> later), but for some reason I don't want to use reactor.stop(). Is
> there another way to do it?
reactor.listenXXX returns the an IListeningPort-implementing object on
which you can call stopListening() and startListening(). When you're
using the twisted.application stuff you can call
stopService()/startService() on your Service instance.
Johann
_______________________________________________
Twisted-Python mailing list
Twisted-Python at twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20060511/c2e82be7/attachment.html>
More information about the Twisted-Python
mailing list