U++ framework
Do not panic. Ask here before giving up.

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 Go to previous message
mdelfede is currently offline  mdelfede
Messages: 1310
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
 
Read Message
Read Message
Read Message
Previous Topic: Skylark and X11 name clash
Next Topic: Some additions to Skylark
Goto Forum:
  


Current Time: Fri Jul 03 14:30:51 GMT+2 2026

Total time taken to generate the page: 0.00488 seconds