UDM Msg update

Fix for sockopt on open
This commit is contained in:
Marius Petrescu, YO2LOJ 2020-02-22 17:47:08 +02:00
parent a81d1743a8
commit 887edaf00d
2 changed files with 17 additions and 0 deletions

View File

@ -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

View File

@ -39,6 +39,9 @@
class CUdpMsgSocket : public CUdpSocket
{
public:
// open
bool Open(uint16);
// read
int Receive(CBuffer *, CIp *, int);