This commit is contained in:
2026-10-06 01:14:13 +08:00
parent b05ebeeb90
commit 1f7b9d837f
13 changed files with 560 additions and 46 deletions
@@ -69,6 +69,12 @@ namespace Assets.MyGame.Scripts.Net
nextHeartbeatTime = Time.realtimeSinceStartup + HeartbeatIntervalSeconds;
}
/// <summary>获取指定类型 Socket 的完整连接地址(含 baseUrl,供外部拼接查询参数,如象棋 Hub 的 ?userId=)</summary>
public string GetSocketPath(SocketType type)
{
return baseUrl + socketPaths[type];
}
private void Update()
{
if (Time.realtimeSinceStartup < nextHeartbeatTime)