udpsocket.h

来自「UDP语音通讯控件源码」· C头文件 代码 · 共 63 行

H
63
字号
#if !defined(AFX_UDPSOCKET_H__0A297728_20FE_4B3D_832C_0884257B0B85__INCLUDED_)
#define AFX_UDPSOCKET_H__0A297728_20FE_4B3D_832C_0884257B0B85__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// UdpSocket.h : header file
//

#include <afxsock.h>
#include "SortData.h"	// Added by ClassView

/////////////////////////////////////////////////////////////////////////////
// CUdpSocket command target
class CUdpSocket : public CAsyncSocket
{
// Attributes
public:
	BOOL CloseSocket();
	BOOL Ini(UINT nPort);

// Operations
public:
	CUdpSocket();
	virtual ~CUdpSocket();

// Overrides
public:
	void SetIp(CString ip);
	void SetPort(UINT nPort);
	CSortData m_sort;
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CUdpSocket)
	public:
	virtual int Send(const void* lpBuf, int nBufLen, int nFlags = 0);
	virtual void OnReceive(int nErrorCode);
	//}}AFX_VIRTUAL

	// Generated message map functions
	//{{AFX_MSG(CUdpSocket)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG

// Implementation
protected:
	BOOL m_bIni;
	struct Frame *m_pFrame;
	struct Frame *m_recvpFrame;
	int m_iLen;
	char m_cOut[1024];
	CString m_ip;
	UINT    m_nPort;
	char m_cBuffer[1024];
	char m_RBuffer[1024];
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_UDPSOCKET_H__0A297728_20FE_4B3D_832C_0884257B0B85__INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?