serialization improves and benchmarks

This commit is contained in:
2025-07-27 23:46:54 +03:00
parent 6c55567d3f
commit 965c8eb823
13 changed files with 243 additions and 94 deletions
+3 -2
View File
@@ -35,7 +35,8 @@ namespace mROA.Implementation
public EMessageType MessageType { get; set; }
public byte[] Data { get; set; }
public object Serialized { get; set; }
public IEndPointContext Context { get; set; }
public override string ToString()
{
return $" {Id}:{MessageType} [{Data.Length}]";
@@ -57,7 +58,7 @@ namespace mROA.Implementation
public ushort BodyLength;
public byte Type;
public NetworkMessage ToMessage(ReadOnlySpan<byte> memory)
public NetworkMessage ToMessage(Span<byte> memory)
{
var data = memory[19..][..BodyLength];
return new NetworkMessage