Add the remaining unreliable fragment flags
This commit is contained in:
parent
5d3304b1c0
commit
b0f20ca5a5
@ -77,7 +77,9 @@ ENetPacket* Crypto::encryptSend(BareNetworkString& ns, bool reliable)
|
|||||||
{
|
{
|
||||||
// 4 bytes counter and 4 bytes tag
|
// 4 bytes counter and 4 bytes tag
|
||||||
ENetPacket* p = enet_packet_create(NULL, ns.m_buffer.size() + 8,
|
ENetPacket* p = enet_packet_create(NULL, ns.m_buffer.size() + 8,
|
||||||
(reliable ? ENET_PACKET_FLAG_RELIABLE : ENET_PACKET_FLAG_UNSEQUENCED));
|
(reliable ? ENET_PACKET_FLAG_RELIABLE :
|
||||||
|
(ENET_PACKET_FLAG_UNSEQUENCED | ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT))
|
||||||
|
);
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
@ -181,8 +181,9 @@ int Network::receiveRawPacket(char *buffer, int buf_len,
|
|||||||
void Network::broadcastPacket(NetworkString *data, bool reliable)
|
void Network::broadcastPacket(NetworkString *data, bool reliable)
|
||||||
{
|
{
|
||||||
ENetPacket* packet = enet_packet_create(data->getData(), data->size() + 1,
|
ENetPacket* packet = enet_packet_create(data->getData(), data->size() + 1,
|
||||||
reliable ? ENET_PACKET_FLAG_RELIABLE
|
(reliable ? ENET_PACKET_FLAG_RELIABLE :
|
||||||
: ENET_PACKET_FLAG_UNSEQUENCED);
|
(ENET_PACKET_FLAG_UNSEQUENCED | ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT))
|
||||||
|
);
|
||||||
enet_host_broadcast(m_host, 0, packet);
|
enet_host_broadcast(m_host, 0, packet);
|
||||||
} // broadcastPacket
|
} // broadcastPacket
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user