curl-and-python
Re: Help with curl_multi_socket interface
Date: Tue, 10 Jun 2008 16:48:16 -0700
On Tue, Jun 10, 2008 at 4:22 PM, Nathan E. Moore
<nate_at_redtetrahedron.org> wrote:
> Tried running it on linux:
>
> A little more digging reveals that your socket call back is not always
> getting called. This error happens when a socket is supposed to be removed,
> but you never get notified. It appears get_thread_state_multi return NULL
> resulting in a exit via silent error, in pycurl.c:multi_socket_callback.
>
> Why have you reversed the order of the arguments to the socket callback? The
> c level callback is (socket, event, userp, socketp) your python callback
> takes (event, socket, multi, socketp)?
>
> I can also confirm that the bizarre select loop isn't a problem. I
> initially thought that was the issue but when I replaced pycurl with my
> ctypes based binding it works.
Thanks Nathan. This is very helpful.
I did not change the existing PyCurl code (multi_socket_callback and
all). Seems that there's some strange interaction here. I will dig
deeper in this direction and see what I find.
Yuhui
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2008-06-11