198 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ConnectionRequest>> mPrimaryRequest;
199 ::ll::TypedStorage<8, 320, ::PlayerAuthenticationInfo> mPrimaryPlayerInfo;
200 ::ll::TypedStorage<8, 32, ::std::string> mClientInfoPartyId;
201 ::ll::TypedStorage<8, 64, ::std::unordered_map<::SubClientId, ::PlayerAuthenticationInfo>> mSubClientPlayerInfo;
216 MCAPI
void removeSubClientPlayerInfo(::SubClientId subClientId);
239 ::ll::TypedStorage<8, 32, ::Social::Nonce> mValue;
240 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mTtl;
260 ::ll::TypedStorage<8, 248, ::ClientBlobCache::Server::TransferBuilder> mTransferBuilder;
270 ::std::unordered_map<::NetworkIdentifier, ::std::unique_ptr<::ServerNetworkHandler::Client>>>
272 ::ll::TypedStorage<8, 8, ::GameCallbacks&> mGameCallbacks;
273 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::ILevel>> mLevel;
274 ::ll::TypedStorage<8, 8, ::ServerNetworkSystem&> mNetwork;
275 ::ll::TypedStorage<8, 8, ::PrivateKeyManager&> mServerKeys;
276 ::ll::TypedStorage<8, 8, ::ServerLocator&> mServerLocator;
277 ::ll::TypedStorage<8, 8, ::gsl::not_null<::PacketSender*>> mPacketSender;
278 ::ll::TypedStorage<8, 8, ::AllowList&> mAllowList;
279 ::ll::TypedStorage<8, 8, ::PermissionsFile*> mPermissionsFile;
280 ::ll::TypedStorage<8, 104, ::DenyList> mServerDenyList;
281 ::ll::TypedStorage<8, 72, ::NetworkServerConfig> mNetworkServerConfig;
282 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ScriptPackSettingsCache>> mPackSettingsCache;
283 ::ll::TypedStorage<1, 1, bool> mHasDisplayedPackErrors;
284 ::ll::TypedStorage<8, 176, ::NetworkIdentifier> mMyId;
285 ::ll::TypedStorage<4, 4, int const> mMaxChunkRadius;
286 ::ll::TypedStorage<8, 8, ::MinecraftCommands&> mMinecraftCommands;
287 ::ll::TypedStorage<8, 8, ::IMinecraftApp&> mApp;
288 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::TextFilteringProcessor>> mTextFilteringProcessor;
289 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ClientBlobCache::Server::ActiveTransfersManager>> mClientCacheManager;
290 ::ll::TypedStorage<8, 64, ::std::unordered_map<::NetworkIdentifier, ::Json::Value>>
291 mServerStorageForClientsConnectingAttempt;
292 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::ServerNetworkHandler::NonceWithTTL>> mPlayerNonces;
293 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ClassroomModeNetworkHandler>> mCompanionHandler;
294 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mValidatePlayerMutex;
295 ::ll::TypedStorage<1, 1, bool> mAllowIncoming;
296 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::IServerNetworkController>> mServerNetworkController;
297 ::ll::TypedStorage<8, 32, ::std::string> mServerName;
298 ::ll::TypedStorage<4, 4, int> mMaxNumPlayers;
299 ::ll::TypedStorage<8, 64, ::std::unordered_set<::mce::UUID>> mKnownEmotePieceIdLookup;
300 ::ll::TypedStorage<8, 24, ::std::vector<::mce::UUID>> mKnownEmotePieceIds;
304 ::std::unordered_map<
306 ::std::unordered_map<::std::string, ::std::shared_ptr<::ResourcePackFileUploadManager>>>>
307 mResourceUploadManagers;
308 ::ll::TypedStorage<8, 16, ::gsl::not_null<::std::shared_ptr<::Bedrock::Threading::SharedAsync<void>>>>
311 TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::ResourcePackPathLifetimeHelpers::ResourcePackPathCache>>>
312 mResourcePackPathCache;
313 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::ServerConnectionAuthValidator>>>
314 mConnectionAuthValidator;
315 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::TaskGroup>>> mNetworkTaskGroup;
316 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::AsyncJoinTaskManager>>> mAsyncJoinTaskManager;
317 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::TaskGroup>> mIOTaskGroup;
318 ::ll::TypedStorage<1, 1, bool> mIsTrial;
319 ::ll::TypedStorage<8, 64, ::std::unordered_map<::PackIdVersion, ::std::string>> mPackIdToContentKey;
320 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::GameSpecificNetEventCallback>> mGameSpecificNetEventCallback;
324 ::std::unordered_map<::NetworkIdentifier, ::std::unique_ptr<::ServerNetworkHandler::TransferBuilderBatcher>>>
325 mTransferBuilderBatcher;
326 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::GameTestNetworkAdapter>> mGameTestAdapter;
327 ::ll::TypedStorage<8, 40, ::ServiceReference<::AppConfigs>> mAppConfigs;
328 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BiomeDefinitionListPacket const>> mBiomeDefinitionListWithoutCSCG;
329 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BiomeDefinitionListPacket const>> mBiomeDefinitionListWithCSCG;
330 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::IEDUSystems>> mEduSystems;
331 ::ll::TypedStorage<8, 368, ::std::optional<::ServerConfiguration::ServerConfigurationJoinInfo>>
332 mServerConfigurationJoinInfo;
333 ::ll::TypedStorage<8, 128, ::Social::Events::ServerTelemetryData> mServerTelemetryData;
334 ::ll::TypedStorage<8, 256, ::ServerNetworkHandlerDependencies const> mDependencies;
339 ServerNetworkHandler& operator=(ServerNetworkHandler
const&);
340 ServerNetworkHandler(ServerNetworkHandler
const&);
341 ServerNetworkHandler();
346 virtual ~ServerNetworkHandler() ;
348 virtual void onValidPacketReceived(
350 ::MinecraftPacketIds packetId,
351 ::SubClientId senderSubId,
355 virtual void onWebsocketRequest(
356 ::std::string
const& serverAddress,
357 ::std::string
const& payload,
358 ::std::function<
void()> errorCallback
361 virtual void onInvalidPlayerJoinedLobby(
::mce::UUID const& uuid, ::std::string
const& xuid) ;
367 virtual void onXboxUserBlocked(::std::string
const& xuid) ;
369 virtual void onXboxUserUnblocked(::std::string
const& xuid) ;
371 virtual void onPlayerReady(
::Player&) ;
373 virtual void handlePacketViolation(
374 ::std::shared_ptr<::IPacketSecurityController>
const& packetSecurityController,
375 ::std::error_code
const& errorCode,
376 ::PacketViolationResponse
const response,
377 ::MinecraftPacketIds
const packetId,
380 ::SubClientId
const clientSubId,
381 ::SubClientId
const senderSubId,
382 uint
const packetSize
385 virtual void sendPacketViolationWarningPacket(
386 ::std::error_code
const& errorCode,
387 ::PacketViolationResponse violationResponse,
388 ::MinecraftPacketIds violatingPacketId,
391 ::SubClientId clientSubId
394 virtual void sendServerLegacyParticle(::ParticleType name,
::Vec3 const& pos,
::Vec3 const& data,
int) ;
399 virtual void onDisconnect(
401 ::Connection::DisconnectFailReason
const discoReason,
402 ::Connection::DisconnectionStage
const skipMessage,
403 ::std::string
const&,
404 ::std::string
const&,
409 virtual ::IncomingPacketFilterResult allowIncomingPacketId(
411 ::MinecraftPacketIds packetId,
415 virtual ::OutgoingPacketFilterResult
416 allowOutgoingPacket(::std::vector<::NetworkIdentifierWithSubId>
const& ids,
::Packet const& packet) ;
425 handle(
::NetworkIdentifier const& source, ::std::shared_ptr<::BlockActorDataPacket> packet) ;
467 handle(
::NetworkIdentifier const& source, ::std::shared_ptr<::InventoryTransactionPacket> packet) ;
475 virtual void handle(
::NetworkIdentifier const& source, ::std::shared_ptr<::LoginPacket> packet) ;
483 virtual void handle(
::NetworkIdentifier const& source, ::std::shared_ptr<::MobEquipmentPacket> packet) ;
541 handle(
::NetworkIdentifier const& source, ::std::shared_ptr<::SubClientLoginPacket> packet) ;
584 virtual void sendSubClientLoginMessageLocal(
591 virtual void onTick() ;
593 virtual ::GameSpecificNetEventCallback* getGameSpecificNetEventCallback() ;
599 virtual ::std::optional<::PlayerAuthenticationInfo>
602 virtual void _onClientAsyncAuthorized(
606 ::std::optional<::MessToken>
const& hostMessToken
609 virtual ::ServerPlayer* _getServerPlayer(
::NetworkIdentifier const& source, ::SubClientId subId);
615 MCAPI ServerNetworkHandler(
618 ::std::optional<::ServerConfiguration::ServerConfigurationJoinInfo>
const& serverJoinInfo,
622 ::Bedrock::NotNullNonOwnerPtr<::MinecraftServiceKeyManager> minecraftServiceKeys,
627 ::std::string
const& hostPublicKey,
632 ::std::unordered_map<::PackIdVersion, ::std::string>
const& packIdToContentKey,
638 ::std::shared_ptr<::ScriptPackSettingsCache> packSettingsCache,
642 MCAPI
void _buildSubChunkPacketData(
648 bool clientCacheEnabled
653 MCAPI ::ServerPlayer& _createNewPlayer(
666 MCAPI
int _getActiveAndInProgressPlayerCount(
::mce::UUID excludePlayer)
const;
668 MCAPI ::std::string _getDisplayName(
670 ::BuildPlatform platform,
671 ::std::string
const& thirdPartyName
674 MCAPI ::std::optional<::MessToken> _getJoinerMessToken(::std::string
const& eduTokenChain);
676 MCAPI ::std::optional<::MessToken> _getMessToken(::std::string
const& eduTokenChain,
bool isHostingPlayer);
678 MCAPI ::ResourcePackFileUploadManager&
679 _getResourcePackFileUploadManager(
::NetworkIdentifier const& source, ::std::string
const& resourceName);
681 MCAPI
void _handleFinalVerdict(
683 ::std::reference_wrapper<::ConnectionRequest const>,
684 ::std::reference_wrapper<::SubClientConnectionRequest const>>
const& connectionRequest,
687 ::SubClientId subClientId,
688 ::std::optional<::MessToken> messToken,
689 ::nonstd::expected<::AsyncJoinAllow, ::AsyncJoinDeny> finalVerdict
695 MCAPI
void _handleSetDefaultGameType(
705 MCAPI
bool _isPrimaryOrSecondaryPlayerInServer(
::mce::UUID const& playerId)
const;
707 MCAPI
bool _isServerTextEnabled(::ServerTextEvent
const& textEvent)
const;
709 MCAPI
bool _loadNewPlayer(
::ServerPlayer& newPlayer,
bool isXboxLive);
713 MCAPI
void _onPlayerLeft(
::ServerPlayer* player,
bool skipMessage);
715 MCAPI
void _onSubClientAuthenticated(
717 ::std::shared_ptr<::SubClientLoginPacket> packet,
721 MCAPI
void _processServerAuthPlayerActions(
727 MCAPI
void _processValidatedLoginPacket(
729 ::std::shared_ptr<::LoginPacket> packet,
731 ::std::optional<::MessToken>
const& hostMessToken
738 MCAPI
bool _updatePermissions(
746 MCAPI
void addToDenyList(
::mce::UUID const& uuid, ::std::string
const& xuid);
748 MCAPI
void addToDenyList(
::mce::UUID const& uuid, ::std::string
const& xuid, ::DenyList::Duration
const& duration);
750 MCAPI
void allowIncomingConnections(::std::string
const& serverName,
bool shouldAnnounce);
752 MCAPI ::OwnerPtr<::EntityContext> createNewPlayer(
758 MCAPI ::OwnerPtr<::EntityContext> createSimulatedPlayer(
759 ::std::string
const& name,
760 ::std::string
const& xuid,
761 ::std::optional<::ActorUniqueID> idOverride
765 MCAPI
void disallowIncomingConnections();
768 MCAPI
void disconnectClient(
771 ::Connection::DisconnectFailReason disconnectReason
774 MCAPI
void disconnectClientWithMessage(
777 ::Connection::DisconnectFailReason discoReason,
778 ::std::string
const& message,
779 ::std::optional<::std::string> filteredMessage
783 disconnectPrimaryClient(
::NetworkIdentifier const&
id, ::Connection::DisconnectFailReason disconnectReason);
788 MCAPI
void engineDownloadingFinishedResponseHelper(
793 MCAPI
void engineDownloadingResponseHelper(
798 MCAPI ::ConnectionRequest
const& fetchConnectionRequest(
::NetworkIdentifier const& source);
800 MCAPI ::PlayerAuthenticationInfo fetchPlayerAuthenticationInfo(
::NetworkIdentifier const& source);
802 MCAPI ::CommandPermissionLevel getCommandsOpPermissionLevel();
804 MCAPI ::std::string getGlobalMultiplayerCorrelationId()
const;
807 MCAPI ::std::string getServerName()
const;
810 MCAPI
bool isDedicatedServer();
814 MCAPI
void onStartShutdown();
816 MCAPI
void persistPlayerPermissionsToDisk(
818 ::PlayerPermissionLevel playerPermission
821 MCAPI ::std::unique_ptr<uint64, ::std::function<void(uint64*)>> registerAsyncJoinCallback(
826 ::std::shared_ptr<::AsyncVerdictPromise>
830 MCAPI
void removeFromDenyList(
::mce::UUID const& uuid, ::std::string
const& xuid);
832 MCAPI
void sendLoginMessageLocal(
839 MCAPI
void setAllowListActive(
bool active);
847 MCAPI
void setConnectionNonceActive(
bool active);
851 MCAPI
void setIsTrial(
bool isTrial);
854 MCAPI
int setMaxNumPlayers(
int maxPlayers);
858 MCAPI
bool tryToLoadPlayer(
864 MCAPI
void updateServerAnnouncement();
870 MCAPI
static void _populateCDNValues(
871 ::std::vector<::PackInfoData>& resourcePacksData,
872 ::std::vector<::std::pair<::std::string, ::std::string>>& cdnUrls,
873 ::std::string
const& deviceModel
876 MCAPI
static void _updateCommandBlock(
884 MCAPI
static void handle(
::ServerPlayer* player, ::std::shared_ptr<::InventoryTransactionPacket> packet);
893 ::std::optional<::ServerConfiguration::ServerConfigurationJoinInfo>
const& serverJoinInfo,
897 ::Bedrock::NotNullNonOwnerPtr<::MinecraftServiceKeyManager> minecraftServiceKeys,
902 ::std::string
const& hostPublicKey,
907 ::std::unordered_map<::PackIdVersion, ::std::string>
const& packIdToContentKey,
913 ::std::shared_ptr<::ScriptPackSettingsCache> packSettingsCache,
927 MCAPI
void $onValidPacketReceived(
929 ::MinecraftPacketIds packetId,
930 ::SubClientId senderSubId,
934 MCAPI
void $onWebsocketRequest(
935 ::std::string
const& serverAddress,
936 ::std::string
const& payload,
937 ::std::function<
void()> errorCallback
940 MCAPI
void $onInvalidPlayerJoinedLobby(
::mce::UUID const& uuid, ::std::string
const& xuid);
946 MCAPI
void $onXboxUserBlocked(::std::string
const& xuid);
948 MCAPI
void $onXboxUserUnblocked(::std::string
const& xuid);
950 MCFOLD
void $onPlayerReady(
::Player&);
952 MCAPI
void $handlePacketViolation(
953 ::std::shared_ptr<::IPacketSecurityController>
const& packetSecurityController,
954 ::std::error_code
const& errorCode,
955 ::PacketViolationResponse
const response,
956 ::MinecraftPacketIds
const packetId,
959 ::SubClientId
const clientSubId,
960 ::SubClientId
const senderSubId,
961 uint
const packetSize
964 MCAPI
void $sendPacketViolationWarningPacket(
965 ::std::error_code
const& errorCode,
966 ::PacketViolationResponse violationResponse,
967 ::MinecraftPacketIds violatingPacketId,
970 ::SubClientId clientSubId
973 MCAPI
void $sendServerLegacyParticle(::ParticleType name,
::Vec3 const& pos,
::Vec3 const& data,
int);
977 MCAPI
void $onDisconnect(
979 ::Connection::DisconnectFailReason
const discoReason,
980 ::Connection::DisconnectionStage
const skipMessage,
981 ::std::string
const&,
982 ::std::string
const&,
987 MCAPI ::IncomingPacketFilterResult $allowIncomingPacketId(
989 ::MinecraftPacketIds packetId,
993 MCAPI ::OutgoingPacketFilterResult
994 $allowOutgoingPacket(::std::vector<::NetworkIdentifierWithSubId>
const& ids,
::Packet const& packet);
1002 MCAPI
void $handle(
::NetworkIdentifier const& source, ::std::shared_ptr<::BlockActorDataPacket> packet);
1042 MCAPI
void $handle(
::NetworkIdentifier const& source, ::std::shared_ptr<::InventoryTransactionPacket> packet);
1050 MCAPI
void $handle(
::NetworkIdentifier const& source, ::std::shared_ptr<::LoginPacket> packet);
1058 MCAPI
void $handle(
::NetworkIdentifier const& source, ::std::shared_ptr<::MobEquipmentPacket> packet);
1112 MCAPI
void $handle(
::NetworkIdentifier const& source, ::std::shared_ptr<::SubClientLoginPacket> packet);
1152 MCAPI
void $sendSubClientLoginMessageLocal(
1159 MCAPI
void $onTick();
1161 MCAPI ::GameSpecificNetEventCallback* $getGameSpecificNetEventCallback();
1167 MCAPI ::std::optional<::PlayerAuthenticationInfo>
1170 MCAPI
void $_onClientAsyncAuthorized(
1174 ::std::optional<::MessToken>
const& hostMessToken
1177 MCAPI ::ServerPlayer* $_getServerPlayer(
::NetworkIdentifier const& source, ::SubClientId subId);
1185 MCAPI
static void** $vftableForNetEventCallback();
1187 MCAPI
static void** $vftableForMultiplayerServiceObserver();
1189 MCAPI
static void** $vftableForXboxLiveUserObserver();
1191 MCAPI
static void** $vftableForLevelListener();
1193 MCAPI
static void** $vftableForEnableQueueForMainThread();