cURL / Mailing Lists / curl-library / Single Mail

curl-library

curl-multi ftp

From: Jan de Lint <jg.de.lint_at_xs4all.nl>
Date: Mon, 06 Sep 2010 17:11:55 +0200

  libcurl/7.20.1 OpenSSL/0.9.8n zlib/1.2.5

The following is the debug output of an ftp-download using curl-multi
TEXT: About to connect() to 82.95.170.223 port 21 (#0)
TEXT: Trying 82.95.170.223...
HEADER_IN: 220 FileZilla Server version 0.9.33 beta written by Tim Kosse (Tim.Kosse@gmx.de) Please visit http://sourceforge.

HEADER_OUT: USER *****
HEADER_IN: 331 Password required for *****
HEADER_OUT: PASS ******
HEADER_IN: 230 Logged on
HEADER_OUT: PWD
HEADER_IN: 257 "/" is current directory.
TEXT: Entry path is '/'
HEADER_OUT: CWD distrdam
HEADER_IN: 250 CWD successful. "/distrdam" is current directory.
HEADER_OUT: EPSV
TEXT: Connect data stream passively
HEADER_IN: 229 Entering Extended Passive Mode (|||58082|)
TEXT: Trying 82.95.170.223...
TEXT: Connecting to 82.95.170.223 (82.95.170.223) port 58082
TEXT: Timed out
TEXT: Failed connect to 82.95.170.223:21; No error
TEXT: Expire cleared
TEXT: Closing connection #0

When running same in a thread (non-multi) the switch to passive mode
works fine.
So I probably got the timing wrong.
I find this piece of code from the curl-multi-single example hard to
understand:

     curl_multi_timeout(multi_handle, &curl_timeo);
     if(curl_timeo >= 0) {
       timeout.tv_sec = curl_timeo / 1000;
       if(timeout.tv_sec > 1)
         timeout.tv_sec = 1;
       else
         timeout.tv_usec = (curl_timeo % 1000) * 1000;
     }
What exactly is it supposed to do and how could I tune it?
Or should I tune elsewhere?
Thanks,
]an

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-09-06