5 #define WIN32_LEAN_AND_MEAN 8 #define INVALID_SOCKET -1 17 bool Connect(
const char* pServerAddr,
unsigned short nPort);
20 bool CreateUDPSocket(
unsigned short &nUDPPort,
bool bBroadcast =
false);
21 int Receive(
char* rtDataBuff,
int nDataBufSize,
bool bHeader,
int nTimeout,
unsigned int *ipAddr =
nullptr);
22 bool Send(
const char* pSendBuf,
int nSize);
23 bool SendUDPBroadcast(
const char* pSendBuf,
int nSize,
short nPort,
unsigned int nFilterAddr = 0);
32 void SetErrorString();
38 SOCKET mUDPBroadcastSocket;
40 unsigned long mLastError;
int Receive(char *rtDataBuff, int nDataBufSize, bool bHeader, int nTimeout, unsigned int *ipAddr=nullptr)
unsigned short GetUdpServerPort()
bool CreateUDPSocket(unsigned short &nUDPPort, bool bBroadcast=false)
unsigned short GetUdpBroadcastServerPort()
bool Send(const char *pSendBuf, int nSize)
bool SendUDPBroadcast(const char *pSendBuf, int nSize, short nPort, unsigned int nFilterAddr=0)
bool Connect(const char *pServerAddr, unsigned short nPort)
bool IsLocalAddress(unsigned int nAddr) const