From 4b26e058ef9d7ec22f3766673bf5d0fa7bf637d4 Mon Sep 17 00:00:00 2001 From: Blank Date: Thu, 22 Oct 2026 12:28:53 +0800 Subject: [PATCH] =?UTF-8?q?fix(hotfix):=20=E7=83=AD=E6=9B=B4=E6=A1=A5?= =?UTF-8?q?=E6=8E=A5=E5=8E=BB=E5=90=AF=E5=8A=A8=E5=9F=BA=E7=B1=BB=E7=BB=A7?= =?UTF-8?q?=E6=89=BF=E5=B9=B6=E6=9B=B4=E5=90=8D=E7=94=9F=E5=91=BD=E5=91=A8?= =?UTF-8?q?=E6=9C=9F=E6=A1=A5=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit C284 把监听与漏斗迁往宿主后,AppStartUpHotfixGame 对 AppStartUpBase 的继承全为死重(no-op StartAsync、宿主已执行的 冗余装配、无人触碰的就绪屏障与退出令牌),且顶着启动 Role 身份 误导读者。去继承并更名迁移为 internal sealed HotfixModuleLifecycleBridge(GameFrameX.Hotfix/Lifecycle/, 命名空间 GameFrameX.Hotfix.Lifecycle),删除 ByGateWay 注释 死块;Init 内非冗余的 GlobalSettings.SetCurrentSetting 显式 化保留——多 Role 进程(AllInOne)下把 CurrentSetting 钉回首 启动 Role,且必须早于统一消息发送器构造固化本服身份,行为等价。 移除 GameFrameX.Hotfix 对 GameFrameX.StartUp 的项目引用,热更 程序集引用表不再含启动程序集;IHotfixBridge 公开契约不变。 Linear: GFX-987 --- CHANGELOG.md | 1 + .../Session/PlayerDisconnectedEventArgs.cs | 5 +- GameFrameX.Hotfix/GameFrameX.Hotfix.csproj | 1 - .../HotfixModuleLifecycleBridge.cs} | 58 +++--- .../PlayerDisconnectedEventListener.cs | 6 +- .../StartUp/AppStartUpHotfixGameByGateWay.cs | 189 ------------------ GameFrameX.Launcher/StartUp/AppStartUpGame.cs | 11 +- 7 files changed, 44 insertions(+), 227 deletions(-) rename GameFrameX.Hotfix/{StartUp/AppStartUpHotfixGameByEntry.cs => Lifecycle/HotfixModuleLifecycleBridge.cs} (73%) delete mode 100644 GameFrameX.Hotfix/StartUp/AppStartUpHotfixGameByGateWay.cs diff --git a/CHANGELOG.md b/CHANGELOG.md index ed90c36f1..9d8b898f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -79,6 +79,7 @@ * 删除 GameFrameX.Apps.ActorType 死枚举(C219):运行时零引用(账号 id 实际由 ActorIdGenerator.GetUniqueId() 生成),作用域机制维持 GlobalConst.ActorType* 常量现状,并在 GlobalConst 与 ComponentTypeAttribute 的 XML doc 补区间规则(<128 每实体多实例 / >128 每服单例);非破坏性——两仓成员引用已验证为零,Apps 工程不进 NuGet 发布面 * 删除 GameFrameX.Online 与 GameFrameX.Online.Runtime 双工程(C232 / C227 P4 终态):单体剩余 9 上层/聚合目录与过渡壳内容已全量随 P3/P4 迁入 11 包(Hosting 3 + Online 8);slnx 摘除、csproj 与源文件物理删除(git rm);`bin/` 18 个陈旧产物(工程已不在 slnx,dotnet clean 无视)手动清除后 rebuild 零再生(lesson `msbuild-stale-output-after-project-removal` 正反断言);`OnlineDependencyMatrixTests` 目录依赖矩阵随目录消失退役(topic 字节冻结断言保留) ### Refactor +* 热更桥接实例去除启动基类继承并更名为生命周期桥接(C285,C284 后续):全仓唯一 `IHotfixBridge` 实现 `AppStartUpHotfixGame` 更名迁移为 `internal sealed HotfixModuleLifecycleBridge`(`GameFrameX.Hotfix/Lifecycle/`,命名空间 `GameFrameX.Hotfix.Lifecycle`)——`AppStartUpBase` 继承在 C284 后全为死重(no-op `StartAsync` 覆写、宿主已执行过的冗余 `AppBootstrapper.EnsureInitialized` / `InterNodeAuthentication.Configure` 装配、无人触碰的就绪屏障与退出令牌),新类不再属于启动 Role 体系;`Init` 内非冗余的 `GlobalSettings.SetCurrentSetting(setting)` 显式化保留并注释——多 Role 进程(`--AllInOne`)下把 `CurrentSetting` 钉回首启动 Role 的配置,且必须早于统一消息发送器构造固化本服身份(单 Role 形态无差异,行为等价);删除 no-op `StartAsync` 覆写、`using GameFrameX.StartUp;` 与整文件注释死块 `AppStartUpHotfixGameByGateWay.cs`;`GameFrameX.Hotfix.csproj` 移除对 `GameFrameX.StartUp` 的 ProjectReference(构建产物元数据正向证明:热更程序集引用表不含启动程序集,桥接类基类为 `System.Object`);`IHotfixBridge` 公开契约不变,`HotfixModule.ParseDll` 按接口定位机制不变 * Online 依赖解环与方向治理(C223,能力簇拆包前置 P0):`Events/` 收窄为事件总线抽象(OnlineEvent / IOnlineEventPublisher / OnlineEventPublisher / OnlineEventConsumer / OnlineEventSanitizer / OnlineEventEnvelopeMapper / OnlineEventAuditView,与域类型零引用);13 个域事件工厂随域迁移并载荷原始化(工厂签名领域类型参数 → 原始字段参数,topic 常量与信封语义逐字节不变);跨叶子协作契约上移 Contracts(IOnlineSocialGate / OnlineSocialInteractionPurpose / OnlineSocialDecision / IOnlineChannelMembershipProbe / OnlineChatChannelKind)。程序集内目录依赖成为严格向下 DAG(含三节点环 Events→HotfixRollback→Audit→Events 解除),新增依赖矩阵门禁测试(OnlineDependencyMatrixTests:using 语义解析 + 允许方向表 + 叶子簇横向零互引 + topic 常量冻结断言,零豁免)。公共类型命名空间迁移映射(程序集内迁移,无 NuGet 包消费者,破坏面纯源码级,消费者仅 GameFrameX.Online.Runtime 与 Tests): `GameFrameX.Online.Events.OnlineAssetEvents → GameFrameX.Online.Assets`; diff --git a/GameFrameX.Core/Session/PlayerDisconnectedEventArgs.cs b/GameFrameX.Core/Session/PlayerDisconnectedEventArgs.cs index 65af2e9be..f275d6bfd 100644 --- a/GameFrameX.Core/Session/PlayerDisconnectedEventArgs.cs +++ b/GameFrameX.Core/Session/PlayerDisconnectedEventArgs.cs @@ -37,14 +37,15 @@ namespace GameFrameX.Core.Session; /// /// 宿主持监听形态下,宿主会话断开钩子完成会话摘除后以本事件把「已绑定玩家的物理断开」 /// 通知热更域——热更侧全局监听器承接房间断线标记与会话恢复通知(原内联在热更侧 -/// AppStartUpHotfixGame.OnDisconnected 的业务段)。事件绑定键即本类型本身; +/// AppStartUpHotfixGame.OnDisconnected 的业务段;原名,C285 更名为 HotfixModuleLifecycleBridge)。事件绑定键即本类型本身; /// 分发为全局(actorId = 0)fire-and-forget,与 /// 登出清理同形态。携带断开的物理会话标识供热更侧旧回调迟到守卫使用。 /// Under the host-owned-listener shape, the host's session-disconnected hook removes the /// session and then uses this event to notify the hotfix domain that a bound player's /// physical connection dropped — the hotfix-side global listener carries the room /// disconnected-marking and the session-resume notification (the business block formerly -/// inlined in the hotfix-side AppStartUpHotfixGame.OnDisconnected). The event binding +/// inlined in the hotfix-side AppStartUpHotfixGame.OnDisconnected; renamed +/// HotfixModuleLifecycleBridge in C285). The event binding /// key is the type itself; dispatch is global (actorId = 0) and fire-and-forget, the same /// shape as the logout cleanup. The disconnected /// physical session identifier is carried for the hotfix-side stale-callback guard. diff --git a/GameFrameX.Hotfix/GameFrameX.Hotfix.csproj b/GameFrameX.Hotfix/GameFrameX.Hotfix.csproj index 918645a0d..f43b35850 100644 --- a/GameFrameX.Hotfix/GameFrameX.Hotfix.csproj +++ b/GameFrameX.Hotfix/GameFrameX.Hotfix.csproj @@ -23,7 +23,6 @@ - diff --git a/GameFrameX.Hotfix/StartUp/AppStartUpHotfixGameByEntry.cs b/GameFrameX.Hotfix/Lifecycle/HotfixModuleLifecycleBridge.cs similarity index 73% rename from GameFrameX.Hotfix/StartUp/AppStartUpHotfixGameByEntry.cs rename to GameFrameX.Hotfix/Lifecycle/HotfixModuleLifecycleBridge.cs index 85de5e718..83a8d18ee 100644 --- a/GameFrameX.Hotfix/StartUp/AppStartUpHotfixGameByEntry.cs +++ b/GameFrameX.Hotfix/Lifecycle/HotfixModuleLifecycleBridge.cs @@ -28,7 +28,6 @@ // ========================================================================================== -using GameFrameX.StartUp; using GameFrameX.Core.Session; using GameFrameX.Network.RemoteMessaging; using GameFrameX.Discovery.Routing; @@ -36,28 +35,37 @@ using GameFrameX.Hotfix.Logic.Server.Unified; using GameFrameX.Network.RemoteMessaging.Unified; -namespace GameFrameX.Hotfix.StartUp; +namespace GameFrameX.Hotfix.Lifecycle; /// -/// 热更桥接实例(C284 统一形态):热更域只持业务生命周期——装载成功激活配置表/定时器/全局组件, -/// 停止只清 Actor/定时器/会话;网络监听与运行至退出周期归宿主(AppStartUpGameServerBase 模板)。 +/// 热更模块生命周期桥接(原名 AppStartUpHotfixGame,C285 去启动基类继承并更名迁移): +/// 热更域只持业务生命周期——装载成功激活配置表/定时器/全局组件,停止只清 Actor/定时器/会话; +/// 网络监听与运行至退出周期归宿主(AppStartUpGameServerBase 模板)。 +/// 本类是 的唯一实现,由 HotfixModule.ParseDll 按接口定位并创建, +/// 不属于启动 Role 体系(不进 StartUpTypeRegistry / AppEnter,不继承任何启动基类)。 /// /// -/// The hotfix bridge instance (the C284 unified shape): the hotfix domain holds only the business -/// lifecycle — a successful load activates the config tables, timers and global components while -/// the stop clears actors, timers and sessions; the network listeners and the run-until-exit cycle -/// stay with the host (AppStartUpGameServerBase template). +/// The hotfix-module lifecycle bridge (formerly AppStartUpHotfixGame; C285 dropped the +/// startup-base inheritance, renamed and relocated the type): the hotfix domain holds only the +/// business lifecycle — a successful load activates the config tables, timers and global components +/// while the stop clears actors, timers and sessions; the network listeners and the run-until-exit +/// cycle stay with the host (AppStartUpGameServerBase template). +/// This class is the sole implementation of , located and instantiated +/// by HotfixModule.ParseDll via the interface; it does not belong to the startup-role +/// system (never enters StartUpTypeRegistry / AppEnter and inherits no startup base). /// -internal class AppStartUpHotfixGame : AppStartUpBase, IHotfixBridge +internal sealed class HotfixModuleLifecycleBridge : IHotfixBridge { /// - /// 热更模块装载成功回调:纯业务生命周期激活(初始化 + 统一消息发送器装配 + 配置表 + 定时器 + - /// 全局组件)。热更重载( = true)只清空代理缓存,不重复激活。 + /// 热更模块装载成功回调:纯业务生命周期激活(CurrentSetting 钉住 + 统一消息发送器装配 + + /// 配置表 + 定时器 + 全局组件)。热更重载( = true)只清空代理缓存, + /// 不重复激活。 /// /// - /// The hotfix-module load-success callback: pure business-lifecycle activation (initialization, - /// the unified-message-sender wiring, config tables, timers and global components). A hot - /// reload ( = true) only clears the agent cache without re-activating. + /// The hotfix-module load-success callback: pure business-lifecycle activation (the + /// CurrentSetting pin, the unified-message-sender wiring, config tables, timers and global + /// components). A hot reload ( = true) only clears the agent cache + /// without re-activating. /// C284 起不再起网络监听(监听所有权归宿主),也不分发 ServiceOnline(宿主 /// OnStartupCompletedAsync 是唯一分发点,避免与宿主缺省分发双派发)。 /// Since C284 this callback no longer starts network listeners (listener ownership stays with @@ -76,7 +84,13 @@ public async Task OnLoadSuccess(AppSetting setting, bool reload) return true; } - Init(setting.ServerType, setting); + // 多 Role 进程(--AllInOne)中钉住 CurrentSetting(C285 自 AppStartUpBase.Init 显式化): + // Launcher 的创建循环先对全部 Role 逐个 Init,SetCurrentSetting 对 Role 级字段接受最新值, + // 循环结束时 CurrentSetting 指向最后创建的 Role;热更首次装载由首个启动的 Role 触发, + // 这里把 CurrentSetting 钉回该首启动 Role,且必须早于 UnifiedMessageSender 构造—— + // 其构造器读取 CurrentSetting 固化本服身份(另有路由/会话等调用期读取方)。 + // 单 Role 形态无差异;直接删除会让上述消费方的服务器身份漂移。 + GlobalSettings.SetCurrentSetting(setting); // 初始化统一消息发送器:resolver 按发现层可用性选择—— // 启动流程先 Activate 发现层(含 player_route 读侧),后加载 Hotfix,故此处 // Bootstrap.Resolver 必然已就绪;未激活发现层的形态回落 DefaultPlayerRouteResolver。 @@ -136,18 +150,4 @@ public async Task Stop(string message = "") await ActorManager.RemoveAll(); } - /// - /// 基类抽象成员的最小实现:C284 统一形态下监听与「运行至退出」周期归宿主,热更实例不再自持 - /// 运行循环,宿主不调用本方法。 - /// - /// - /// The minimal implementation of the base abstract member: under the C284 unified shape the - /// listeners and the run-until-exit cycle stay with the host, the hotfix instance no longer - /// runs its own loop, and the host never calls this method. - /// - /// 已完成的任务 / A completed task - public override Task StartAsync() - { - return Task.CompletedTask; - } } diff --git a/GameFrameX.Hotfix/Logic/ServerRole/SessionResume/PlayerDisconnectedEventListener.cs b/GameFrameX.Hotfix/Logic/ServerRole/SessionResume/PlayerDisconnectedEventListener.cs index 094aac35d..2b94ba36f 100644 --- a/GameFrameX.Hotfix/Logic/ServerRole/SessionResume/PlayerDisconnectedEventListener.cs +++ b/GameFrameX.Hotfix/Logic/ServerRole/SessionResume/PlayerDisconnectedEventListener.cs @@ -35,13 +35,15 @@ namespace GameFrameX.Hotfix.Logic.ServerRole.SessionResume; /// /// 玩家物理断开业务监听器(C284 宿主→热更事件桥接承接方):房间断线标记 + 会话恢复两层协同通知 -///(语句自原热更侧 AppStartUpHotfixGame.OnDisconnected 内联段搬移,语义逐字保持)。 +///(语句自原热更侧 AppStartUpHotfixGame.OnDisconnected 内联段搬移,语义逐字保持; +/// 原名,C285 更名为 HotfixModuleLifecycleBridge)。 /// /// /// The player-disconnect business listener (the C284 host-to-hotfix event-bridging sink): marks the /// player disconnected in the room system and notifies the session-resume two-layer coordination /// (statements moved verbatim from the inlined block of the former hotfix-side -/// AppStartUpHotfixGame.OnDisconnected). 全局分发(actorId = 0)下代理参数为 null, +/// AppStartUpHotfixGame.OnDisconnected; renamed HotfixModuleLifecycleBridge in C285). +/// 全局分发(actorId = 0)下代理参数为 null, /// 房间代理在处理内自取(与原内联段同源 ActorManager.GetComponentAgent 全局重载); /// 自带旧回调迟到守卫, /// 恢复先于旧断开回调到达时安全跳过。 diff --git a/GameFrameX.Hotfix/StartUp/AppStartUpHotfixGameByGateWay.cs b/GameFrameX.Hotfix/StartUp/AppStartUpHotfixGameByGateWay.cs deleted file mode 100644 index 372785e74..000000000 --- a/GameFrameX.Hotfix/StartUp/AppStartUpHotfixGameByGateWay.cs +++ /dev/null @@ -1,189 +0,0 @@ -// ========================================================================================== -// GameFrameX 组织及其衍生项目的版权、商标、专利及其他相关权利 -// GameFrameX organization and its derivative projects' copyrights, trademarks, patents, and related rights -// 均受中华人民共和国及相关国际法律法规保护。 -// are protected by the laws of the People's Republic of China and related international regulations. -// 使用本项目须严格遵守相应法律法规及开源许可证之规定。 -// Usage of this project must strictly comply with applicable laws, regulations, and open-source licenses. -// 本项目采用 Apache License 2.0 单协议分发, -// This project is licensed solely under the Apache License 2.0, -// 完整许可证文本请参见源代码根目录下的 LICENSE 文件。 -// please refer to the LICENSE file in the root directory of the source code for the full license text. -// 禁止利用本项目实施任何危害国家安全、破坏社会秩序、 -// It is prohibited to use this project to engage in any activities that endanger national security, disrupt social order, -// 侵犯他人合法权益等法律法规所禁止的行为! -// or infringe upon the legitimate rights and interests of others, as prohibited by laws and regulations! -// 因基于本项目二次开发所产生的一切法律纠纷与责任, -// Any legal disputes and liabilities arising from secondary development based on this project -// 本项目组织与贡献者概不承担。 -// shall be borne solely by the developer; the project organization and contributors assume no responsibility. -// GitHub 仓库:https://github.com/GameFrameX -// GitHub Repository: https://github.com/GameFrameX -// Gitee 仓库:https://gitee.com/GameFrameX -// Gitee Repository: https://gitee.com/GameFrameX -// CNB 仓库:https://cnb.cool/GameFrameX -// CNB Repository: https://cnb.cool/GameFrameX -// 官方文档:https://gameframex.doc.alianblank.com/ -// Official Documentation: https://gameframex.doc.alianblank.com/ -// ========================================================================================== - - -/*using System.Net; -using System.Timers; -using GameFrameX.Launcher; -using GameFrameX.Network; -using GameFrameX.Network.Messages; -using GameFrameX.SuperSocket.ClientEngine; -using GameFrameX.SuperSocket.Server.Abstractions.Session; -using Timer = System.Timers.Timer; - -namespace GameFrameX.Hotfix.StartUp; - -internal partial class AppStartUpHotfixGame -{ - AsyncTcpSession _gatewayClient; - - private Timer _gateWayReconnectionTimer; - private Timer _gateWayHeartBeatTimer; - private ReqHeartBeat _reqGatewayActorHeartBeat; - - private void SendToGatewayMessage(IMessage message) - { - if (!_gatewayClient.IsConnected) - { - return; - } - - var span = messageEncoderHandler.Handler(message); - if (Setting.IsDebug && Setting.IsDebugSend) - { - LogHelper.Debug(message.ToSendMessageString(Setting.ServerType, ServerType.Gateway)); - } - - var result = _gatewayClient.TrySend(span); - if (result) - { - _gateWayHeartBeatTimer.Reset(); - } - } - - protected override void ConnectServerHandler() - { - ConnectToGateWay(); - } - - protected override void DisconnectServerHandler() - { - DisconnectToGateWay(); - } - - private void StartGatewayClient() - { - _gateWayReconnectionTimer = new Timer - { - Interval = 5000 - }; - _gateWayReconnectionTimer.Elapsed += GateWayReconnectionTimerOnElapsed; - _gateWayReconnectionTimer.Start(); - _gateWayHeartBeatTimer = new Timer - { - Interval = 5000 - }; - _gateWayHeartBeatTimer.Elapsed += GateWayHeartBeatTimerOnElapsed; - _gateWayHeartBeatTimer.Start(); - _reqGatewayActorHeartBeat = new ReqHeartBeat(); - _gatewayClient = new AsyncTcpSession(); - _gatewayClient.Closed += GateWayClientOnClosed; - _gatewayClient.DataReceived += GateWayClientOnDataReceived; - _gatewayClient.Connected += GateWayClientOnConnected; - _gatewayClient.Error += GateWayClientOnError; - } - - private void GateWayHeartBeatTimerOnElapsed(object sender, ElapsedEventArgs e) - { - _reqGatewayActorHeartBeat.Timestamp = TimeHelper.UnixTimeSeconds(); - _reqGatewayActorHeartBeat.UpdateUniqueId(); - SendToGatewayMessage(_reqGatewayActorHeartBeat); - } - - private void GateWayReconnectionTimerOnElapsed(object sender, ElapsedEventArgs e) - { - ConnectToGateWay(); - } - - private void GateWayClientOnError(object sender, SuperSocket.ClientEngine.ErrorEventArgs errorEventArgs) - { - LogHelper.Info("和网关服务器链接链接发生错误!" + errorEventArgs); - GateWayClientOnClosed(sender, errorEventArgs); - } - - private void GateWayClientOnConnected(object sender, EventArgs e) - { - // 和网关服务器链接成功,关闭重连 - _gateWayReconnectionTimer.Stop(); - _gateWayHeartBeatTimer.Start(); - var appSession = sender as IGameAppSession; - var netChannel = new DefaultNetworkChannel(appSession, messageEncoderHandler); - GameClientSessionManager.SetSession(appSession.SessionID, netChannel); //移除 - LogHelper.Info("和网关服务器链接链接成功!"); - ReqRegisterGameServer reqRegisterGameServer = new ReqRegisterGameServer - { - ServerType = Setting.ServerType, - ServerID = Setting.ServerId, - MinModuleMessageID = Setting.MinModuleId, - MaxModuleMessageID = Setting.MaxModuleId, - ServerName = Setting.ServerName - }; - SendToGatewayMessage(reqRegisterGameServer); - } - - private async void GateWayClientOnDataReceived(object sender, DataEventArgs dataEventArgs) - { - IGameAppSession appSession = (IGameAppSession)sender; - var messageData = dataEventArgs.Data.ReadBytes(dataEventArgs.Offset, dataEventArgs.Length); - var message = messageDecoderHandler.Handler(messageData); - if (message is MessageObject messageObject) - { - if (Setting.IsDebug && Setting.IsDebugReceive) - { - LogHelper.Info($"收到网关服务器消息:{messageObject.ToReceiveMessageString(ServerType.Gateway, ServerType)}"); - } - - var handler = HotfixManager.GetMessageHandler(message.MessageId); - if (handler == null) - { - LogHelper.Error($"找不到[{message.MessageId}][{messageObject.GetType()}]对应的handler"); - return; - } - - handler.Message = messageObject; - handler.NetworkChannel = GameClientSessionManager.GetSession(appSession.SessionID); - await handler.Init(); - await handler.InnerAction(); - } - } - - private void GateWayClientOnClosed(object sender, EventArgs eventArgs) - { - LogHelper.Info("和网关服务器链接链接断开!开启重连"); - // 和网关服务器链接断开,开启重连 - _gateWayReconnectionTimer.Start(); - _gateWayHeartBeatTimer.Stop(); - } - - private void ConnectToGateWay() - { - if (ConnectTargetServer == null) - { - return; - } - - var endPoint = new IPEndPoint(IPAddress.Parse((string)ConnectTargetServer.TargetIP), ConnectTargetServer.TargetPort); - _gatewayClient.Connect(endPoint); - } - - private void DisconnectToGateWay() - { - _gatewayClient?.Close(); - } -}*/ \ No newline at end of file diff --git a/GameFrameX.Launcher/StartUp/AppStartUpGame.cs b/GameFrameX.Launcher/StartUp/AppStartUpGame.cs index 8d1baae08..83dbd4604 100644 --- a/GameFrameX.Launcher/StartUp/AppStartUpGame.cs +++ b/GameFrameX.Launcher/StartUp/AppStartUpGame.cs @@ -137,9 +137,11 @@ protected override async Task ShutdownAsync(string exitMessage) /// 白名单为现有 TCP 登录流全链路(账号登录 → 角色列表/角色创建 → 角色登录); /// 是鉴权终态——业务侧 OnPlayerLogin 处理该消息并绑定 ActorId,此后会话消息全放行。 /// C204 起 (会话恢复)与角色登录同为鉴权完成信号——恢复即绑定 ActorId。 - /// C284 起监听面归宿主,本覆写自热更侧 AppStartUpHotfixGame 上移,语句逐字保持。 + /// C284 起监听面归宿主,本覆写自热更侧 AppStartUpHotfixGame 上移,语句逐字保持 + ///(原名,C285 更名为 HotfixModuleLifecycleBridge)。 /// Since C284 the listener surface lives with the host; this override moved up from the - /// hotfix-side AppStartUpHotfixGame with the statements kept verbatim. + /// hotfix-side AppStartUpHotfixGame with the statements kept verbatim (renamed + /// HotfixModuleLifecycleBridge in C285). /// /// KCP 会话鉴权配置 / The KCP session authentication options protected override SessionAuthenticationOptions CreateKcpSessionAuthenticationOptions() @@ -169,12 +171,13 @@ private static int GetLoginMessageId(Type messageType) /// /// Game 型会话建立钩子:达到最大在线数即拒绝并关闭,否则建立 - ///(语句自热更侧 AppStartUpHotfixGame.OnConnected 上移,C284)。 + ///(语句自热更侧 AppStartUpHotfixGame.OnConnected 上移,C284;原名,C285 更名为 HotfixModuleLifecycleBridge)。 /// /// /// The Game-shape session-established hook: rejects and closes the connection once the maximum /// client count is exceeded, otherwise registers the (moved up - /// verbatim from the hotfix-side AppStartUpHotfixGame.OnConnected, C284). + /// verbatim from the hotfix-side AppStartUpHotfixGame.OnConnected, C284; renamed + /// HotfixModuleLifecycleBridge in C285). /// /// 新建立的会话对象 / Newly established session object /// 表示异步操作的任务 / A task representing the asynchronous operation