[Twisted-Python] How do I know the server from reactor.listenTCP already started listening?

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Tue Sep 27 05:44:10 MDT 2011


On 08:33 am, a.libran at gmail.com wrote:
>When the call to listenTCP returns, is the server actively waiting for
>TCP connections?

Yes.

Jean-Paul
>
>Let's say reactor.run() has been called. Can I do the following back- 
>to-back?
>
>reactor.listenTCP(4321, serverfactory)
>reactor.connectTCP("localhost", 4321, clientfactory)
>
>Basically, I am almost starting a server and a client back-to-back
>that connects to each other. I would like to know if the server is in
>"listening" state before my client attempts to connect.
>
>Thanks.
>
>David Kao
>
>_______________________________________________
>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