Cleanup unnessisary interface classes

This commit is contained in:
derek.holloway committed 2026-08-03 13:25:28 -07:00
1 parent b83887cb2a
commit 46efb5bd65
8 files changed
+58 -117

No files matched your search

+2 -3
View File
@@ -1,6 +1,5 @@
using System;
using System.Buffers;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using MessagePack;
@@ -28,7 +27,7 @@ namespace Mistox {
// Use an expandable buffer writer from the system stack
var writer = new ArrayBufferWriter<byte>(256);
// Advance the writer past the 3-byte header slot so MessagePack doesn't overwrite it
// Advance the writer past the header slot so MessagePack doesn't overwrite it
writer.Advance(HeaderLength);
// Serialize the payload DIRECTLY into the final buffer memory
@@ -40,7 +39,7 @@ namespace Mistox {
DataLength = (ushort)(writer.WrittenCount - HeaderLength)
};
// Map the struct directly onto the 3-byte reservation we left at the front
// Map the struct directly onto the reservation we left at the front
writer.WrittenMemory.Slice(0, HeaderLength);
MemoryMarshal.Write(writer.GetSpan(HeaderLength).Slice(0, HeaderLength), in header);