com.cneicy.shrink-network-integration-app (0.2.0)
Published 2026-09-05 04:16:28 +08:00 by cneicy
Installation
registry=https://git.crash.work/api/packages/ShrinkSDK/npm/npm install com.cneicy.shrink-network-integration-app@0.2.0"com.cneicy.shrink-network-integration-app": "0.2.0"About this package
ShrinkNetwork 与 ShrinkApp 的桥接层,把默认网络服务纳入统一宿主服务容器。
ShrinkNetwork.Integration.App
ShrinkNetwork.Integration.App 是 ShrinkNetwork 与 ShrinkApp.Core 的桥接层。它负责把默认网络服务挂进宿主服务容器,让项目在进入统一宿主模式后,能明确地从 ShrinkApp 取得网络服务,而不是在各处直接耦合 ShrinkNetworkRuntime.Default。
Godot 和普通 .NET 项目安装 ShrinkSDK.Network.Integration.App;可打包源码位于 DotNet~。
当前能力
- 提供原生
ShrinkNetworkAppComponent,发布shrink.service.network - 把
ShrinkNetworkRuntime.Default包装为ShrinkNetworkAppService - ContextLoader 下由 Starter 组合根装配,服务门面随组件停用可逆注销
ShrinkNetworkAppInstaller仅保留给 ClassicHost 兼容路径,已标记过时
使用示例
var network = ShrinkApp.ShrinkApp.Services.GetRequired<ShrinkNetwork.Integration.App.ShrinkNetworkAppService>();
var service = network.Service;
说明
- 本包当前不主动绑定传输层,也不替业务决定 TCP / KCP / Loopback。
- 静态消息合同与静态 handler 的默认注册仍由
ShrinkNetworkRuntime.Default完成。 - 运行时实例 handler 仍然走
RegisterHandlers(object target)。
Dependencies
Dependencies
| ID | Version |
|---|---|
| com.cneicy.shrink-app-core | 0.2.0 |
| com.cneicy.shrink-context-core | 0.2.0 |
| com.cneicy.shrink-network | 0.3.0 |
| com.cysharp.unitask | 2.5.10 |
Keywords
network
integration
app
rpc