1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- // 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
- class CFTPSend
- {
- // CAsyncSocket datachannel;
- BOOL m_pasved;
- public:
- int *m_bStop;
- CString m_path;
- CString m_ziptype;
- int m_pos;
- CString m_retmsg;
- //传输文件
- int MoveFile(CString remotefile, CString localfile, BOOL blast);
- //退出
- 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_)
|