LeviLamina
Loading...
Searching...
No Matches
CCRakNetSlidingWindow.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/raknet/uint24_t.h"
7
8namespace RakNet {
9
10class CCRakNetSlidingWindow {
11public:
12 // member variables
13 // NOLINTBEGIN
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;
27 // NOLINTEND
28
29public:
30 // member functions
31 // NOLINTBEGIN
32 MCAPI CCRakNetSlidingWindow();
33
34 MCAPI ::RakNet::uint24_t GetAndIncrementNextDatagramSequenceNumber();
35
36 MCFOLD uint64 GetBytesPerSecondLimitByCongestionControl() const;
37
38 MCFOLD uint GetMTU() const;
39
40 MCAPI ::RakNet::uint24_t GetNextDatagramSequenceNumber();
41
42 MCAPI uint64 GetRTOForRetransmission(uchar timesSent) const;
43
44 MCFOLD int GetRetransmissionBandwidth(
45 uint64 curTime,
46 uint64 timeSinceLastTick,
47 uint unacknowledgedBytes,
48 bool isContinuousSend
49 );
50
51 MCAPI int
52 GetTransmissionBandwidth(uint64 curTime, uint64 timeSinceLastTick, uint unacknowledgedBytes, bool isContinuousSend);
53
54 MCAPI void Init(uint64 curTime, uint maxDatagramPayload);
55
56 MCAPI bool IsInSlowStart() const;
57
58 MCAPI void OnAck(
59 uint64 curTime,
60 uint64 rtt,
61 bool hasBAndAS,
62 double _B,
63 double _AS,
64 double totalUserDataBytesAcked,
65 bool isContinuousSend,
66 ::RakNet::uint24_t sequenceNumber
67 );
68
69 MCAPI bool OnGotPacket(
70 ::RakNet::uint24_t datagramSequenceNumber,
71 bool isContinuousSend,
72 uint64 curTime,
73 uint sizeInBytes,
74 uint* skippedMessageCount
75 );
76
77 MCFOLD void OnGotPacketPair(::RakNet::uint24_t datagramSequenceNumber, uint sizeInBytes, uint64 curTime);
78
79 MCAPI void OnNAK(uint64 curTime, ::RakNet::uint24_t nakSequenceNumber);
80
81 MCAPI void OnResend(uint64 curTime, uint64 nextActionTime);
82
83 MCAPI void OnSendAck(uint64 curTime, uint numBytes);
84
85 MCAPI void OnSendAckGetBAndAS(uint64 curTime, bool* hasBAndAS, double* _B, double* _AS);
86
87 MCFOLD void OnSendBytes(uint64 curTime, uint numBytes);
88
89 MCAPI bool ShouldSendACKs(uint64 curTime, uint64 estimatedTimeToNextTick);
90
91 MCFOLD void Update(uint64 curTime, bool hasDataToSendOrResend);
92
93 MCAPI ~CCRakNetSlidingWindow();
94 // NOLINTEND
95
96public:
97 // static functions
98 // NOLINTBEGIN
99 MCAPI static bool LessThan(::RakNet::uint24_t a, ::RakNet::uint24_t b);
100 // NOLINTEND
101
102public:
103 // constructor thunks
104 // NOLINTBEGIN
105 MCAPI void* $ctor();
106 // NOLINTEND
107
108public:
109 // destructor thunk
110 // NOLINTBEGIN
111 MCFOLD void $dtor();
112 // NOLINTEND
113};
114
115} // namespace RakNet
Definition uint24_t.h:7