Home » U++ Library support » U++ MT-multithreading and servers » Ask for testing - Skylark with upload progress
Ask for testing - Skylark with upload progress [message #40407] |
Wed, 31 July 2013 00:11 |
mdelfede
Messages: 1307 Registered: September 2007
|
Ultimate Contributor |
|
|
Hi, I made some changes in skylark which will be committed on next days. I'd like if somebody tests it; here is the modified Skylark package, and the upload demo.
As you'll see in demo, a new macro has been added :
SKYLARK_PROGRESS(handler, path, progress)
on which progress is a pointer of a function of type :
int progress(int reason, Http& http, int size)
which is called during various phases of upload:
reason = PROGRESS_HEADERS when headers have been read
reason = PROGRESS_CONTENT during the (lengty) content reading
reason = PROGRESS_END when transfer is finished
The demo performs a multi-file upload with a progress bar.
If you test on localhost, I suggest to slow down the network with some tools, for example NETEM for Linux :
Add network delay on localhost :
sudo tc qdisc add dev lo root netem delay 20ms
Remove network delay on localhost:
sudo tc qdisc del dev lo root netem delay 20ms
I'll update documents before commit on SVN.
Ciao
Max
|
|
|
Goto Forum:
Current Time: Sun Apr 28 21:10:35 CEST 2024
Total time taken to generate the page: 0.03318 seconds
|