LeviLamina
Loading...
Searching...
No Matches
NetworkPeer.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/network/Compressibility.h"
7
9public:
10 // NetworkPeer inner types declare
11 // clang-format off
12 struct NetworkStatus;
13 // clang-format on
14
15 // NetworkPeer inner types define
16 using PacketRecvTimepoint = ::std::chrono::steady_clock::time_point;
17
18 using PacketRecvTimepointPtr = ::std::shared_ptr<::std::chrono::steady_clock::time_point>;
19
20 enum class Reliability : int {
21 Reliable = 0,
22 ReliableOrdered = 1,
23 Unreliable = 2,
24 UnreliableSequenced = 3,
25 };
26
27 enum class DataStatus : int {
28 HasData = 0,
29 NoData = 1,
30 BrokenData = 2,
31 };
32
33 enum class NetworkLoad : int {
34 Unrestricted = 0,
35 Low = 1,
36 Medium = 2,
37 High = 3,
38 };
39
41 public:
42 // member variables
43 // NOLINTBEGIN
44 ::ll::TypedStorage<4, 4, ::NetworkPeer::NetworkLoad> mLoad;
45 ::ll::TypedStorage<4, 4, int> mCurrentPing;
46 ::ll::TypedStorage<4, 4, int> mAveragePing;
47 ::ll::TypedStorage<4, 4, int> mApproximateMaxBps;
48 ::ll::TypedStorage<4, 4, float> mCurrentPacketLoss;
49 ::ll::TypedStorage<4, 4, float> mAveragePacketLoss;
50 ::ll::TypedStorage<8, 8, uint64> mTotalBytesReceived;
51 ::ll::TypedStorage<8, 8, uint64> mTotalBytesSent;
52 ::ll::TypedStorage<8, 8, uint64> mCurrentBytesSendBuffer;
53 ::ll::TypedStorage<4, 4, int> mICEState;
54 ::ll::TypedStorage<1, 1, bool> mUsingRelays;
55 // NOLINTEND
56 };
57
58public:
59 // member variables
60 // NOLINTBEGIN
61 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::NetworkPeer>> mPeer;
62 // NOLINTEND
63
64public:
65 // virtual functions
66 // NOLINTBEGIN
67 // vIndex: 0
68 virtual ~NetworkPeer();
69
70 // vIndex: 1
71 virtual void sendPacket(::std::string const&, ::NetworkPeer::Reliability, ::Compressibility) = 0;
72
73 // vIndex: 2
74 virtual ::NetworkPeer::DataStatus
75 receivePacket(::std::string&, ::std::shared_ptr<::std::chrono::steady_clock::time_point> const&) = 0;
76
77 // vIndex: 3
78 virtual ::NetworkPeer::NetworkStatus getNetworkStatus() const = 0;
79
80 // vIndex: 4
81 virtual void update();
82
83 // vIndex: 5
84 virtual void flush(::std::function<void()>&& callback);
85
86 // vIndex: 6
87 virtual bool isLocal() const;
88
89 // vIndex: 7
90 virtual bool isEncrypted() const;
91 // NOLINTEND
92
93public:
94 // destructor thunk
95 // NOLINTBEGIN
96 MCAPI void $dtor();
97 // NOLINTEND
98
99public:
100 // virtual function thunks
101 // NOLINTBEGIN
102 MCAPI void $update();
103
104 MCAPI void $flush(::std::function<void()>&& callback);
105
106 MCAPI bool $isLocal() const;
107
108 MCAPI bool $isEncrypted() const;
109 // NOLINTEND
110
111public:
112 // vftables
113 // NOLINTBEGIN
114 MCAPI static void** $vftable();
115 // NOLINTEND
116};
Definition NetworkPeer.h:8
Definition NetworkPeer.h:40