curl-library
Re: header bytes not being reset on each perform
Date: Wed, 24 Jan 2001 15:26:25 -0800
Daniel Stenberg wrote:
>
> On Wed, 24 Jan 2001, Rick Jones wrote:
>
> > well, i commented-out the call to set the write function, so the headers
> > and bodies were written to the files:
>
> I'm sorry, I didn't read your posted test-program properly. I had a look now
> and the problem is that you do multiple curl_easy_perform() calls on the same
> handle, which libcurl really don't support (as of now).
>
> You need to cleanup()+init() between each perform().
oh. i wonder if that explains why I seem to be reporting throughtputs
that are greater than possible for my link... i'll add the cleanup and
init and see what happens.
> > does libcurl close the connection after every request?
>
> Yes. I intend to add support for persistant connections. I need volounteers
> to help me with it.
understood. for the moment, closing each time is OK. later it won't and
I might have a chance to look at helping with that.
> > is resetting the header bytes only done on a connection close?
>
> No, the header byte count is reset before each new connection is made.
but not if I make a new connection on an existing handle it would seem
:)
> > actually, for the application I plan on using libcurl - an
> > "HTTP_DOWNLOAD" test in netperf3, is there a way to control that on a
> > request by request basis?
i was talking about controlling whether a new connection was made on a
perform by perform basis. at the moment it is not a big deal for me -
what I'm simulating does not require persistent connections and thus
control over when connections are established.
> > to make system call traces easier, i changed the retrieved URL to just
> > say "hello world" looking then at the sytem call trace, I see read() (why
> > not recv?) returning the same number of bytes for each request.
>
> libcurl uses TCP connections and you use read() to get data from such (at
> least you do in unix).
i would have thought that the slightly more direct socket calls of
send() and recv() would have been used. not a big deal really, just a
curiousity.
so far, libcurl has probably saved me many many hours of work, thanks.
rick jones
-- ftp://ftp.cup.hp.com/dist/networking/misc/rachel/ these opinions are mine, all mine; HP might not want them anyway... :) feel free to email, OR post, but please do NOT do BOTH... my email address is raj in the cup.hp.com domain... _______________________________________________ Curl-library mailing list Curl-library_at_lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/curl-libraryReceived on 2001-01-25