apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <n...@webthing.com>
Subject Returning partial data in apr_bucket_read
Date Wed, 07 Sep 2005 19:15:25 GMT
It seems that standard practice when apr_bucket_read returns less than
the entire contents of a bucket is to make an additional bucket of the
remaining data - or data source, in a case like socket.

For a bucket type I've created, I need read to return partial data, but
I'd prefer not to have to keep creating new buckets.  In principle it
would be great to return a chunk of data with an EAGAIN status,
or to expect apps to read until EOS, but neither of those is compatible
with existing practice.

What I'm thinking of is having the bucket maintain its own state, and then
reinsert _itself_ (as opposed to a new bucket) until the data is finished.
Should that work, or is it asking for trouble?

-- 
Nick Kew

Mime
View raw message