www.pudn.com > 2007112823521925.rar > CLIENTSOCK.H
// clntsock.h : interface of the CClientSocket class
#ifndef __CLNTSOCK_H__
#define __CLNTSOCK_H__
class CCommandMsg;
class CDataMsg;
class CClientSocket : public CSocket
{
DECLARE_DYNAMIC(CClientSocket);
// Construction
private:
CClientSocket(const CClientSocket& rSrc); // no implementation
void operator=(const CClientSocket& rSrc); // no implementation
public:
CClientSocket();
// Attributes
public:
CSocketFile* m_pFile;
CArchive* m_pArchiveIn;
CArchive* m_pArchiveOut;
CString m_sClientIP;
BOOL IsAborted()
{
return m_pArchiveOut == NULL;
}
// Operations
public:
void Init();
void Abort();
void SendMsg(CDataMsg* pMsg);
void ReceiveMsg(CCommandMsg* pMsg);
CString GetClientIP();
// Overridable callbacks
protected:
virtual void OnReceive(int nErrorCode);
// Implementation
public:
virtual ~CClientSocket();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
};
#endif // __CLNTSOCK_H__