📄 controlsocket.h
字号:
#if !defined(AFX_CONTROLSOCKET_H__EBF9911B_5060_4F80_AD63_5DD763607BE4__INCLUDED_)
#define AFX_CONTROLSOCKET_H__EBF9911B_5060_4F80_AD63_5DD763607BE4__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ControlSocket.h : header file
//
#include "FTPClientDlg.h"
#include "afxmt.h" //CCriticalSection required.
class CFTPClientDlg;
/////////////////////////////////////////////////////////////////////////////
// CControlSocket command target
class CControlSocket : public CSocket
{
// Attributes
public:
bool welcomed;
CString receiveBuf;
CFTPClientDlg* m_pClientDlg;
CStringList m_userCommandList;
CStringList m_serverCommandList;
CCriticalSection m_criticalSection;
// Operations
public:
CControlSocket();
virtual ~CControlSocket();
// Overrides
public:
void inline AddServerReply(LPCTSTR serverReply)
{
m_criticalSection.Lock();
m_serverCommandList.AddTail(serverReply);
m_criticalSection.Unlock();
}
bool CreateDataSocket();
bool GetListData(LPCTSTR remotePath);
bool WaitFor(LPCTSTR commandCode);
bool Login(LPCTSTR userName,LPCTSTR userPsw);
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CControlSocket)
public:
virtual void OnConnect(int nErrorCode);
virtual void OnSend(int nErrorCode);
virtual void OnClose(int nErrorCode);
virtual void OnReceive(int nErrorCode);
//}}AFX_VIRTUAL
// Generated message map functions
//{{AFX_MSG(CControlSocket)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG
// Implementation
protected:
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CONTROLSOCKET_H__EBF9911B_5060_4F80_AD63_5DD763607BE4__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -