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