atom feed4 messages in ru.sysoev.nginxRe: Write a speed-limit module, any s...
FromSent OnAttachments
superguiJul 19, 2009 11:46 pm 
Gabriel RamugliaJul 20, 2009 7:26 am 
Grzegorz SienkoJul 21, 2009 8:48 am 
superguiJul 21, 2009 8:01 pm 
Subject:Re: Write a speed-limit module, any suggestion?
From:supergui (ngin@nginx.us)
Date:Jul 21, 2009 8:01:38 pm
List:ru.sysoev.nginx

Thanks very much Grzegorz Sienko. But perhaps there is some differences of my
case, i have to change the rate at running time, that is i have to control the
rate in my own module code. And i have my own file system to read file, so i
have to do every thing from reading file from my file system to write stream at
controled rate to the client. I have just found there is a timer in nginx that
maybe do help for me, that is i write a buffer to client and check the rate, if
expire i just need to add a timer to be called to continue after a piece of
time(e.g 100ms), and then write next buffer. Repeatly do that, untill i write
the total file.

But i have some difficulties in the timer, i add a test timer to it ,but it
never run my handler?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,4234,4304#msg-4304