cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: FILE * => fd ?

From: Sterling Hughes <sterling_at_designmultimedia.com>
Date: Wed, 8 Aug 2001 05:55:31 -0400 (EDT)

On Tue, 7 Aug 2001, Daniel Stenberg wrote:

> Hi ho
>
> I friendly soul named 'ck1' posted the following suggestion in the curl web
> site feedback section [http://curl.haxx.se/feedback/], and I think it is
> worth discussing:
>
> Using FILE * in the libcurl API introduces a serious limitation since (at
> least in the *nix falvours I know) you can fopen only the first 256 files.
> This means, that an application that first opens or fopens 256 files has no
> chance to use libcurl. Using open and file descriptors instead of FILE *
> would solve the problem. This implies a minor API change/enhancement.
>
> (His original post is found here:
> http://curl.haxx.se/feedback/display.cgi?id=9959783213161&support=yes)
>
    This sounds like a good idea -- it should also give us a reasonable
    performance increase over the stdio layer. One thing I am concerned
    about is Win32 performance, but as I don't develop on that platform
    :)

    Also, as a small implementation note, file descriptors should also
    be wrapped in a structure, something like a curl_fd_t, just for
    portability reasons.

    -Sterling

    Ps: Have you ever considered perhaps converting cURL over to APR,
    it might help with issues such as this one...

_______________________________________________
Curl-library mailing list
http://curl.haxx.se/libcurl/
Received on 2001-08-07