[Twisted-Python] specifying the site and port to a twisted web server

I have written a highly simplified twisted web server using twisted extending one of the demos, but I have one small problem. I cannot see out how to arrange to have the server listen one particluar address:port combination. The system I want to use it on has a pair of NICs and I need the server to listen on one NIC and not the other due to port conflicts. Any help would be appreciated.

On Tue, 2007-02-27 at 20:20 -0800, Dennis Allison wrote:
I have written a highly simplified twisted web server using twisted extending one of the demos, but I have one small problem.
I assume there was good reason for not using twisted.web? or even web2?
I cannot see out how to arrange to have the server listen one particluar address:port combination. The system I want to use it on has a pair of NICs and I need the server to listen on one NIC and not the other due to port conflicts.
listenTCP(80, factory, interface="127.0.0.1")

Thank you. My server is a twisted.web server. For some reason, I missed the "interface" parameter when I was reading the code the first couple of times--I finally figured it out late last night. For a system as rich as twisted, the documentation is sparse. On Wed, 28 Feb 2007, Itamar Shtull-Trauring wrote:
On Tue, 2007-02-27 at 20:20 -0800, Dennis Allison wrote:
I have written a highly simplified twisted web server using twisted extending one of the demos, but I have one small problem.
I assume there was good reason for not using twisted.web? or even web2?
I cannot see out how to arrange to have the server listen one particluar address:port combination. The system I want to use it on has a pair of NICs and I need the server to listen on one NIC and not the other due to port conflicts.
listenTCP(80, factory, interface="127.0.0.1")
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
--
participants (2)
-
Dennis Allison
-
Itamar Shtull-Trauring