curl-library
Re: Problems with curl 7.10.1 and the multi interface
Date: Fri, 18 Oct 2002 14:42:23 +0200
On Friday 18 October 2002 09:25, Daniel Stenberg wrote:
> There was a bug in the check-for-connect function that caused this and that
> has been fixed in CVS:
>
> http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/curl/curl/lib/connect.c.diff
>?r1=1.38&r2=1.39
Thanks ! From now on, after finding something that doesn't work as expected,
I'll try the CVS sources.
> Oh. The 7.10.1 was the first version in which the multi interface attempts
> to follow locations when told, so I bet there's a bug or two in that code.
>
> I think you'd be better off using gdb instead of strace. I would too, as
> talking function names and variables' contents are easier than weird strace
> outputs.
I don't know much gdb, is it possible to have it trace all the functions
called, I mean something like using ltrace, or do I have to step by step into
curl and see what happens ?
> > Then, I have one doubt, too: is it correct for libcurl to "wake up" so
> > much my program even if no data is really transferred ?
>
> How do you mean? How does libcurl "wake up" ? Don't you select() on file
> handles?
Excuse me, I was not very clear about what I meant ; with "wake up" I mean
that curl sets the fd of the connection it made into the write fds set I pass
to curl_multi_fdset: this causes an unnecessary "wake up" of my program,
because (like in the examples) I always select on both read and write sets,
even if it wouldn't be strictly necessary.
I know, maybe an application should select on the write fds set only when it
is doing an HTTP POST and other kind of operations which requires data to be
sent (except for the first data, I think), but it seems to me that the
application would loose too much "transparency".
I understand that curl needs to tell the application that the socket is
writable to make sure that curl_multi_perform is called and so any data
waiting to be written to the socket is really transferred to the remote
server, but I was wondering if the set of the write fds set could be done by
the library only when it knows that data is really to be sent, so that the
select made by the application does not return when there is no need of it.
Is it a too much difficult, or unreasonable, thing ?
Thank you.
-- Regards, Fabrizio ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sfReceived on 2002-10-18