// FTPSend.h: interface for the CFTPSend class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_FTPSend_H__05003AE0_E234_11D2_970B_00A024EBF6AB__INCLUDED_) #define AFX_FTPSend_H__05003AE0_E234_11D2_970B_00A024EBF6AB__INCLUDED_ #if _MSC_VER >= 1000 #pragma once #endif // _MSC_VER >= 1000 #include // MFC socket extensions class CFTPSend { public: CString m_retmsg; //传输文件 int MoveFile(CString remotefile, CString localfile, BOOL get); //退出 void LogOffServer(); //登陆 BOOL LogOnToServer(CString hostname, int hostport, CString username, CString password); CFTPSend(); ~CFTPSend(); //发送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_FTPSend_H__05003AE0_E234_11D2_970B_00A024EBF6AB__INCLUDED_)