1234567891011121314151617181920212223242526272829303132333435 |
- namespace XGame.Framework.Network
- {
- internal static class NetDefine
- {
- public const int SESSION_TIMEOUT = 4000;
- public const int SESSION_BUFFER_SIZE = 0x1000;//4096
- /// <summary>消息分帧时间限制-默认33毫秒</summary>
- public const int MsgFrameTimeLimit = 33;
- /// <summary>消息压缩长度-默认4097-目前客户端不做压缩</summary>
- public const int CompressThreshold = 0x1001;
- /// <summary>
- /// 心跳包的头部长度
- /// </summary>
- public const int HEAD_LENGTH_HEART = 2;
- /// <summary>
- /// Head+2(msgLength)
- /// Request、Response的头部长度
- /// </summary>
- public const int HEAD_LENGTH_REQUEST = 12;
- /// <summary>
- /// Push的头部头部长度
- /// </summary>
- public const int HEAD_LENGTH_PUSH = 8;
- /// <summary>
- /// 魔法值 也是版本号
- /// </summary>
- public const int MAGIC = 0x01;
- public const int CONN_PROTO_ID = 0;
- public const int CONN_SEQ_ID = 0;
- public const int GATEWAY_ERROR_ID = 1;
- }
- }
|