curl-library
Re: Problems with curl 7.10.1 and the multi interface
Date: Fri, 18 Oct 2002 16:52:57 +0200 (MET DST)
On Fri, 18 Oct 2002, Fabrizio Ammollo wrote:
> > 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 ?
I don't know what ltrace is! ;-)
But yes, I was thinking in terms setting a break-point in Curl_readwrite()
for example and single-step a bit forward to see what it does, and also
checking out curl_multi_fdset() and see why it sets the fdset to wait for
writing if it really doesn't need to write.
But since you passed me a piece of text code, I'll try to get a test shot
compiled soon and have a look myself too.
> 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.
You can't tell for sure when its necessary, since libcurl will need to write
for the request to be sent and then read for the response to be read.
> 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 agree with you. This sounds more like a flaw that we should correct rather
than work around.
> 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 ?
That's how it is supposed to work.
-- Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs. ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sfReceived on 2002-10-18