UDP/UDPtext_shou/UDP.h

31 lines
747 B
C
Raw Permalink Normal View History

// UDP.h: interface for the CUDP class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_UDP_H__6E2A5C37_2073_4C02_8FC2_1255471C0157__INCLUDED_)
#define AFX_UDP_H__6E2A5C37_2073_4C02_8FC2_1255471C0157__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <stdlib.h>
#include <winsock.h>
#pragma comment(lib,"ws2_32.lib")
class CUDP
{
public:
CUDP();
virtual ~CUDP();
public:
int m_SocketSend;
int m_SocketRecv;
void init();
void UDPSend(char buf[],int len,unsigned short PortNo,const char* IP);
void UDPRecv(char buf[],int len,unsigned short PortNo,const char* IP);
void UDPClose();
};
#endif // !defined(AFX_UDP_H__6E2A5C37_2073_4C02_8FC2_1255471C0157__INCLUDED_)