2024-02-01 00:14:32 +08:00
|
|
|
// TODO: Implement ReliabilityLayer.h
|
|
|
|
|
|
|
|
#ifndef __RELIABILITY_LAYER_H
|
|
|
|
#define __RELIABILITY_LAYER_H
|
|
|
|
|
|
|
|
#include "SocketLayer.h"
|
2024-04-14 19:05:41 +08:00
|
|
|
#include "MTUSize.h"
|
2024-04-14 22:29:40 +08:00
|
|
|
#include "RakNetStatistics.h"
|
2024-02-01 00:14:32 +08:00
|
|
|
|
|
|
|
class ReliabilityLayer
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
/// Constructor
|
|
|
|
ReliabilityLayer();
|
|
|
|
|
2024-04-14 22:23:30 +08:00
|
|
|
/// Sets the ping, which is used by the reliability layer to determine how long to wait for resends. Mostly for flow control.
|
|
|
|
/// \param[in] The ping time.
|
|
|
|
void SetPing( RakNetTime i );
|
|
|
|
|
2024-04-14 22:10:48 +08:00
|
|
|
private:
|
|
|
|
|
2024-02-01 00:14:32 +08:00
|
|
|
// Initialize the variables
|
|
|
|
void InitializeVariables( void );
|
|
|
|
|
2024-04-14 22:10:48 +08:00
|
|
|
// Make it so we don't do resends within a minimum threshold of time
|
|
|
|
void UpdateNextActionTime(void);
|
|
|
|
|
|
|
|
char _gap0[713];
|
|
|
|
|
|
|
|
RakNetTime ping;
|
|
|
|
|
2024-04-14 22:23:30 +08:00
|
|
|
char _gap2D1[2];
|
|
|
|
|
|
|
|
RakNetTime timeoutTime; // How long to wait in MS before timing someone out
|
|
|
|
|
2024-04-14 22:29:40 +08:00
|
|
|
char _gap2D7[4];
|
|
|
|
|
|
|
|
RakNetStatisticsStruct statistics;
|
|
|
|
|
|
|
|
unsigned int field_403;
|
|
|
|
|
|
|
|
char _gap407[710];
|
2024-04-14 22:10:48 +08:00
|
|
|
|
|
|
|
RakNetTimeNS ackTimeIncrement;
|
2024-04-14 22:23:30 +08:00
|
|
|
|
|
|
|
char _gap6D1[25];
|
|
|
|
|
|
|
|
// Internet simulator
|
|
|
|
RakNetTime minExtraPing, extraPingVariance;
|
|
|
|
|
2024-02-01 00:14:32 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|