[ENet-discuss] RE: enet_host_connect using a broadcast address
LoneSock
lonesock at gmail.com
Fri Mar 18 15:13:51 PST 2005
sorry, me again. I made two more tiny changes.
[in enet.h]
enum
{
ENET_HOST_ANY = 0,
ENET_HOST_BROADCAST = 0xFFFFFFFFL
};
[and in protocol.h again, I changed the magic number to use the constant]
if (peer -> state == ENET_PEER_STATE_DISCONNECTED ||
peer -> state == ENET_PEER_STATE_ZOMBIE ||
(host -> receivedAddress.host != peer -> address.host &&
peer -> address.host != ENET_HOST_BROADCAST) || // allow any addr
if broadcast
header -> challenge != peer -> challenge)
return 0;
else
{
peer -> address.host = host -> receivedAddress.host; // just
in case of broadcast
peer -> address.port = host -> receivedAddress.port;
}
--
Piranha are people too.
More information about the ENet-discuss
mailing list