M
Mark van Heeswijk
Hi all,
currently i'm working on a client-server application...
when doing an UDP-broadcast the packet is received ok, at the other side,
but for some reason after that
_ANOTHER_ packet is received that has source-address 255.255.255.255, which
i didn't send.
This packet generates an error when received :
error 10054 - connection reset by peer
below is what i use to receive, and the piece of code to set the options:
----------------------------------------------------------------------------
--------------------------------------------
recvfrom( GlobalSocket, tempBuff, sizeof(tempBuff), (int)NULL, (SOCKADDR
*)&remote_sockaddr_in,(int *) )
----------------------------------------------------------------------------
--------------------------------------------
&remote_sockaddr_length);
//ENABLE BROADCAST
BOOL fBroadcast = TRUE;
int err = setsockopt ( GlobalSocket,
SOL_SOCKET,
SO_BROADCAST,
(CHAR *) &fBroadcast,
sizeof ( BOOL )
);
----------------------------------------------------------------------------
--------------------------------------------
Is anybody familiar with this? What could be causing this?
Thanks in advance,
Mark
currently i'm working on a client-server application...
when doing an UDP-broadcast the packet is received ok, at the other side,
but for some reason after that
_ANOTHER_ packet is received that has source-address 255.255.255.255, which
i didn't send.
This packet generates an error when received :
error 10054 - connection reset by peer
below is what i use to receive, and the piece of code to set the options:
----------------------------------------------------------------------------
--------------------------------------------
recvfrom( GlobalSocket, tempBuff, sizeof(tempBuff), (int)NULL, (SOCKADDR
*)&remote_sockaddr_in,(int *) )
----------------------------------------------------------------------------
--------------------------------------------
&remote_sockaddr_length);
//ENABLE BROADCAST
BOOL fBroadcast = TRUE;
int err = setsockopt ( GlobalSocket,
SOL_SOCKET,
SO_BROADCAST,
(CHAR *) &fBroadcast,
sizeof ( BOOL )
);
----------------------------------------------------------------------------
--------------------------------------------
Is anybody familiar with this? What could be causing this?
Thanks in advance,
Mark