forked from teamnwah/openmw-tes3coop
[General] Return sent packet number
This commit is contained in:
parent
73118ea575
commit
8384a8aa8a
2 changed files with 9 additions and 9 deletions
|
@ -48,26 +48,26 @@ void BasePacket::SetStreams(RakNet::BitStream *inStream, RakNet::BitStream *outS
|
|||
bsSend = outStream;
|
||||
}
|
||||
|
||||
void BasePacket::RequestData(RakNet::RakNetGUID guid)
|
||||
uint32_t BasePacket::RequestData(RakNet::RakNetGUID guid)
|
||||
{
|
||||
bsSend->ResetWritePointer();
|
||||
bsSend->Write(packetID);
|
||||
bsSend->Write(guid);
|
||||
peer->Send(bsSend, HIGH_PRIORITY, RELIABLE_ORDERED, orderChannel, guid, false);
|
||||
return peer->Send(bsSend, HIGH_PRIORITY, RELIABLE_ORDERED, orderChannel, guid, false);
|
||||
}
|
||||
|
||||
void BasePacket::Send(RakNet::AddressOrGUID destination)
|
||||
uint32_t BasePacket::Send(RakNet::AddressOrGUID destination)
|
||||
{
|
||||
bsSend->ResetWritePointer();
|
||||
Packet(bsSend, true);
|
||||
peer->Send(bsSend, priority, reliability, orderChannel, destination, false);
|
||||
return peer->Send(bsSend, priority, reliability, orderChannel, destination, false);
|
||||
}
|
||||
|
||||
void BasePacket::Send(bool toOther)
|
||||
uint32_t BasePacket::Send(bool toOther)
|
||||
{
|
||||
bsSend->ResetWritePointer();
|
||||
Packet(bsSend, true);
|
||||
peer->Send(bsSend, priority, reliability, orderChannel, guid, toOther);
|
||||
return peer->Send(bsSend, priority, reliability, orderChannel, guid, toOther);
|
||||
}
|
||||
|
||||
void BasePacket::Read()
|
||||
|
|
|
@ -17,8 +17,8 @@ namespace mwmp
|
|||
virtual ~BasePacket();
|
||||
|
||||
virtual void Packet(RakNet::BitStream *bs, bool send);
|
||||
virtual void Send(bool toOtherPlayers = true);
|
||||
virtual void Send(RakNet::AddressOrGUID destination);
|
||||
virtual uint32_t Send(bool toOtherPlayers = true);
|
||||
virtual uint32_t Send(RakNet::AddressOrGUID destination);
|
||||
virtual void Read();
|
||||
|
||||
void setGUID(RakNet::RakNetGUID guid);
|
||||
|
@ -27,7 +27,7 @@ namespace mwmp
|
|||
void SetReadStream(RakNet::BitStream *bitStream);
|
||||
void SetSendStream(RakNet::BitStream *bitStream);
|
||||
void SetStreams(RakNet::BitStream *inStream, RakNet::BitStream *outStream);
|
||||
virtual void RequestData(RakNet::RakNetGUID guid);
|
||||
virtual uint32_t RequestData(RakNet::RakNetGUID guid);
|
||||
|
||||
static size_t headerSize()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue