登录 注册
当前位置:主页 > 资源下载 > 28 > FTP客户端的源代码

FTP客户端的源代码

  • 更新:2024-06-29 19:58:44
  • 大小:5KB
  • 推荐:★★★★★
  • 来源:网友上传分享
  • 类别:C++ - 后端
  • 格式:ZIP

资源介绍

跨平台的C++FTP客户端源码 class ftpclient { public: ftpclient(const char* connmode="port", const char* transmode="binary"); ~ftpclient(void); int connect(const char* addr, short port); int disconnect(); int login(const char* username, const char* passwd); int get(const char* remotefile, const char* localfile); int put(const char* localfile, const char* remotefile); int gets(const char* remotedir, const char* localdir); int puts(const char* localdir, const char* remotedir); int dir(const char* remotedir, vector& result); int ldir(const char* localdir, vector& result); int PWD(char* remotedir); int CD(const char* remotedir); int MKDIR(const char* remotedir); int SIZE(const char* remotefile, int& length); protected: int ASCII(); int BINARY(); int PASV(char* addr, short& port); int PORT(const char* addr, short port); int LIST(const char* remotedir); int RETR(const char* remotefile); int STOR(const char* remotefile); int serversock(SOCKET& sock, const char* addr, short port); int datasock(SOCKET& sock, const char* addr, short port); //command private: SOCKET controlsock_; char connmode_[8]; char transmode_[8]; };