perl-5.8.3-ithread -MApache2 -MModPerl::MethodLookup -e print_object Apache::RequestRec | wc -l
149
Great. This is a good start point for me.
In that case please see: http://perl.apache.org/docs/2.0/api/ModPerl/MethodLookup.html#top
I did mean to sound as a rant (if I did). I know that's not easy to keep with the documentation.
what can you do with your subconscious which seems to tell the truth of what you've really meant ;)
Doc patches are always welcome...
I am using a naive approach to do a traffic shapper. Dividing the available bandwidth by the sum of all "shapped" connections will give the individual connection bandwidth.
What's a "shapped" connection? Is it a filter that tries to measure the data transfer rate? I thought there are special tools that can give you traffic accounting per socket.
Without detecting that the connection was aborted, it would be counted in the sum of the "shapped" connection. In this sense it would still slowing down the other connections.
that's exactly where the naive approach is wrong, IMHO. since it tries to account in the wrong place. It should probably measure the heartbeat on the pipe and not in the process that feeds the pipe. But without having a good understanding of your alg, I could be totally wrong.
In any case it's good to always try to detect aborted connections and stop whatever you were doing.
You should be aware of at least one culprit (which I'm not sure if it's still the case with httpd-2.0). If you use the front-end/back-end setup and reverse proxy the requests, your backend will never know that the connection was aborted if it did. proxy doesn't tell that to the backend (it keep the connection open). Again this is how things work in 1.0, I don't know about 2.0 yet. But this is another potential situation where your meter may fail.
I think I understand it now. You can only use Apache::DECLINED before starting to read the data.
That's right. You can return it after you started reading too, but it'll return some of the data that you may have printed out already. which is not a problem if the connection has been aborted anyway. I've asked on httpd-dev what should be returned and didn't have any follow ups so far. But I think APR::FAILURE, or anything else will do fine.
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
-- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html