sending data in "chunks"
Igor Sysoev
is at rambler-co.ru
Sun Sep 16 22:43:29 MSD 2007
On Sun, Sep 16, 2007 at 08:36:03PM +0200, Manlio Perillo wrote:
> Igor Sysoev ha scritto:
> >[...]
> >
> >It's NGX_AGAIN.
> >If you have got all your data ready you may send them at once in one chain.
> >But if you are getting then gradually, then after NGX_AGAIN you should
> >set event handlers and timer and return control to nginx.
>
> Ok, thanks.
> I can send all data in one chain.
>
> Where can I find an example on how to handle NGX_AGAIN?
It's complex thing. You need to call
ngx_add_timer()
ngx_handle_read_event()
ngx_handle_write_event()
The simple examples are:
ngx_http_init_connection() in src/http/ngx_http_request.c
and
ngx_mail_proxy_handler() in src/mail/ngx_mail_proxy_module.c
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list