]> git.sven.stormbind.net Git - sven/tclcurl.git/blob - tests/progressProc.tcl
Imported Upstream version 7.19.6
[sven/tclcurl.git] / tests / progressProc.tcl
1 package require TclCurl
2
3 proc ProgressCallback {dltotal dlnow ultotal ulnow} {
4
5     set dltotal [expr int($dltotal)]
6     set dlnow   [expr int($dlnow)]
7     set ultotal [expr int($ultotal)]
8     set ulnow   [expr int($ulnow)]
9
10     puts "Progress callback: $dltotal - $dlnow - $ultotal - $ulnow"
11
12     return
13 }
14
15
16 set curlHandle [curl::init]
17
18 $curlHandle configure -url "127.0.0.1/~andres/cosa&co.tar"  \
19         -progressproc ProgressCallback -file cosa.tar -noprogress 0
20 $curlHandle perform
21
22 $curlHandle cleanup
23
24
25
26
27