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

jian wu hellojianwu at gmail.com
Mon Jan 22 11:35:04 EST 2007


Hi Thomas,

Thanks a lot for your quick response!

Jian

On 1/22/07, Thomas Hervé <therve at free.fr> wrote:
> Quoting jian wu <hellojianwu at gmail.com>:
>
> > Hi,
>
> 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:
>
> http://twistedmatrix.com/documents/current/api/twisted.internet.interfaces.IReactorTCP.html
>
>
> --
> Thomas
>
>
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>




More information about the Twisted-Python mailing list