Files
ClientServerProject/CommonLibrary/HeadCode.cs

86 lines
3.9 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace CommonLibrary
{
/// <summary>
/// 用于网络通信的二级协议头说明
/// </summary>
public class CommonHeadCode
{
/// <summary>
/// 用于同步和异步的网络的身份令牌,提升安全性
/// </summary>
public static Guid KeyToken { get; set; } = new Guid("1275BB9A-14B2-4A96-9673-B0AF0463D474");
/// <summary>
/// 同步通信的头说明以字母A开头后面接B,C,D,E,F
/// </summary>
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Auto)]
public class SimplifyHeadCode
{
public static string { get; } = "A001";//A开始的表明是系统相关的
public static string { get; } = "A002";
public static string { get; } = "A003";
public static string { get; } = "A004";
public static string { get; } = "A005";
public static string { get; } = "A006";
public static string { get; } = "A007";
public static string { get; } = "A008";
public static string { get; } = "A009";
public static string { get; } = "A010";
public static string { get; } = "A011";
public static string { get; } = "A012";
public static string { get; } = "B001";//B开头的是日志请求和清空
public static string { get; } = "B002";
public static string { get; } = "B003";
public static string { get; } = "B004";
public static string { get; } = "B005";
public static string { get; } = "B006";
public static string { get; } = "B007";
public static string { get; } = "B008";
public static string { get; } = "B009";
public static string { get; } = "B010";
public static string { get; } = "B011";
public static string { get; } = "B012";
/**************************************************************************************
*
* 为了保证您的指令头不和系统的冲突您的指令头应该以C,D,E,F开头
*
**************************************************************************************/
}
/// <summary>
/// 异步通信的头说明以字母H开头后面跟I,G,K,L,M
/// </summary>
public class MultiNetHeadCode
{
public static string 线 { get; } = "H001";
public static string { get; } = "H002";
public static string { get; } = "H003";
public static string { get; } = "H004";
public static string { get; } = "H005";
public static string { get; } = "H006";
public static string { get; } = "H007";
/**************************************************************************************
*
* 为了保证您的指令头不和系统的冲突您的指令头应该以I,J,K,L开头
*
**************************************************************************************/
}
//可以在下面进行扩展,需要保证长度都是统一的,新建您自己的类型
}
}