using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using MrWu.Basic; namespace Server { /// /// 服务器信息 /// public class ServerInfo { /// /// 模块id /// public int moduleId; /// /// 模块编号 /// public int nodenum; /// /// 服务器名称 /// public string serverName; /// /// 启动时间 /// public DateTime startTime; /// /// 处理包数量 /// public long dopackCnt; /// /// 帧率 /// public int fps; /// /// 最低帧率 /// public int minfps; /// /// 最低运行时间 /// public double maxRuntime; /// /// 链接数 /// public int ConnectCnt; /// /// 绑定数 /// public int BindConnectCnt; /// /// /// public ServerInfo() { } /// /// /// /// 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(); } } }