cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Blocking areas in FTP

From: Gokhan Sengun <gokhansengun_at_gmail.com>
Date: Sun, 13 Nov 2011 22:13:51 +0200

> Today, I noticed that connecting to an FTP server from control port is
>> blocking (waitconnect) function. I think this should be documented in
>> libcurl-multi(3) man page too.
>>
>
> It already is: "Active FTP connections"
>

Sorry, the title was misleading. Establishing data connection is known to
be blocking in function "AllowServerConnect" but what I meant was the
establishment of control connection on port 21.

In function "waitconnect", connection is tried to be established in a loop.
If the server is not there, it blocks the calling thread until timeout
occurs or server comes up.

  for(;;) {

    */* now select() until we get connect or timeout */*
    rc = Curl_socket_ready(CURL_SOCKET_BAD, sockfd, timeout_msec>1000?
                           1000:timeout_msec);

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-11-13