getMessage is blanco. The response of connect is 1001, login 1002.
Ouput:
Connecting Not ok; Status 1001
Logging in Not ok; Status 1002
Code:#include <iostream>
#include <string>
#include <SFML/Network.hpp>
using namespace std;
int main() {
sf::Ftp ftp;
sf::Ftp::Response response, response2;
/*string server, username, password;
int port;
cin >> server;
cin >> port;
*/
response = ftp.connect("ftp://server.cf");
/*
cin >> username;
cin >> password;
*/
response2 = ftp.login("myUser", "MyPass");
if (response.isOk()) {
cout<< "Ok" <<endl;
} else if (!response.isOk()) {
cout << "Connecting Not ok; Status " << response.getStatus()<< " " << response.getMessage()<<endl;
} else {
cout<< "Error" <<endl;
}
if (response2.isOk()) {
cout<< "Ok" <<endl;
} else if (!response2.isOk()) {
cout << "Logging in Not ok; Status " << response2.getStatus()<< " " << response2.getMessage()<<endl;
} else {
cout<< "Error" <<endl;
}
}
I used interface Wlan0, also tried FTP filter; the same result.
Not using local ftp-server, but a normal over-internet one.