45 public ::NetworkEnableDisableListener {
58 ::ll::TypedStorage<8, 8, ::std::reference_wrapper<::Scheduler>> receiveThread;
59 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::RemoteConnector>> remoteConnector;
60 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ServerLocator>> serverLocator;
61 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::AppPlatform>> appPlatform;
62 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::NetworkSessionOwner>> networkSessionOwner;
63 ::ll::TypedStorage<4, 20, ::NetworkSettingOptions> networkSettingOptions;
64 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::IPacketSerializationController>> serializationController;
80 struct IncomingPacketQueue {
84 ::ll::TypedStorage<8, 8, ::NetEventCallback&> mCallbacksObj;
89 IncomingPacketQueue& operator=(IncomingPacketQueue
const&);
90 IncomingPacketQueue(IncomingPacketQueue
const&);
91 IncomingPacketQueue();
94 using IncomingPacketQueueArray = ::std::unique_ptr<::NetworkSystem::IncomingPacketQueue>[4];
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, 16, ::std::shared_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() ;
160 virtual
bool onNewIncomingConnection(
163 ::
std::optional<::
WebKey> identityPublicKey
169 virtual
void onConnectionClosed(
171 ::Connection::DisconnectFailReason const discoReason,
172 ::
std::
string const& messageFromServer,
173 ::
std::
string const& messageBodyOverride,
174 bool skipDisconnectMessage,
175 ::Json::Value const& sessionSummary
179 onAllConnectionsClosed(::Connection::DisconnectFailReason discoReason,
bool skipDisconnectMessage) ;
181 virtual
void onAllRemoteConnectionsClosed(
182 ::Connection::DisconnectFailReason discoReason,
183 bool skipDisconnectMessage
186 virtual
void onOutgoingConnectionFailed(::Connection::DisconnectFailReason discoReason) ;
188 virtual
void onWebsocketRequest(
189 ::
std::
string const& serverAddress,
190 ::
std::
string const& payload,
191 ::
std::function<
void()> errorCallback
198 MCAPI explicit NetworkSystem(::NetworkSystem::
Dependencies&& deps);
206 MCAPI
void closeConnection(
208 ::Connection::DisconnectFailReason discoReason,
209 ::std::string
const& messageFromServer
221 MCAPI
void runEvents(
bool networkIsCritical);
228 MCNAPI
void update(::std::vector<::WeakEntityRef>
const* userList);
258 MCAPI
bool $onNewIncomingConnection(
260 ::std::shared_ptr<::NetworkPeer>&& peer,
261 ::std::optional<::WebKey> identityPublicKey
266 MCAPI
void $onConnectionClosed(
268 ::Connection::DisconnectFailReason
const discoReason,
269 ::std::string
const& messageFromServer,
270 ::std::string
const& messageBodyOverride,
271 bool skipDisconnectMessage,
283 ::std::string
const& serverAddress,
284 ::std::string
const& payload,
285 ::std::function<
void()> errorCallback