[Twisted-Python] internet.TCPServer interface
Alejandro J. Cura
alecu at vortech.com.ar
Tue Aug 3 09:19:43 MDT 2004
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 at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
More information about the Twisted-Python
mailing list