Welcome! Log In Create A New Profile

Advanced

Re: Usage of the shadow field in ngx_buf_t?

Brian Pane
December 10, 2009 06:10PM
On Sat, Dec 5, 2009 at 4:06 PM, Brian Pane <brianp@brianp.net> wrote:
[...]
> Thanks.  What is the right thing to do if a body filter consumes
> only part of a buf and sets aside the rest for later?

I ended up using a reference-counting design for this. I "subclassed"
ngx_buf_t by allocating a structure with an ngx_buf_t at the start
(so all the nginx core code thinks it's a normal ngx_buf_t) and extra
fields for a references and counts at the end. It's a bit of a hack,
but it works well.

-Brian

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Re: Usage of the shadow field in ngx_buf_t?

Brian Pane 2923 December 10, 2009 06:10PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 96
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready