UDM Msg update

Fix for sockopt on open
pull/140/head
Marius Petrescu, YO2LOJ 6 years ago
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…
Cancel
Save

Powered by TurnKey Linux.