46 public ::NetworkEnableDisableListener {
59 ::ll::TypedStorage<8, 8, ::std::reference_wrapper<::Scheduler>> receiveThread;
60 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::RemoteConnector>> remoteConnector;
61 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ServerLocator>> serverLocator;
62 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::AppPlatform>> appPlatform;
63 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::NetworkSessionOwner>> networkSessionOwner;
64 ::ll::TypedStorage<4, 20, ::NetworkSettingOptions> networkSettingOptions;
65 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::IPacketSerializationController>> serializationController;
81 struct IncomingPacketQueue {
85 ::ll::TypedStorage<8, 8, ::NetEventCallback&> mCallbacksObj;
86 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mMutex;
91 IncomingPacketQueue& operator=(IncomingPacketQueue
const&);
92 IncomingPacketQueue(IncomingPacketQueue
const&);
93 IncomingPacketQueue();
99 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::NetworkSessionOwner>> mNetworkSessionOwner;
100 ::ll::TypedStorage<8, 80, ::std::recursive_mutex> mConnectionsMutex;
101 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::NetworkConnection>>> mConnections;
102 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::LocalConnector>> mLocalConnector;
103 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::PacketGroupDefinition::PacketGroupBuilder>> mPacketGroupBuilder;
104 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::RemoteConnector>> mRemoteConnector;
105 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ServerLocator>> mServerLocator;
106 ::ll::TypedStorage<8, 8, uint64> mCurrentConnection;
107 ::ll::TypedStorage<8, 16, ::Bedrock::Threading::Async<void>> mReceiveTask;
108 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::TaskGroup>> mReceiveTaskGroup;
109 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::IPacketObserver>> mPacketObserver;
110 ::ll::TypedStorage<8, 8, ::Scheduler&> mMainThread;
111 ::ll::TypedStorage<8, 32, ::std::string> mReceiveBuffer;
112 ::ll::TypedStorage<8, 32, ::std::string> mSendBuffer;
113 ::ll::TypedStorage<8, 80, ::BinaryStream> mSendStream;
114 ::ll::TypedStorage<8, 32, ::std::unique_ptr<::NetworkSystem::IncomingPacketQueue>[4]> mIncomingPackets;
115 ::ll::TypedStorage<1, 1, bool> mUseIPv6Only;
116 ::ll::TypedStorage<2, 2, ushort> mDefaultGamePort;
117 ::ll::TypedStorage<2, 2, ushort> mDefaultGamePortv6;
118 ::ll::TypedStorage<1, 1, bool> mIsLanDiscoveryEnabled;
119 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::NetworkStatistics>> mNetworkStatistics;
120 ::ll::TypedStorage<1, 1, bool> mWebsocketsEnabled;
121 ::ll::TypedStorage<4, 20, ::NetworkSettingOptions> mNetworkSettingOptions;
122 ::ll::TypedStorage<1, 1, bool> mRawRecordingEnabled;
123 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::cereal::ReflectionCtx>>> mReflectionCtx;
124 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::IPacketSerializationController>>> mPacketOverrides;
128 ::gsl::not_null<::std::unique_ptr<
131 mSessionSummaryPublisher;
136 NetworkSystem& operator=(NetworkSystem
const&);
137 NetworkSystem(NetworkSystem
const&);
146 virtual bool useIPv4Only() const ;
148 virtual
bool useIPv6Only() const ;
150 virtual ushort getDefaultGamePort() const ;
152 virtual ushort getDefaultGamePortv6() const ;
154 virtual ~NetworkSystem() ;
156 virtual
void _onDisable() ;
158 virtual
void _onEnable() ;
166 virtual
void onConnectionClosed(
168 ::Connection::DisconnectFailReason const discoReason,
169 ::
std::
string const& reasonMessage,
170 bool skipDisconnectMessage,
171 ::Json::Value const& sessionSummary
174 virtual
void onAllConnectionsClosed(::Connection::DisconnectFailReason, ::
std::
string const&,
bool) ;
177 onAllRemoteConnectionsClosed(::Connection::DisconnectFailReason, ::
std::
string const&,
bool) ;
179 virtual
void onOutgoingConnectionFailed(
180 ::Connection::DisconnectFailReason discoReason,
181 ::
std::
string const& reasonMessage
184 virtual
void onWebsocketRequest(
185 ::
std::
string const& serverAddress,
186 ::
std::
string const& payload,
187 ::
std::function<
void()> errorCallback
194 MCAPI explicit NetworkSystem(::NetworkSystem::
Dependencies&& deps);
199 _sortAndPacketizeEvents(::
NetworkConnection& connection, ::
std::chrono::steady_clock::time_point endTime);
201 MCAPI_C
void closeConnection(
203 ::Connection::DisconnectFailReason discoReason,
204 ::
std::
string const& reasonMessage
207 MCAPI
void disconnect();
213 MCAPI ::Bedrock::NotNullNonOwnerPtr<::
RemoteConnector> getRemoteConnector();
215 MCAPI
bool isServer() const;
217 MCAPI_C
void registerClientInstance(::
NetEventCallback& callback, ::SubClientId subID);
219 MCAPI
void runEvents(
bool networkIsCritical);
225 MCAPI
void setDevConnectionQuality(::DevConnectionQuality quality);
233 MCAPI
void* $ctor(::NetworkSystem::
Dependencies&& deps);
245 MCFOLD
bool $useIPv4Only() const;
247 MCAPI
bool $useIPv6Only() const;
249 MCAPI ushort $getDefaultGamePort() const;
251 MCAPI ushort $getDefaultGamePortv6() const;
253 MCAPI
void $_onDisable();
255 MCAPI
void $_onEnable();
261 MCAPI
void $onConnectionClosed(
263 ::Connection::DisconnectFailReason const discoReason,
264 ::
std::
string const& reasonMessage,
265 bool skipDisconnectMessage,
266 ::Json::Value const& sessionSummary
270 $onOutgoingConnectionFailed(::Connection::DisconnectFailReason discoReason, ::
std::
string const& reasonMessage);
272 MCAPI
void $onWebsocketRequest(
273 ::
std::
string const& serverAddress,
274 ::
std::
string const& payload,
275 ::
std::function<
void()> errorCallback