fix: 由于解析错误导致的无法通信的问题

This commit is contained in:
2025-07-17 14:11:24 +08:00
parent 56dcbf5caa
commit 1053d71d29
4 changed files with 99 additions and 107 deletions

View File

@@ -393,6 +393,16 @@ namespace WebProtocol
bytes[8..]);
}
/// <summary>
/// [TODO:description]
/// </summary>
/// <param name="bytes">[TODO:parameter]</param>
/// <returns>[TODO:return]</returns>
public static bool IsRecvDataPackage(byte[] bytes)
{
return bytes[4] == (byte)PackSign.RecvData;
}
/// <summary>
/// 将数据包转化为字节数组
/// </summary>
@@ -496,6 +506,16 @@ namespace WebProtocol
return new RecvRespPackage(timestamp, bytes[5], bytes[6]);
}
/// <summary>
/// [TODO:description]
/// </summary>
/// <param name="bytes">[TODO:parameter]</param>
/// <returns>[TODO:return]</returns>
public static bool IsRecvRespPackage(byte[] bytes)
{
return bytes[4] == (byte)PackSign.RecvResp;
}
/// <summary>
/// 将数据包转化为字节数组
/// </summary>