|
|
Comments and Discussions
|
|
 |
 | changes in gcc 4.7. require unistd.h to be included. In BlockingSocket.h line number 34
#elif defined(unix)
#include <sys/socket.h>
#include <unistd.h>
#include <arpa/inet.h> // needed for inet_ntoa and inet_addr
#include <netdb.h> // needed for... |
|
 | Needed to be able to sync an ftp folder to a local folder and your code worked right out of the box
Well written ( unlike my spaghetti code ) and no bugs that I can see
Thank you for posting the code and spending the time to document |
|
 | if compiled with -std=c++0x (c++11), you have a warning:
FTPClient.cpp:313:78: warning: 'auto_ptr' is deprecated
and an error:
BlockingSocket.cpp need: #include stddef.h for ptrdiff_t (line 407) |
|
 | how to use this class when I want to upload large file which than 4GB,
thanks
yes |
|
 | This is a great inspiring article. I am pretty much pleased with your good work. You put really very helpful information. Keep it up once again. |
|
 | thanks a lot for this great article ! |
|
 | hi, i found a problem when i use the code as follow nsFTP::CFTPClient m_LocalFTPClient; nsFTP::CLogonInfo LogonInfo; if (!m_LocalFTPClient.IsConnected()) { LogonInfo.SetHost(szSVRIP, 21, szUserName, szPassWD, static_cast<LPCTSTR>("")); if... |
|
 | how to download all files with filename matching using c++ from an ftp server
thanks |
|
 | In method
int CFTPClient::FileModificationTime(const tstring& strPath, tstring& strModificationTime) const
Change line 1676 (iPos > -1) to the below
if( iPos != tstring::npos ) // instead of (iPos > -1)
Leaving to (iPos > -1) is not working properly with the... |
|
 | In BlockingSocket.cpp function
void CBlockingSocket::Create(int nType /* = SOCK_STREAM */)
Had to change
if( (m_hSocket=socket(AF_INET, nType, 0)
to
if( (m_hSocket=socket(AF_INET, nType, IPPROTO_TCP)
Otherwise the socket never received a response. |
|
 | Hello.
I can't compile the code.
I'm getting those errors.
Cannot open include file: stdafx.h
This error occures in those files:
BlockingSocket.cpp line 8
FTPClient.cpp line 49
FTPDataTypes line 16
FTPFIleState.cpp line 16
FTPListPare line 29 |
|
 | The stdafx.h/stdafx.cpp files are Microsoft specific extensions.
You need to open FTPexample.sln using Microsoft Visual Studio in order to build the project without code changes.
If you use another compiler and linker (like gcc) then you need to port the code for your... |
|
 | Hi otom,
I try to retrieve all folders and files on the ftp-server and an instance of CFTPClient runs in a thread. but i get always a problem when excuting List(), just like this:
nsFTP::TSpFTPFileStatusVector list;
if (!client.List(url.toStdWString(), list)) { .... }
so the... |
|
 | Have you more than one CFTPClient connection to the server open? The list command opens a data connection on the server. Sometimes servers do not allow to open more than one data connection from a client at the same time.
Maybe there is a bug in the posted version. I am going to release a new... |
|
 | Thank you Otom
Danke!
No. there is only one CFTPClient running. here is my code, very sample:
#include "stdafx.h"
#include "cstring"
typedef struct node_s {
std::wstring name;
std::wstring path;
int state;
} node_t;
bool... |
|
 | Hi otom,
Firstly, thanks for this code sample, it is very clean and mostly works perfectly.
However, I think I have seen the same problem that is reported here, namely, the ::List() operation blocks forever.
I was wondering if you have seen this, or whether you have... |
|
 | I got the FTPClient Code compiled for Linux, but first it didn't work. The problem was,
that for some select() calls in the code, the first parameter nfds was set to 0. This doesn't
matter under Windows, because this parameter is ignored.
Under Linux, the first parameter in select() must be... |
|
 | Hi,
I'm testing your demo project, but when I run it, I don't obtain the logging response. Using a break point in function
void CFTPProtocolOutput::OnResponse(const tstring& strResponse)
on first line, the execution of the application is not stopped. Of course response string is not logging.... |
|
 | Hi,
I'll want to know what's kind of licence is applied to this project. Can I use it for free in commercial and/or open source code?
10x
Sandro
Sandro |
|
 | yes, you can use it in commercial applications; i have set the license to "The Code Project Open License (CPOL)" |
|
 | Hello Sir,
I am using your source code in my project & Its working fine. But I have one problem I could not find the size of file which is on server(Linux). I am getting following message.
550 SIZE not allowed in ASCII mode
Could please provide solution to calculate... |
|
 | it seems that the server doesn't understand the SIZE command; you have to check the server; maybe there is another command that you can send; in windows you can use the Microsoft command line tool "ftp.exe"; first you have to connect to the FTP server and then you must type "remotehelp"; the... |
|
 | Hi,
Thanks for the project. It works well, and the code is great and understandable.
I have a requirement to write a Data Stream instead of File stream over a FTP session. Would that be possible by modifying this code? This is my requirement,
1. Establish a ftp... |
|
 | I am using your source code for FTP communication. But when I try to connect with secure FTP I could not upload data on secure FTP. So how do I communicate with secure FTP?
Thanks & Regards,
Savio |
|
 | SFTP is NOT RELATED to FTP. This means that you can't use my classes for SFTP communication. I don't know if there exists free classes for doing SFTP stuff. |
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
A non-MFC class to encapsulate the FTP protocol.
| Type | Article |
| Licence | CPOL |
| First Posted | 27 Oct 2004 |
| Views | 267,444 |
| Downloads | 22,532 |
| Bookmarked | 181 times |
|
|