This commit is contained in:
Lynix
2017-01-26 09:28:41 +01:00
parent 9e3341a32a
commit 12b4073033
4 changed files with 433 additions and 69 deletions

View File

@@ -63,9 +63,15 @@ namespace Nz
bool DispatchIncomingCommands(ENetEvent* event);
bool HandleAcknowledge(ENetEvent* event, ENetPeer* peer, const ENetProtocol* command);
bool HandleBandwidthLimit(ENetPeer* peer, const ENetProtocol* command);
ENetPeer* HandleConnect(ENetProtocolHeader* header, ENetProtocol* command);
bool HandleDisconnect(ENetPeer* peer, const ENetProtocol* command);
bool HandleIncomingCommands(ENetEvent* event);
bool HandleSendReliable(ENetPeer& peer, const ENetProtocol& command, UInt8** currentData);
bool HandlePing(ENetPeer* peer, const ENetProtocol* command);
bool HandleSendReliable(ENetPeer* peer, const ENetProtocol* command, UInt8** currentData);
bool HandleThrottleConfigure(ENetPeer* peer, const ENetProtocol* command);
bool HandleVerifyConnect(ENetEvent* event, ENetPeer* peer, ENetProtocol* command);
int ReceiveIncomingCommands(ENetEvent* event);

View File

@@ -74,15 +74,15 @@ namespace Nz
void OnConnect();
void OnDisconnect();
ENetProtocolCommand RemoveSentReliableCommands(UInt16 reliableSequenceNumber, UInt8 channelId);
ENetProtocolCommand RemoveSentReliableCommand(UInt16 reliableSequenceNumber, UInt8 channelId);
void RemoveSentUnreliableCommands();
void ResetQueues();
bool QueueAcknowledgement(ENetProtocol& command, UInt16 sentTime);
bool QueueAcknowledgement(ENetProtocol* command, UInt16 sentTime);
IncomingCommmand* QueueIncomingCommand(ENetProtocol& command, const void* data, std::size_t dataLength, UInt32 flags, UInt32 fragmentCount);
void QueueOutgoingCommand(ENetProtocol& command, ENetPacketRef packet, UInt32 offset, UInt16 length);
void SetupOutgoingCommand(OutgoingCommand& outgoingCommand);
int Throttle(UInt32 rtt);