[Twisted-Python] internet.TCPServer interface

Hi, How do I bind the port number to a specific interface? application = service.Application('Core') sc = service.IServiceCollection(application) internet.TCPServer('7001', myFactory()).setServiceParent(sc) Liming

You should use: internet.TCPServer('7001', myFactory(), interface='127.0.0.1') Acording to the documentation, TCPServer calls reactor.listenTCP with the arguments given to the constructor, and listenTCP has a named parameter called interface, which lets you choose which interface you want to bind to. -- alecu On Mon, 2004-08-02 at 21:40, Tsai Li Ming wrote:
Hi,
How do I bind the port number to a specific interface?
application = service.Application('Core') sc = service.IServiceCollection(application) internet.TCPServer('7001', myFactory()).setServiceParent(sc)
Liming
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
participants (2)
-
Alejandro J. Cura
-
Tsai Li Ming