www.pudn.com > IP_phone.rar > SendSocket.h
/**********************************************************/
/*类名:CSendSocket */
/*简述:用于发送的UDPSocket */
/**********************************************************/
#if !defined(AFX_SENDSOCKET_H__28E2B406_364E_48FC_B493_412CE9E325D2__INCLUDED_)
#define AFX_SENDSOCKET_H__28E2B406_364E_48FC_B493_412CE9E325D2__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// SendSocket.h : header file
//
#include "SortData.h"
/////////////////////////////////////////////////////////////////////////////
// CSendSocket command target
class CSendSocket : public CAsyncSocket
{
// Attributes
public:
//信号量
BOOL m_bIni;
// Operations
public:
//初始化
BOOL Ini();
void SetIp(CString ip);
void SetPort(int temp_port);
BOOL CloseSocket();
CSendSocket();
virtual ~CSendSocket();
// Overrides
public:
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSendSocket)
public:
virtual int Send(const void* lpBuf, int nBufLen, int nFlags = 0);
//}}AFX_VIRTUAL
// Generated message map functions
//{{AFX_MSG(CSendSocket)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG
// Implementation
protected:
CString m_ip;//目标ip
struct Frame *m_pFrame;//frame
int m_port;//send port
char m_cBuffer[60];
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_SENDSOCKET_H__28E2B406_364E_48FC_B493_412CE9E325D2__INCLUDED_)