On Mar 30, 2012, at 7:43 PM, hz hanks wrote: > Hi All, > > I have a server listen to two ports and run as follows: > > reactor.listenTCP(PORT1, > file_trans_service.getFileTransCtrlServFactory() > reactor.listenTCP(PORT2, > file_trans_service.getFileTransCtrlServFactory() > reactor.run() > > Now I want to close the function of PORT1, but I just don't find the > opposite function of reactor.listenTCP(). Anyone can give me a hand? > > Best, > Hanks
listenTCP returns an IListeningPort provider, as documented here <http://twistedmatrix.com/documents/current/api/twisted.internet.interfaces.IReactorTCP.html#listenTCP> IListeningPort (documented here: <http://twistedmatrix.com/documents/current/api/twisted.internet.interfaces.IListeningPort.html>) has a stopListening method that will shut down the socket appropriately. -glyph _______________________________________________ Twisted-Python mailing list [email protected] http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
