LeviLamina
Loading...
Searching...
No Matches
ClientNetworkSystem.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/threading/Async.h"
7#include "mc/deps/core/threading/TaskGroup.h"
8#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
9#include "mc/deps/core/utility/NonOwnerPointer.h"
10#include "mc/deps/core/utility/UniqueOwnerPointer.h"
11#include "mc/deps/core/utility/pub_sub/Subscription.h"
12#include "mc/network/IGameConnectionInfoProvider.h"
13#include "mc/network/NetworkSystem.h"
14#include "mc/platform/brstd/function_ref.h"
15
16// auto generated forward declare list
17// clang-format off
18class AppPlatform;
25class NetworkSummary;
26class Scheduler;
31namespace Json { class Value; }
32namespace NetherNet { struct NetworkID; }
33namespace PlayerMessaging { struct NetworkID; }
34namespace Social { class GameConnectionInfo; }
35// clang-format on
36
37class ClientNetworkSystem : public ::Social::IGameConnectionInfoProvider,
39 public ::NetworkSystem {
40public:
41 // ClientNetworkSystem inner types define
42 using DependencyFactory = ::brstd::function_ref<::NetworkSystem::Dependencies()>;
43
45
46public:
47 // member variables
48 // NOLINTBEGIN
49 ::ll::TypedStorage<8, 336, ::TaskGroup> mTaskGroup;
50 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::SignalingService>> mSignalingService;
51 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mUserLoggingSub;
52 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mUserConnectionQualitySub;
53 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mDisableLanSignalingSub;
54 ::ll::TypedStorage<8, 16, ::Bedrock::UniqueOwnerPointer<::NetworkSummary>> mNetworkSummary;
55 // NOLINTEND
56
57#ifdef LL_PLAT_S
58#else // LL_PLAT_C
59public:
60 // prevent constructor by default
61 ClientNetworkSystem();
62
63#endif
64public:
65 // virtual functions
66 // NOLINTBEGIN
67#ifdef LL_PLAT_S
68 virtual ~ClientNetworkSystem() /*override*/ = default;
69#else // LL_PLAT_C
70 virtual ~ClientNetworkSystem() /*override*/;
71#endif
72
73 virtual ::Social::GameConnectionInfo const& getConnectionInfo() const /*override*/;
74
75 virtual ::std::optional<::std::string> getNetworkInfoString() const /*override*/;
76 // NOLINTEND
77
78public:
79 // member functions
80 // NOLINTBEGIN
81#ifdef LL_PLAT_C
82 MCNAPI ClientNetworkSystem(
84 ::brstd::function_ref<::std::unique_ptr<::NetworkStatistics>()>
85 );
86
87 MCNAPI ClientNetworkSystem(
88 ::Scheduler& receiveThread,
89 ::std::vector<::std::string> const& overrideBroadcastAddresses,
90 ::NetworkSystemToggles const& networkToggles,
93 ::Bedrock::NotNullNonOwnerPtr<::NetworkSessionOwner> networkSessionOwner,
94 ::std::unique_ptr<::IPacketSerializationController> packetController
95 );
96
97 MCNAPI bool
98 connect(::Social::GameConnectionInfo const& gameConnection, ::Social::GameConnectionInfo const& backupConnection);
99
100 MCNAPI ::std::shared_ptr<::SignalingServiceSignInJob> createSignalingServiceSigninJobIfNeeded(
101 ::std::shared_ptr<::SignalingService> signalingService,
102 ::Bedrock::Threading::Async<::std::optional<::PlayerMessaging::NetworkID>>&& playerMessagingId
103 );
104
105 MCNAPI ::NetherNet::NetworkID getConnectorNetherNetId() const;
106
107 MCNAPI ::std::pair<::Json::Value, ::Json::Value> getPacketTraces() const;
108
109 MCNAPI void getPingTimeForConnection(
110 ::Social::GameConnectionInfo const& connection,
111 ::std::function<void(uint)> pingTimeCallback
112 );
113
114 MCNAPI void registerForPrimaryUserOptionChanges(::ClientNetworkSystemOptions const& primaryUserOptions);
115
116 MCNAPI void setupNetworkSummary(
117 ::std::function<bool()> isInGame,
118 ::std::function<bool()> isSignedIntoSignalingService,
119 ::std::function<bool()> isHostingLocalDedicatedServer
120 );
121#endif
122
123 MCNAPI ::std::optional<::NetworkIdentifier> tryGetLocalNetworkId() const;
124
125#ifdef LL_PLAT_C
126 MCNAPI ::std::optional<::NetworkIdentifier> tryGetPrimaryNetworkId() const;
127#endif
128
129 MCNAPI ::std::optional<::NetworkIdentifier> tryGetServerId() const;
130 // NOLINTEND
131
132public:
133 // static functions
134 // NOLINTBEGIN
135#ifdef LL_PLAT_C
136 MCNAPI static ::NetworkSystem::Dependencies _createConstructionDependencies(
137 ::ClientNetworkSystem* pThis,
138 ::Scheduler& recieveThread,
139 ::std::vector<::std::string> const& overrideBroadcastAddresses,
140 ::NetworkSystemToggles const& networkToggles,
141 ::NetherNetTransportFactory const& transportFactory,
143 ::Bedrock::NotNullNonOwnerPtr<::NetworkSessionOwner> networkSessionOwner,
144 ::std::unique_ptr<::IPacketSerializationController> packetController
145 );
146#endif
147 // NOLINTEND
148
149public:
150 // constructor thunks
151 // NOLINTBEGIN
152#ifdef LL_PLAT_C
153 MCNAPI void* $ctor(
155 ::brstd::function_ref<::std::unique_ptr<::NetworkStatistics>()>
156 );
157
158 MCNAPI void* $ctor(
159 ::Scheduler& receiveThread,
160 ::std::vector<::std::string> const& overrideBroadcastAddresses,
161 ::NetworkSystemToggles const& networkToggles,
164 ::Bedrock::NotNullNonOwnerPtr<::NetworkSessionOwner> networkSessionOwner,
165 ::std::unique_ptr<::IPacketSerializationController> packetController
166 );
167#endif
168 // NOLINTEND
169
170public:
171 // destructor thunk
172 // NOLINTBEGIN
173 MCNAPI void $dtor();
174 // NOLINTEND
175
176public:
177 // virtual function thunks
178 // NOLINTBEGIN
179#ifdef LL_PLAT_C
180 MCNAPI ::Social::GameConnectionInfo const& $getConnectionInfo() const;
181
182 MCNAPI ::std::optional<::std::string> $getNetworkInfoString() const;
183#endif
184
185
186 // NOLINTEND
187
188public:
189 // vftables
190 // NOLINTBEGIN
191 MCNAPI static void** $vftableForIPSupportInterface();
192
194
196
197 MCNAPI static void** $vftableForConnectionCallbacks();
198
200 // NOLINTEND
201};
Definition AppPlatform.h:91
Definition EnableNonOwnerReferences.h:7
Definition NonOwnerPointer.h:9
Definition Async.h:8
static MCAPI void ** $vftableForConnectionCallbacks()
static MCAPI void ** $vftableForNetworkEnableDisableListener()
MCAPI void $dtor()
static MCAPI void ** $vftableForIPSupportInterface()
static MCAPI void ** $vftableForEnableNonOwnerReferences()
MCAPI ::std::optional<::NetworkIdentifier > tryGetLocalNetworkId() const
static MCAPI void ** $vftableForIGameConnectionInfoProvider()
MCAPI ::std::optional<::NetworkIdentifier > tryGetServerId() const
Definition IPacketSerializationController.h:9
Definition Value.h:16
Definition NetherNetTransportFactory.h:18
Definition NetworkDebugManager.h:15
Definition NetworkIdentifier.h:10
Definition NetworkSessionOwner.h:9
Definition NetworkStatistics.h:23
Definition NetworkSummary.h:8
Definition Scheduler.h:15
Definition SignalingServiceSignInJob.h:23
Definition SignalingService.h:41
Definition GameConnectionInfo.h:23
Definition IGameConnectionInfoProvider.h:12
Definition function_ref.h:60
Definition ClientNetworkSystemOptions.h:5
Definition NetworkID.h:17
Definition NetworkSystemToggles.h:11
Definition NetworkSystem.h:59
Definition NetworkID.h:13