[Twisted-Python] How to set host/IP Address for reactor.listenTcp()

Thomas Hervé therve at free.fr
Mon Jan 22 04:32:05 EST 2007

Quoting jian wu <hellojianwu at gmail.com>:

> Hi,


> I'm new to Twisted, I only had a limited experience using python and its
> asyncore/asynchat. I went through Twisted Howto doc.
> I just realized that reactor.listenTcp() will only take "listening 
> port" as its
> parameter. If I want to run a Twisted Program on a machine with multiple
> network cards(NICs) associated with different IP addresses and I only want
> my program listening on a specific IP address or NIC, is there a way I
> can pass listening IP address to reactor.listenTcp() so it'll only accept
> the connections from a certain NIC/IP Address?

You should have a look at this:



More information about the Twisted-Python mailing list