test(upserver): 归档存档迁移与玩法闭环回归工具
This commit is contained in:
9
CodexOutput/upserver/uloop-hub-test.cs
Normal file
9
CodexOutput/upserver/uloop-hub-test.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using asap.core;
|
||||
if (!UnityEngine.Application.isPlaying) return "Refused: not playing";
|
||||
var user = GContext.container.Resolve<game.IUserService>();
|
||||
var api = GContext.container.Resolve<ICustomServerMgr>();
|
||||
var hub = GContext.container.Resolve<IRTService>();
|
||||
if (!user.IsAuthorized || (user.ApiPlayerId != "101" && user.ApiPlayerId != "102") || api.ApiBaseUri.AbsoluteUri != "http://s101.local:18080/" || !hub.IsConnected)
|
||||
return "Refused: wrong account, endpoint or disconnected";
|
||||
var response = await hub.Publish("Test", "arg1", "arg2");
|
||||
return $"ApiPlayerId={user.ApiPlayerId}; Connected={hub.IsConnected}; HubTest={response}";
|
||||
Reference in New Issue
Block a user