public static ProtoID GetProtoIDFromBytes(byte[] data, int dataLen) { if (dataLen < (GetNormalProtoHeadLen())) { return(null); } return(BitConverter.ToUInt16(data, ServerHead.GetSerializeLength())); }
public static int GetNormalProtoHeadLen() { return(ServerHead.GetSerializeLength() + ProtoHead.GetSerializeLength()); }