10class CCRakNetSlidingWindow {
14 ::ll::TypedStorage<4, 4, uint> MAXIMUM_MTU_INCLUDING_UDP_HEADER;
15 ::ll::TypedStorage<8, 8, double> cwnd;
16 ::ll::TypedStorage<8, 8, double> ssThresh;
17 ::ll::TypedStorage<8, 8, uint64> oldestUnsentAck;
18 ::ll::TypedStorage<4, 4, ::RakNet::uint24_t> nextDatagramSequenceNumber;
19 ::ll::TypedStorage<4, 4, ::RakNet::uint24_t> nextCongestionControlBlock;
20 ::ll::TypedStorage<1, 1, bool> backoffThisBlock;
21 ::ll::TypedStorage<1, 1, bool> speedUpThisBlock;
22 ::ll::TypedStorage<4, 4, ::RakNet::uint24_t> expectedNextSequenceNumber;
23 ::ll::TypedStorage<1, 1, bool> _isContinuousSend;
24 ::ll::TypedStorage<8, 8, double> lastRtt;
25 ::ll::TypedStorage<8, 8, double> estimatedRTT;
26 ::ll::TypedStorage<8, 8, double> deviationRtt;
32 MCAPI CCRakNetSlidingWindow();
34 MCAPI ::RakNet::uint24_t GetAndIncrementNextDatagramSequenceNumber();
36 MCFOLD uint64 GetBytesPerSecondLimitByCongestionControl()
const;
38 MCFOLD uint GetMTU()
const;
40 MCAPI ::RakNet::uint24_t GetNextDatagramSequenceNumber();
42 MCAPI uint64 GetRTOForRetransmission(uchar timesSent)
const;
44 MCFOLD
int GetRetransmissionBandwidth(
46 uint64 timeSinceLastTick,
47 uint unacknowledgedBytes,
52 GetTransmissionBandwidth(uint64 curTime, uint64 timeSinceLastTick, uint unacknowledgedBytes,
bool isContinuousSend);
54 MCAPI
void Init(uint64 curTime, uint maxDatagramPayload);
56 MCAPI
bool IsInSlowStart()
const;
64 double totalUserDataBytesAcked,
65 bool isContinuousSend,
69 MCAPI
bool OnGotPacket(
71 bool isContinuousSend,
74 uint* skippedMessageCount
77 MCFOLD
void OnGotPacketPair(
::RakNet::uint24_t datagramSequenceNumber, uint sizeInBytes, uint64 curTime);
81 MCAPI
void OnResend(uint64 curTime, uint64 nextActionTime);
83 MCAPI
void OnSendAck(uint64 curTime, uint numBytes);
85 MCAPI
void OnSendAckGetBAndAS(uint64 curTime,
bool* hasBAndAS,
double* _B,
double* _AS);
87 MCFOLD
void OnSendBytes(uint64 curTime, uint numBytes);
89 MCAPI
bool ShouldSendACKs(uint64 curTime, uint64 estimatedTimeToNextTick);
91 MCFOLD
void Update(uint64 curTime,
bool hasDataToSendOrResend);
93 MCAPI ~CCRakNetSlidingWindow();