Creating socket.connect while in epoll loop

Miki Tebeka miki.tebeka at gmail.com
Wed Sep 12 16:52:43 EDT 2012


> You cannot synchronously set up a new TCP connection using a non-blocking > socket.  Instead, you begin the connection attempt and it fails with EINPROGRESS and then you use epoll to find out when the attempt completes.
OK.

> I suggest reading the implementation of a Twisted reactor to see an example of how this is done.
That was the idea, learning.

> Here are a couple links to get you started:
> http://twistedmatrix.com/trac/browser/trunk/twisted/internet/tcp.py
> http://twistedmatrix.com/trac/browser/trunk/twisted/internet/epollreactor.py
Thank you very much!



More information about the Python-list mailing list