[Twisted-Python] unlistenTCP not working?

Michael Porter mporter at despammed.com
Fri Jul 25 02:45:33 MDT 2003


From: "Itamar Shtull-Trauring" <itamar at itamarst.org>

> On Thu, 24 Jul 2003 18:15:28 +0100
> "Michael Porter" <mporter at despammed.com> wrote:
> 
> > I'm having a problem with unlistenTCP - it doesn't seem to work if
> > application.listenTCP was called after the reactor is started. Am I
> > missing something here or is this a bug? See test code below for
> > demonstration...
> 
> In general, if you're doing unlisten, it's probably best to just use
> "port = reactor.listenTCP", and "port.stopListening()" when you're done.
> 
> The idea is, application knows about stuff that is always going to be
> there. If it's temporary or changes on every run, just use the reactor
> directly.
> 

Ok, I didn't realise listenTCP returned Port objects.

Thanks, Mike.





More information about the Twisted-Python mailing list