Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: ftp connect works on some machines but not others  (Read 2141 times)

0 Members and 1 Guest are viewing this topic.

ANDO1

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
ftp connect works on some machines but not others
« on: July 31, 2014, 07:58:17 am »
Hi I'm a newbie to ftp and I'm having trouble connecting to an ftp server using sf::Ftp. I can access the ftp server through an internet browser and other ftp applications. 

I did get it working on one machine when I removed the initial "ftp://" from the URL as shown in the example below.    Curiously, connect does not timeout but returns almost instantly.  The response code is 1001 (connection failed).   Note, I have also tried to use the TCP IP address (IpAddress(xx,xx,xx,xx)) but it also fails, so I think it has something to do with the ftp server properties but I'm not sure what? Any ideas?

sf::Ftp ftp;
sf::Ftp::Response response = ftp.connect("ftp://ftp.a-tune.org");
unsigned int status = response.getStatus();
 

BTW, I'm using SFML 2.1, Visual Studio C++ 2010, Windows XP and 7