This commit is contained in:
87
Common/ComData.h
Normal file
87
Common/ComData.h
Normal file
@@ -0,0 +1,87 @@
|
||||
#ifndef _COMDATA_H
|
||||
#define _COMDATA_H
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
|
||||
#define CHAR_BUFFER_SIZE 255
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CComData
|
||||
|
||||
class CComData : public CObject
|
||||
{
|
||||
protected:
|
||||
DECLARE_DYNCREATE(CComData)
|
||||
|
||||
// Enumerator
|
||||
public:
|
||||
enum eComData {
|
||||
NONE = 0,
|
||||
COM_SIGN_IN,
|
||||
COM_SIGN_OUT,
|
||||
COM_MESSAGE,
|
||||
COM_CLOSE,
|
||||
COM_CHECKALIVE,
|
||||
COM_SIGN_CHANGE,
|
||||
// ------------------------------
|
||||
COM_ADD_CLIENT,
|
||||
COM_REMOVE_CLIENT,
|
||||
COM_PRIVATE_MESSAGE,
|
||||
};
|
||||
enum eBodyType {
|
||||
BODY_NONE = 0,
|
||||
BODY_MESU,
|
||||
BODY_MEDO,
|
||||
};
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
UINT m_ComDataType;
|
||||
CString m_FromID;
|
||||
UINT m_BodyType;
|
||||
CString m_StringBody;
|
||||
CByteArray m_BArrayBody;
|
||||
|
||||
public:
|
||||
void Initialize();
|
||||
|
||||
void SetBArrayBody( LPBYTE pData, int nSize );
|
||||
LPBYTE GetBArrayBody();
|
||||
|
||||
// Operations
|
||||
public:
|
||||
CComData();
|
||||
virtual ~CComData();
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CComData)
|
||||
public:
|
||||
virtual void Serialize(CArchive& ar); // overridden for document i/o
|
||||
protected:
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Generated message map functions
|
||||
protected:
|
||||
//{{AFX_MSG(CComData)
|
||||
// NOTE - the ClassWizard will add and remove member functions here.
|
||||
//}}AFX_MSG
|
||||
};
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // _COMDATA_H
|
||||
|
||||
struct sClientComInfos {
|
||||
DWORD pSocket; // Socket ID.
|
||||
CString strID; // 접속 ID.
|
||||
CString szIPAddress; // 접속 IP.
|
||||
UINT uPort; // 접속 Port.
|
||||
CTime TimeStarted; // 접속 시각.
|
||||
|
||||
CStringList szMessagesList; // 서버가 수신한 데이터를 문자열로 변환후 보관.(원본Data를 자료구조 그대로 파일로그로 남기는기능은 추가예정)
|
||||
};
|
||||
Reference in New Issue
Block a user