www.pudn.com > IP_phone.rar > ConnectionSocket.h
/**********************************************************/
/*类名:CConnectionSocket */
/*简述:用于消息和指令接收的scoket */
/**********************************************************/
#if !defined(AFX_CONNECTIONSOCKET_H__682900C7_3077_473E_9E9F_71AB2B8632F3__INCLUDED_)
#define AFX_CONNECTIONSOCKET_H__682900C7_3077_473E_9E9F_71AB2B8632F3__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "../tools/NetSettingInfo/NetSettingInfo.h" //加入网络信息检测类
#include "../NC_ClientDlg.h"
// ConnectionSocket.h : header file
//
struct TalkFrame
{
char cFlag[5]; //标志:CON/MSG
char cContent[128]; //内容
char HostName[128]; //主机名
unsigned __int32 iLen;//长度
};
/////////////////////////////////////////////////////////////////////////////
// CConnectionSocket command target
class CConnectionSocket : public CAsyncSocket
//class CConnectionSocket : public CSocket
{
// Attributes
public:
char *m_pBuffer;
CNC_ClientDlg *m_dlg;
// Operations
public:
CConnectionSocket(CNC_ClientDlg *temp);
virtual ~CConnectionSocket();
// Overrides
public:
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CConnectionSocket)
public:
//virtual void OnClose(int nErrorCode);
virtual void OnReceive(int nErrorCode);
virtual void OnConnect(int nErrorCode);
//}}AFX_VIRTUAL
// Generated message map functions
//{{AFX_MSG(CConnectionSocket)
// 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_CONNECTIONSOCKET_H__682900C7_3077_473E_9E9F_71AB2B8632F3__INCLUDED_)