cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: libcurl, -w option

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 29 Sep 2000 14:19:47 +0200 (MET DST)

On Fri, 29 Sep 2000, Georg Horn wrote:

> Building simple perl-interfaces isn't too hard... There's a program h2xs,
> that makes a perl-module out of a C header file.

So, are you working on it then? ;-)

> > Now, we can still keep the -w code in the lib for a while more, but we can
> > indeed introduce a curl_easy_getout() function.
>
> That would be nice.

Okey, in the upcoming version there's now a new friend in town:

/*
 * NAME curl_easy_getinfo()
 *
 * DESCRIPTION
 *
 * Request internal information from the curl session with this function.
 * The third argument MUST be a pointer to a long, a pointer to a char * or a
 * pointer to a double (as the documentation describes elsewhere). The data
 * pointed to will be filled in accordingly and can be relied upon only if
 * the function returns CURLE_OK. This function is intended to get used
 * *AFTER* a performed transfer, all results from this function are undefined
 * until the transfer is completed.
 */
CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...);

... there's one CURLINFO for each variable in the current -w option output.

I've also moved out the -w option from library to the curl tool, which then
gets that information using the curl_easy_getinfo() function. It makes no
visible change to a curl user, but it is a nicer design and now we're able to
dig out some more info from libcurl.

-- 
  Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/
Received on 2000-09-29