FastCGI + fork

2014-03-06 Thread Yasser Zamani
Hi there, I rewrote FastCGI's echo_cpp.cpp example to ridirect another process e.g. ls output DIRECTLY (to achieve high performance) to client but unfortunately does not work as expected! P.S. if I simply read the pipe I get output but I lost performance. So, I need to directly redirect the

Re: custom handler module - dynamic response with unknown content length

2014-03-01 Thread Yasser Zamani
On Sat 01 Mar 2014 06:27:38 PM IRST, Yasser Zamani wrote: The transcoding process already is doing by an external process, ffmpeg, into an incomplete file. I just need to read from first of this incomplete file one by one chunks and send them to client until seeing a real EOF. I have

Re: custom handler module - dynamic response with unknown content length

2014-03-01 Thread Yasser Zamani
On Sat 01 Mar 2014 03:01:42 PM IRST, Maxim Dounin wrote: Hello! The ngx_http_output_filter() function can be called more than once, but usually it doesn't make sense - instead, one should install r->write_event_handler and do subsequent calls once it's possible to write additional data to sock

Re: custom handler module - dynamic response with unknown content length

2014-03-01 Thread Yasser Zamani
Thanks for your response On Sat 01 Mar 2014 03:41:24 AM IRST, Maxim Dounin wrote: Hello! You've tried to send the same chain with the same buffer multiple times. After a buffer is sent for the first time, its pointers are adjusted to indicate it was sent - b->pos moved to b->last, and buff

custom handler module - dynamic response with unknown content length

2014-02-28 Thread Yasser Zamani
Hi there, I learned some about how to write a handler module from [1] and [2]. [1] http://blog.zhuzhaoyuan.com/2009/08/creating-a-hello-world-nginx-module/ [2] http://www.evanmiller.org/nginx-modules-guide.html#compiling But I need to rewrite [1] to send dynamically generated octect stream to c