mirror of https://github.com/ShaYmez/xlxd.git
parent
a81d1743a8
commit
887edaf00d
|
@ -26,6 +26,20 @@
|
|||
#include <string.h>
|
||||
#include "cudpmsgsocket.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
// open
|
||||
bool CUdpMsgSocket::Open(uint16 uiPort)
|
||||
{
|
||||
bool ret;
|
||||
int on = 1;
|
||||
|
||||
ret = CUdpSocket::Open(uiPort);
|
||||
setsockopt(m_Socket, IPPROTO_IP, IP_PKTINFO, (char *)&on, sizeof(on));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
// read
|
||||
|
||||
|
|
|
@ -39,6 +39,9 @@
|
|||
class CUdpMsgSocket : public CUdpSocket
|
||||
{
|
||||
public:
|
||||
// open
|
||||
bool Open(uint16);
|
||||
|
||||
// read
|
||||
int Receive(CBuffer *, CIp *, int);
|
||||
|
||||
|
|
Loading…
Reference in New Issue