using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace CommonLibrary { /// /// 用于网络通信的二级协议头说明 /// public class CommonHeadCode { /// /// 用于同步和异步的网络的身份令牌,提升安全性 /// public static Guid KeyToken { get; set; } = new Guid("1275BB9A-14B2-4A96-9673-B0AF0463D474"); /// /// 同步通信的指令头说明,以10000开头,后面接20000,30000, /// [System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Auto)] public class SimplifyHeadCode { public static int 维护检查 { get; } = 10000;//10000开始的表明是系统相关的 public static int 更新检查 { get; } = 10001; public static int 账户检查 { get; } = 10002; public static int 参数下载 { get; } = 10003; public static int 密码修改 { get; } = 10004; public static int 更细账户 { get; } = 10005; public static int 获取账户 { get; } = 10006; public static int 更新公告 { get; } = 10007; public static int 注册账号 { get; } = 10008; public static int 更新版本 { get; } = 10009; public static int 请求文件 { get; } = 10010; public static int 意见反馈 { get; } = 10011; public static int 网络日志查看 { get; } = 11000;//11000开头的是日志请求和清空 public static int 网络日志清空 { get; } = 11001; public static int 同步日志查看 { get; } = 11002; public static int 同步日志清空 { get; } = 11003; public static int 更新日志查看 { get; } = 11004; public static int 更新日志清空 { get; } = 11005; public static int 运行日志查看 { get; } = 11006; public static int 运行日志清空 { get; } = 11007; public static int 文件日志查看 { get; } = 11008; public static int 文件日志清空 { get; } = 11009; public static int 反馈日志查看 { get; } = 11010; public static int 反馈日志清空 { get; } = 11011; public static int UDP日志查看 { get; } = 11012; public static int UDP日志清空 { get; } = 11013; /************************************************************************************** * * 为了保证您的指令头不和系统的冲突,您的指令头应该以20000之后开头 * **************************************************************************************/ } /// /// 异步通信的头说明,以字母H开头,后面跟I,G,K,L,M /// public class MultiNetHeadCode { public static int 总在线信息 { get; } = 50000; public static int 关闭客户端 { get; } = 50001; public static int 弹窗新消息 { get; } = 50002; public static int 时间的推送 { get; } = 50003; public static int 文件总数量 { get; } = 50004; public static int 初始化数据 { get; } = 50005; public static int 留言版消息 { get; } = 50006; /************************************************************************************** * * 为了保证您的指令头不和系统的冲突,您的指令头应该以I,J,K,L开头 * **************************************************************************************/ } //可以在下面进行扩展,需要保证长度都是统一的,新建您自己的类型 } }