On 9 December 2012 14:57, Itamar Turner-Trauring <[email protected]> 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.IReactorTCP.html#listenTCP
[2] 
http://twistedmatrix.com/documents/12.2.0/api/twisted.internet.interfaces.IListeningPort.html

-- 
Adi Roiban

_______________________________________________
Twisted-Python mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to