[Twisted-Python] How to stop a TCP server without stoping the reactor?

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?
Thanks, Xuan
--------------------------------- Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.

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

Thanks for your help Johann.
Xuan
Johann Borck johann.borck@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@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
participants (2)
-
Johann Borck
-
xuan tang