LeviLamina
Loading...
Searching...
No Matches
NetworkConnection.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4#include "mc/deps/core/NetworkConnectionType.h"
5#include "mc/network/BatchedNetworkPeer.h"
6#include "mc/network/CompressedNetworkPeer.h"
7#include "mc/network/EncryptedNetworkPeer.h"
8#include "mc/network/NetworkIdentifier.h"
9
10// auto generated inclusion list
11#include "mc/deps/core/utility/NonOwnerPointer.h"
12#include "mc/network/NetworkIdentifier.h"
13#include "mc/network/NetworkPeer.h"
14
15// auto generated forward declare list
16// clang-format off
20class IPacketObserver;
24class NetworkPeer;
26class Scheduler;
28// clang-format on
29
31public:
32 // NetworkConnection inner types declare
33 // clang-format off
34 struct PausedPacket;
35 // clang-format on
36
37 // NetworkConnection inner types define
38 enum class Type : int {
39 Remote = 0,
40 Local = 1,
41 };
42
43 struct PausedPacket {
44 public:
45 // member variables
46 // NOLINTBEGIN
47 ::ll::TypedStorage<8, 32, ::std::string> mData;
48 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mTimepoint;
49 // NOLINTEND
50
51 public:
52 // member functions
53 // NOLINTBEGIN
54 MCNAPI ~PausedPacket();
55 // NOLINTEND
56
57 public:
58 // destructor thunk
59 // NOLINTBEGIN
60 MCNAPI void $dtor();
61 // NOLINTEND
62 };
63
64public:
65 // member variables
66 // NOLINTBEGIN
67 ::ll::TypedStorage<8, 176, ::NetworkIdentifier> mId;
68 ::ll::TypedStorage<4, 4, ::NetworkConnection::Type> mType;
69 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::NetworkPacketRecorder>> mNetworkPacketRecorder;
70 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::EncryptedNetworkPeer>> mEncryptedPeer;
71 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::CompressedNetworkPeer>> mCompressedPeer;
72 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::BatchedNetworkPeer>> mBatchedPeer;
73 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::LatencyNetworkPeer>> mLatencyPeer;
74 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::PacketTraceNetworkPeer>> mPacketTracePeer;
75 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::NetworkPeer>> mPeer;
76 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastPacketTime;
77 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mClosedTime;
78 ::ll::TypedStorage<4, 4, ::std::bitset<2>> mPausedChannels;
79 ::ll::TypedStorage<
80 8,
81 40,
82 ::std::queue<::NetworkConnection::PausedPacket, ::std::deque<::NetworkConnection::PausedPacket>>>
83 mResumedPackets;
84 ::ll::TypedStorage<8, 48, ::std::array<::std::vector<::NetworkConnection::PausedPacket>, 2>> mPausedPackets;
85 ::ll::TypedStorage<1, 1, bool> mDisconnected;
86 ::ll::TypedStorage<1, 1, bool> mShouldCloseConnection;
87 ::ll::TypedStorage<1, 1, bool> mEncryptionDisabled;
88 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::IPacketSecurityController>> mPacketSecurityController;
89 // NOLINTEND
90
91public:
92 // prevent constructor by default
94
95public:
96 // member functions
97 // NOLINTBEGIN
99 ::NetworkIdentifier const& id,
100 ::std::shared_ptr<::NetworkPeer> peer,
101 bool isSafeAndFast,
103 ::Scheduler& mainThread,
104 bool isRawRecordingEnabled,
105 ::NetworkSettingOptions const& settings,
106 ::std::shared_ptr<::IPacketSecurityController> packetSecurityController
107 );
108
109 MCNAPI ::NetworkPeer::DataStatus receivePacket(
110 ::std::string& receiveBuffer,
111 ::std::shared_ptr<::std::chrono::steady_clock::time_point> const& timepointPtr
112 );
113
115 // NOLINTEND
116
117public:
118 // constructor thunks
119 // NOLINTBEGIN
120 MCNAPI void* $ctor(
121 ::NetworkIdentifier const& id,
122 ::std::shared_ptr<::NetworkPeer> peer,
123 bool isSafeAndFast,
125 ::Scheduler& mainThread,
126 bool isRawRecordingEnabled,
127 ::NetworkSettingOptions const& settings,
128 ::std::shared_ptr<::IPacketSecurityController> packetSecurityController
129 );
130 // NOLINTEND
131
132public:
133 // destructor thunk
134 // NOLINTBEGIN
135 MCNAPI void $dtor();
136 // NOLINTEND
137};
Definition BatchedNetworkPeer.h:21
Definition NonOwnerPointer.h:9
Definition CompressedNetworkPeer.h:11
Definition EncryptedNetworkPeer.h:9
Definition IPacketObserver.h:14
Definition IPacketSecurityController.h:22
Definition LatencyNetworkPeer.h:10
Definition NetworkConnection.h:30
MCAPI void * $ctor(::NetworkIdentifier const &id, ::std::shared_ptr<::NetworkPeer > peer, bool isSafeAndFast, ::Bedrock::NonOwnerPointer<::IPacketObserver > packetObserver, ::Scheduler &mainThread, bool isRawRecordingEnabled, ::NetworkSettingOptions const &settings, ::std::shared_ptr<::IPacketSecurityController > packetSecurityController)
MCAPI NetworkConnection(::NetworkIdentifier const &id, ::std::shared_ptr<::NetworkPeer > peer, bool isSafeAndFast, ::Bedrock::NonOwnerPointer<::IPacketObserver > packetObserver, ::Scheduler &mainThread, bool isRawRecordingEnabled, ::NetworkSettingOptions const &settings, ::std::shared_ptr<::IPacketSecurityController > packetSecurityController)
MCAPI::NetworkPeer::DataStatus receivePacket(::std::string &receiveBuffer, ::std::shared_ptr<::std::chrono::steady_clock::time_point > const &timepointPtr)
MCAPI void $dtor()
MCAPI ~NetworkConnection()
Definition NetworkIdentifier.h:10
Definition NetworkPacketRecorder.h:9
Definition NetworkPeer.h:8
Definition PacketTraceNetworkPeer.h:10
Definition Scheduler.h:13
Definition NetworkConnection.h:43
Definition NetworkSettingOptions.h:9