Network/ENetHost: Expose AllocatePacket

This commit is contained in:
SirLynix
2022-09-01 20:21:27 +02:00
parent 25f44a624a
commit 359c176b03
3 changed files with 25 additions and 25 deletions

View File

@@ -20,6 +20,14 @@ namespace Nz
Destroy();
}
inline ENetPacketRef ENetHost::AllocatePacket(ENetPacketFlags flags, NetPacket&& data)
{
ENetPacketRef ref = AllocatePacket(flags);
ref->data = std::move(data);
return ref;
}
inline void ENetHost::AllowsIncomingConnections(bool allow)
{
NazaraAssert(m_address.IsValid() && !m_address.IsLoopback(), "Only server hosts can allow incoming connections");
@@ -101,14 +109,6 @@ namespace Nz
m_compressor = std::move(compressor);
}
inline ENetPacketRef ENetHost::AllocatePacket(ENetPacketFlags flags, NetPacket&& data)
{
ENetPacketRef ref = AllocatePacket(flags);
ref->data = std::move(data);
return ref;
}
inline void ENetHost::UpdateServiceTime()
{
// Compute service time as microseconds for extra precision