|
|
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 gethostbyname and gethostbyaddr
#include <errno.h>
#include <stddef.h>
#endif
|
|
|
|

|
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 (m_LocalFTPClient.Login(LogonInfo)) { nsFTP::TSpFTPFileStatusVector list; m_LocalFTPClient.List("/", list); } } when i comment out "m_LocalFTPClient.List("/", list);" there is no resource leak,otherwise the process's memory is increased by 4k once the code is invoked, could anyone come aross this problem?
|
|
|
|

|
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 compiler I use, it always fails. Since -1 for unsigned is also the biggest possible number.
|
|
|
|

|
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.
|
|
|
|
 |
|
|
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 | 268,461 |
| Downloads | 22,648 |
| Bookmarked | 181 times |
|
|