FTPclient.h
资源名称:FTP总集.rar [点击查看]
上传用户:tjfeida
上传日期:2013-03-10
资源大小:1917k
文件大小:1k
源码类别:
Ftp客户端
开发平台:
Visual C++
- // FTPclient.h: interface for the CFTPclient class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_FTPCLIENT_H__05003AE0_E234_11D2_970B_00A024EBF6AB__INCLUDED_)
- #define AFX_FTPCLIENT_H__05003AE0_E234_11D2_970B_00A024EBF6AB__INCLUDED_
- #if _MSC_VER >= 1000
- #pragma once
- #endif // _MSC_VER >= 1000
- class CFTPclient
- {
- public:
- CString m_retmsg;
- //传输文件
- BOOL MoveFile(CString remotefile, CString localfile,BOOL pasv,BOOL get);
- //退出
- void LogOffServer();
- //登陆
- BOOL LogOnToServer(CString hostname,int hostport,CString username, CString password, CString acct, CString fwhost,CString fwusername, CString fwpassword,int fwport,int logontype);
- CFTPclient();
- ~CFTPclient();
- //发送FTP命令
- BOOL FTPcommand(CString command);
- //读取响应
- BOOL ReadStr();
- //发送命令
- BOOL WriteStr(CString outputstring);
- private:
- //用于读写Socket数据
- CArchive* m_pCtrlRxarch;
- CArchive* m_pCtrlTxarch;
- CSocketFile* m_pCtrlsokfile;
- //控制连接Socket
- CSocket* m_Ctrlsok;
- int m_fc;
- BOOL ReadStr2();
- //打开控制连接
- BOOL OpenControlChannel(CString serverhost,int serverport);
- //关闭控制连接
- void CloseControlChannel();
- };
- #endif // !defined(AFX_FTPCLIENT_H__05003AE0_E234_11D2_970B_00A024EBF6AB__INCLUDED_)