apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <b...@wstoddard.com>
Subject Re: cvs commit: apr-util/buckets apr_buckets_file.c
Date Thu, 05 Jul 2001 14:58:06 GMT
> > Maybe there is something very fundamental that I a missing here.
> > Each 8K chunk that is read causes the system to increment its file
> > pointer for that open fd. You should not need to call seek() to do
> > something the system is already doing for you under the covers.
> 
> 
>    apr_file_t *f = ...;
>    apr_bucket *a, *b, *c, *d;
> 
>    /* split the bucket into hunks of 100 bytes each */
> 
>    a = apr_bucket_file_create(f, 0, len, pool);
>    b = apr_bucket_split(a, 100);
>    c = apr_bucket_split(b, 100);
>    d = apr_bucket_split(c, 100);
> 
>    APR_BUCKET_INSERT_AFTER(a, c);
> 
>    apr_bucket_destroy(b);
>    apr_bucket_destroy(d);
> 
> You can't guarantee that consecutive reads from file buckets read from the
> "next" spot in the file.  In fact, they very frequently jump around.

Give me a common example of reads from file buckets jumping around.

Bill



Mime
View raw message