dh fully works, refactor packet handling stuff

This commit is contained in:
raphaeIl
2025-01-12 19:57:52 -05:00
parent 730fff1545
commit 71f602b7fe
13 changed files with 418 additions and 576 deletions

View File

@@ -0,0 +1,25 @@
namespace Novaria.Common.Util
{
public static class Utils
{
public static void PrintByteArray(byte[] byteArray)
{
if (byteArray == null || byteArray.Length == 0)
{
Console.WriteLine("[]");
return;
}
Console.WriteLine(string.Join(",", byteArray));
}
public static byte[] CombineByteArrays(byte[] array1, byte[] array2)
{
byte[] combined = new byte[array1.Length + array2.Length];
Buffer.BlockCopy(array1, 0, combined, 0, array1.Length);
Buffer.BlockCopy(array2, 0, combined, array1.Length, array2.Length);
return combined;
}
}
}