feat: initial commit - HJHA game server full source
6 major server modules (PdkFriendServer/GlobalSever/ServerCore/GameModule/GameNetModule) + game logic (GameFix/GameDAL/ServerData) + network layer (NetWorkMessage) + data layer (ObjectModel) + utilities (MrWu/Core/Config/CloudAPI/dll) + adapters (zyxAdapter/base) .NET 8.0 C# solution, 16 projects, 958 source files
This commit is contained in:
95
GlobalSever/Data/ServerInfo.cs
Normal file
95
GlobalSever/Data/ServerInfo.cs
Normal file
@ -0,0 +1,95 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MrWu.Basic;
|
||||
|
||||
namespace Server
|
||||
{
|
||||
/// <summary>
|
||||
/// 服务器信息
|
||||
/// </summary>
|
||||
public class ServerInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 模块id
|
||||
/// </summary>
|
||||
public int moduleId;
|
||||
|
||||
/// <summary>
|
||||
/// 模块编号
|
||||
/// </summary>
|
||||
public int nodenum;
|
||||
|
||||
/// <summary>
|
||||
/// 服务器名称
|
||||
/// </summary>
|
||||
public string serverName;
|
||||
|
||||
/// <summary>
|
||||
/// 启动时间
|
||||
/// </summary>
|
||||
public DateTime startTime;
|
||||
|
||||
/// <summary>
|
||||
/// 处理包数量
|
||||
/// </summary>
|
||||
public long dopackCnt;
|
||||
|
||||
/// <summary>
|
||||
/// 帧率
|
||||
/// </summary>
|
||||
public int fps;
|
||||
|
||||
/// <summary>
|
||||
/// 最低帧率
|
||||
/// </summary>
|
||||
public int minfps;
|
||||
|
||||
/// <summary>
|
||||
/// 最低运行时间
|
||||
/// </summary>
|
||||
public double maxRuntime;
|
||||
|
||||
/// <summary>
|
||||
/// 链接数
|
||||
/// </summary>
|
||||
public int ConnectCnt;
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数
|
||||
/// </summary>
|
||||
public int BindConnectCnt;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public ServerInfo() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
int weight = -15;
|
||||
sb.AppendLine(BaseFun.Align("moduleId:", moduleId, weight));
|
||||
sb.AppendLine(BaseFun.Align("nodenum:", nodenum, weight));
|
||||
sb.AppendLine(BaseFun.Align("服务器名称:", serverName, weight));
|
||||
sb.AppendLine(BaseFun.Align("启动时间:", startTime, weight));
|
||||
sb.AppendLine(BaseFun.Align("收包数量:",dopackCnt,weight));
|
||||
sb.AppendLine(BaseFun.Align("帧率:",fps,weight));
|
||||
sb.AppendLine(BaseFun.Align("最低帧率:",minfps,weight));
|
||||
sb.AppendLine(BaseFun.Align("连接数:", ConnectCnt, weight));
|
||||
sb.AppendLine(BaseFun.Align("绑定数:", BindConnectCnt, weight));
|
||||
sb.AppendLine(BaseFun.Align("最长运行时间:", maxRuntime, weight));
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user