in reply to Perl http daemon with network delay
I had good success with using HTTP::Daemon as a local "fake" server (in Test::HTTP::LocalServer and log-server). If you want to send a response slow, just add a sleep before calling $c->send_response(). If you want to have that response sent in a trickling fashion, like (say) only transferring 1k/s, I fear that HTTP::Daemon does not provide a direct avenue. But from looking at the code, you can pass in a code reference instead of a HTTP::Response, and that code reference can send the pieces in small bits I think.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl http daemon with network delay
by danmihai (Initiate) on Aug 26, 2010 at 12:41 UTC |