apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject how to make apr_bucket_read() read only as much as I need?
Date Fri, 19 Aug 2005 01:25:23 GMT
when reading from most bucket types you want to read all the data. This is 
not the case with socket buckets, since the amount of data on the socket 
can be anything. At the moment the code hardcodes 8K of data is to be 
read. What do I do if I want to control how much data is read from the socket?

Before I figure out how to do that in the generic case, I was trying to 
solve the problem for a time being by making a copy of socket_bucket_read 
and adjusting it to accept the upper limit as an argument. The problem is 
that I don't seem to make it working the same way as the original before 
making any changes. e.g. if I had the code in core_input_filter:

   rv = apr_bucket_read(e, &str, &len, block);

and I replace it with:

   rv = apr_bucket_socket_read_stas(e, &str, &len, block);

which is exactly the same copy as socket_bucket_read, I don't get any data 
read. What am I missing here?

Thanks!

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Mime
View raw message