Creating socket.connect while in epoll loop

Miki Tebeka miki.tebeka at gmail.com
Wed Sep 12 12:01:57 EDT 2012


Greetings,

I'm trying to write a reverse TCP proxy using epoll (just for learning).

I've started with the code at http://scotdoyle.com/python-epoll-howto.html and got to https://gist.github.com/3707665.

However, I can't create a new connection. When reaching line 34 (backend.connect), I get the following error (on line 34):
    socket.error: [Errno 115] Operation now in progress

I tried moving the socket creation to a different thread, but same problem.
Any ideas how to so fix this? (keep in mind I'm a total newbie in this area).

Thanks,
--
Miki



More information about the Python-list mailing list