On 9 December 2012 14:57, Itamar Turner-Trauring itamar@itamarst.org wrote:
On 12/09/2012 05:31 AM, Miha Valencic wrote:
No, the server shouldn't accept() the socket after n connections are opened(). But see previous paragraph.
You can stop accept()ing by calling stopReading() on the returned port object:
port = reactor.listenTCP(....) port.stopReading()
And start again by calling startReading().
[snip]
Many thanks for you explanation.
Checking the documentation I can read that reactor.listenTCP returns an IListeningPort [1] Checking IListeningPort I can read that it has no stopReading() , startReading() methods [2]
Can you please advise how and when to use startReading vs startListening ?
Many thanks!
[1] http://twistedmatrix.com/documents/12.2.0/api/twisted.internet.interfaces.IR... [2] http://twistedmatrix.com/documents/12.2.0/api/twisted.internet.interfaces.IL...