190 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ConnectionRequest>> mPrimaryRequest;
191 ::ll::TypedStorage<8, 312, ::PlayerAuthenticationInfo> mPrimaryPlayerInfo;
192 ::ll::TypedStorage<8, 32, ::std::string> mClientInfoPartyId;
193 ::ll::TypedStorage<8, 64, ::std::unordered_map<::SubClientId, ::PlayerAuthenticationInfo>> mSubClientPlayerInfo;
199 MCAPI
void removeSubClientPlayerInfo(::SubClientId subClientId);
207 ::ll::TypedStorage<8, 248, ::ClientBlobCache::Server::TransferBuilder> mTransferBuilder;
217 ::std::unordered_map<::NetworkIdentifier, ::std::unique_ptr<::ServerNetworkHandler::Client>>>
219 ::ll::TypedStorage<8, 8, ::GameCallbacks&> mGameCallbacks;
220 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::ILevel>> mLevel;
221 ::ll::TypedStorage<8, 8, ::ServerNetworkSystem&> mNetwork;
222 ::ll::TypedStorage<8, 8, ::PrivateKeyManager&> mServerKeys;
223 ::ll::TypedStorage<8, 8, ::ServerLocator&> mServerLocator;
224 ::ll::TypedStorage<8, 8, ::gsl::not_null<::PacketSender*>> mPacketSender;
225 ::ll::TypedStorage<8, 8, ::AllowList&> mAllowList;
226 ::ll::TypedStorage<8, 8, ::PermissionsFile*> mPermissionsFile;
227 ::ll::TypedStorage<8, 104, ::DenyList> mServerDenyList;
228 ::ll::TypedStorage<8, 72, ::NetworkServerConfig> mNetworkServerConfig;
229 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ScriptPackSettingsCache>> mPackSettingsCache;
230 ::ll::TypedStorage<1, 1, bool> mHasDisplayedPackErrors;
231 ::ll::TypedStorage<8, 176, ::NetworkIdentifier> mMyId;
232 ::ll::TypedStorage<4, 4, int const> mMaxChunkRadius;
233 ::ll::TypedStorage<8, 8, ::MinecraftCommands&> mMinecraftCommands;
234 ::ll::TypedStorage<8, 8, ::IMinecraftApp&> mApp;
235 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::TextFilteringProcessor>> mTextFilteringProcessor;
236 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ClientBlobCache::Server::ActiveTransfersManager>> mClientCacheManager;
237 ::ll::TypedStorage<8, 64, ::std::unordered_map<uint64, ::std::string>> mServerStorageForClientsConnectingAttempt;
238 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ClassroomModeNetworkHandler>> mCompanionHandler;
239 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mValidatePlayerMutex;
240 ::ll::TypedStorage<1, 1, bool> mAllowIncoming;
241 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::IServerNetworkController>> mServerNetworkController;
242 ::ll::TypedStorage<8, 32, ::std::string> mServerName;
243 ::ll::TypedStorage<4, 4, int> mMaxNumPlayers;
244 ::ll::TypedStorage<8, 64, ::std::unordered_set<::mce::UUID>> mKnownEmotePieceIdLookup;
245 ::ll::TypedStorage<8, 24, ::std::vector<::mce::UUID>> mKnownEmotePieceIds;
249 ::std::unordered_map<
251 ::std::unordered_map<::std::string, ::std::shared_ptr<::ResourcePackFileUploadManager>>>>
252 mResourceUploadManagers;
253 ::ll::TypedStorage<8, 16, ::gsl::not_null<::std::shared_ptr<::Bedrock::Threading::SharedAsync<void>>>>
256 TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::ResourcePackPathLifetimeHelpers::ResourcePackPathCache>>>
257 mResourcePackPathCache;
258 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::ServerConnectionAuthValidator>>>
259 mConnectionAuthValidator;
260 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::TaskGroup>>> mAsyncJoinTaskGroup;
261 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::AsyncJoinTaskManager>>> mAsyncJoinTaskManager;
262 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::TaskGroup>> mIOTaskGroup;
263 ::ll::TypedStorage<1, 1, bool> mIsTrial;
264 ::ll::TypedStorage<8, 64, ::std::unordered_map<::PackIdVersion, ::std::string>> mPackIdToContentKey;
265 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::GameSpecificNetEventCallback>> mGameSpecificNetEventCallback;
269 ::std::unordered_map<::NetworkIdentifier, ::std::unique_ptr<::ServerNetworkHandler::TransferBuilderBatcher>>>
270 mTransferBuilderBatcher;
271 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::GameTestNetworkAdapter>> mGameTestAdapter;
272 ::ll::TypedStorage<8, 40, ::ServiceReference<::AppConfigs>> mAppConfigs;
273 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BiomeDefinitionListPacket const>> mBiomeDefinitionListWithoutCSCG;
274 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BiomeDefinitionListPacket const>> mBiomeDefinitionListWithCSCG;
275 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::IEDUSystems>> mEduSystems;
276 ::ll::TypedStorage<8, 368, ::std::optional<::ServerConfiguration::ServerConfigurationJoinInfo>>
277 mServerConfigurationJoinInfo;
278 ::ll::TypedStorage<8, 128, ::Social::Events::ServerTelemetryData> mServerTelemetryData;
279 ::ll::TypedStorage<8, 256, ::ServerNetworkHandlerDependencies const> mDependencies;
284 ServerNetworkHandler& operator=(ServerNetworkHandler
const&);
285 ServerNetworkHandler(ServerNetworkHandler
const&);
286 ServerNetworkHandler();
291 virtual ~ServerNetworkHandler() ;
293 virtual void onValidPacketReceived(
295 ::MinecraftPacketIds packetId,
296 ::SubClientId senderSubId,
300 virtual void onWebsocketRequest(
301 ::std::string
const& serverAddress,
302 ::std::string
const& payload,
303 ::std::function<
void()> errorCallback
306 virtual void onInvalidPlayerJoinedLobby(
::mce::UUID const& uuid, ::std::string
const& xuid) ;
308 virtual void onXboxUserBlocked(::std::string
const& xuid) ;
310 virtual void onXboxUserUnblocked(::std::string
const& xuid) ;
312 virtual void onPlayerReady(
::Player& player) ;
314 virtual void handlePacketViolation(
315 ::std::shared_ptr<::IPacketSecurityController>
const& packetSecurityController,
316 ::std::error_code
const& errorCode,
317 ::PacketViolationResponse
const response,
318 ::MinecraftPacketIds
const packetId,
321 ::SubClientId
const clientSubId,
322 ::SubClientId
const senderSubId,
323 uint
const packetSize
326 virtual void sendPacketViolationWarningPacket(
327 ::std::error_code
const& errorCode,
328 ::PacketViolationResponse violationResponse,
329 ::MinecraftPacketIds violatingPacketId,
332 ::SubClientId clientSubId
335 virtual void sendServerLegacyParticle(::ParticleType name,
::Vec3 const& pos,
::Vec3 const&,
int data) ;
340 virtual void onDisconnect(
342 ::Connection::DisconnectFailReason
const discoReason,
343 ::Connection::DisconnectionStage
const disconnectStage,
344 ::std::string
const& messageFromServer,
345 ::std::string
const& messageBodyOverride,
347 ::std::string
const& telemetryOverride
350 virtual ::IncomingPacketFilterResult allowIncomingPacketId(
352 ::MinecraftPacketIds packetId,
356 virtual ::OutgoingPacketFilterResult
357 allowOutgoingPacket(::std::vector<::NetworkIdentifierWithSubId>
const& ids,
::Packet const& packet) ;
366 handle(
::NetworkIdentifier const& source, ::std::shared_ptr<::BlockActorDataPacket> packet) ;
408 handle(
::NetworkIdentifier const& source, ::std::shared_ptr<::InventoryTransactionPacket> packet) ;
416 virtual void handle(
::NetworkIdentifier const& source, ::std::shared_ptr<::LoginPacket> packet) ;
424 virtual void handle(
::NetworkIdentifier const& source, ::std::shared_ptr<::MobEquipmentPacket> packet) ;
483 handle(
::NetworkIdentifier const& source, ::std::shared_ptr<::SubClientLoginPacket> packet) ;
526 virtual void sendSubClientLoginMessageLocal(
533 virtual void onTick() ;
535 virtual ::GameSpecificNetEventCallback* getGameSpecificNetEventCallback() ;
541 virtual ::std::optional<::PlayerAuthenticationInfo>
544 virtual void _onClientAsyncAuthorized(
548 ::std::optional<::MessToken>
const& hostMessToken
551 virtual ::ServerPlayer* _getServerPlayer(
::NetworkIdentifier const& source, ::SubClientId subId);
557 MCAPI ServerNetworkHandler(
560 ::std::optional<::ServerConfiguration::ServerConfigurationJoinInfo>
const& serverJoinInfo,
564 ::Bedrock::NotNullNonOwnerPtr<::MinecraftServiceKeyManager> minecraftServiceKeys,
569 ::std::string
const& hostPublicKey,
574 ::std::unordered_map<::PackIdVersion, ::std::string>
const& packIdToContentKey,
580 ::std::shared_ptr<::ScriptPackSettingsCache> packSettingsCache,
584 MCAPI
void _buildSubChunkPacketData(
590 bool clientCacheEnabled
595 MCAPI ::ServerPlayer& _createNewPlayer(
608 MCAPI
int _getActiveAndInProgressPlayerCount(
::mce::UUID excludePlayer)
const;
610 MCAPI ::std::optional<::MessToken> _getJoinerMessToken(::std::string
const& eduTokenChain);
612 MCAPI ::std::optional<::MessToken> _getMessToken(::std::string
const& eduTokenChain,
bool isHostingPlayer);
614 MCAPI ::ResourcePackFileUploadManager&
615 _getResourcePackFileUploadManager(
::NetworkIdentifier const& source, ::std::string
const& resourceName);
617 MCAPI
void _handleFinalVerdict(
619 ::std::reference_wrapper<::ConnectionRequest const>,
620 ::std::reference_wrapper<::SubClientConnectionRequest const>>
const& connectionRequest,
623 ::SubClientId subClientId,
624 ::std::optional<::MessToken> messToken,
625 ::nonstd::expected<::AsyncJoinAllow, ::AsyncJoinDeny> finalVerdict
628 MCAPI
void _handleSetDefaultGameType(
635 MCAPI
bool _isPrimaryOrSecondaryPlayerInServer(
::mce::UUID const& playerId)
const;
637 MCAPI
bool _isPrimaryPlayerInServer(
::mce::UUID const& playerId)
const;
639 MCAPI
bool _isServerTextEnabled(::ServerTextEvent
const& textEvent)
const;
641 MCAPI
bool _loadNewPlayer(
::ServerPlayer& newPlayer,
bool isXboxLive);
645 MCAPI
void _onPlayerLeft(
::ServerPlayer* player,
bool skipMessage);
647 MCAPI
void _onSubClientAuthenticated(
649 ::std::shared_ptr<::SubClientLoginPacket> packet,
653 MCAPI
bool _playerHasPermissionToFly(
::ServerPlayer const* serverPlayer)
const;
655 MCAPI
void _processServerAuthPlayerActions(
661 MCAPI
void _processValidatedLoginPacket(
663 ::std::shared_ptr<::LoginPacket> packet,
665 ::std::optional<::MessToken>
const& hostMessToken
672 MCAPI
bool _updatePermissions(
680 MCAPI
void allowIncomingConnections(::std::string
const& serverName,
bool shouldAnnounce);
682 MCAPI ::OwnerPtr<::EntityContext> createNewPlayer(
688 MCAPI ::OwnerPtr<::EntityContext> createSimulatedPlayer(
689 ::std::string
const& name,
690 ::std::string
const& xuid,
691 ::std::optional<::ActorUniqueID> idOverride
694 MCAPI
void disallowIncomingConnections();
696 MCAPI
void disconnectClient(
699 ::Connection::DisconnectFailReason disconnectReason
702 MCAPI
void disconnectClientWithMessage(
705 ::Connection::DisconnectFailReason discoReason,
706 ::std::string
const& message,
707 ::std::optional<::std::string> filteredMessage,
712 disconnectPrimaryClient(
::NetworkIdentifier const&
id, ::Connection::DisconnectFailReason disconnectReason);
714 MCAPI
void engineDownloadingFinishedResponseHelper(
720 MCAPI
void engineDownloadingResponseHelper(
728 MCAPI
void persistPlayerPermissionsToDisk(
730 ::PlayerPermissionLevel playerPermission
733 MCAPI
void removeFromDenyList(
::mce::UUID const& uuid, ::std::string
const& xuid);
735 MCAPI
void sendLoginMessageLocal(
751 MCAPI
bool tryToLoadPlayer(
757 MCAPI
void updateServerAnnouncement();
764 MCAPI
static void _populateCDNValues(
765 ::std::vector<::PackInfoData>& resourcePacksData,
766 ::std::vector<::std::pair<::std::string, ::std::string>>& cdnUrls,
767 ::std::string
const& deviceModel
771 MCAPI
static void _updateCommandBlock(
786 ::std::optional<::ServerConfiguration::ServerConfigurationJoinInfo>
const& serverJoinInfo,
790 ::Bedrock::NotNullNonOwnerPtr<::MinecraftServiceKeyManager> minecraftServiceKeys,
795 ::std::string
const& hostPublicKey,
800 ::std::unordered_map<::PackIdVersion, ::std::string>
const& packIdToContentKey,
806 ::std::shared_ptr<::ScriptPackSettingsCache> packSettingsCache,
820 MCAPI
void $onValidPacketReceived(
822 ::MinecraftPacketIds packetId,
823 ::SubClientId senderSubId,
827 MCAPI
void $onWebsocketRequest(
828 ::std::string
const& serverAddress,
829 ::std::string
const& payload,
830 ::std::function<
void()> errorCallback
833 MCAPI
void $onInvalidPlayerJoinedLobby(
::mce::UUID const& uuid, ::std::string
const& xuid);
835 MCAPI
void $onXboxUserBlocked(::std::string
const& xuid);
837 MCAPI
void $onXboxUserUnblocked(::std::string
const& xuid);
839 MCFOLD
void $onPlayerReady(
::Player& player);
841 MCAPI
void $handlePacketViolation(
842 ::std::shared_ptr<::IPacketSecurityController>
const& packetSecurityController,
843 ::std::error_code
const& errorCode,
844 ::PacketViolationResponse
const response,
845 ::MinecraftPacketIds
const packetId,
848 ::SubClientId
const clientSubId,
849 ::SubClientId
const senderSubId,
850 uint
const packetSize
853 MCAPI
void $sendPacketViolationWarningPacket(
854 ::std::error_code
const& errorCode,
855 ::PacketViolationResponse violationResponse,
856 ::MinecraftPacketIds violatingPacketId,
859 ::SubClientId clientSubId
862 MCAPI
void $sendServerLegacyParticle(::ParticleType name,
::Vec3 const& pos,
::Vec3 const&,
int data);
866 MCAPI
void $onDisconnect(
868 ::Connection::DisconnectFailReason
const discoReason,
869 ::Connection::DisconnectionStage
const disconnectStage,
870 ::std::string
const& messageFromServer,
871 ::std::string
const& messageBodyOverride,
873 ::std::string
const& telemetryOverride
876 MCAPI ::IncomingPacketFilterResult $allowIncomingPacketId(
878 ::MinecraftPacketIds packetId,
882 MCAPI ::OutgoingPacketFilterResult
883 $allowOutgoingPacket(::std::vector<::NetworkIdentifierWithSubId>
const& ids,
::Packet const& packet);
891 MCAPI
void $handle(
::NetworkIdentifier const& source, ::std::shared_ptr<::BlockActorDataPacket> packet);
931 MCAPI
void $handle(
::NetworkIdentifier const& source, ::std::shared_ptr<::InventoryTransactionPacket> packet);
939 MCAPI
void $handle(
::NetworkIdentifier const& source, ::std::shared_ptr<::LoginPacket> packet);
947 MCAPI
void $handle(
::NetworkIdentifier const& source, ::std::shared_ptr<::MobEquipmentPacket> packet);
1001 MCAPI
void $handle(
::NetworkIdentifier const& source, ::std::shared_ptr<::SubClientLoginPacket> packet);
1041 MCAPI
void $sendSubClientLoginMessageLocal(
1048 MCAPI
void $onTick();
1050 MCAPI ::GameSpecificNetEventCallback* $getGameSpecificNetEventCallback();
1056 MCAPI ::std::optional<::PlayerAuthenticationInfo>
1059 MCAPI
void $_onClientAsyncAuthorized(
1063 ::std::optional<::MessToken>
const& hostMessToken
1066 MCAPI ::ServerPlayer* $_getServerPlayer(
::NetworkIdentifier const& source, ::SubClientId subId);
1074 MCAPI
static void** $vftableForNetEventCallback();
1076 MCAPI
static void** $vftableForMultiplayerServiceObserver();
1078 MCAPI
static void** $vftableForXboxLiveUserObserver();
1080 MCAPI
static void** $vftableForLevelListener();
1082 MCAPI
static void** $vftableForEnableQueueForMainThread();