From 6c55567d3f345d3d34e3f69e7783def7741b0f42 Mon Sep 17 00:00:00 2001 From: Mitrofanov Mikhail Date: Sun, 27 Jul 2025 11:52:16 +0300 Subject: [PATCH] fast new message header --- Example.Load/Program.cs | 2 +- mROA/Implementation/ChannelInteractionModule.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Example.Load/Program.cs b/Example.Load/Program.cs index 160e454..a0d0b94 100644 --- a/Example.Load/Program.cs +++ b/Example.Load/Program.cs @@ -31,7 +31,7 @@ Console.WriteLine("End waiting"); var totalRequests = tasks.Sum(i => i.Result); Console.WriteLine($"Total requests: {totalRequests:N0}"); Console.WriteLine($"Results: {totalRequests / time.TotalSeconds:N} RPS"); -File.AppendAllText("results.txt", $"[SINGLE CBOR WRITER ALLOC] {totalRequests}\r\n"); +File.AppendAllText("results.txt", $"[HEADER REMAKE] {totalRequests}\r\n"); async Task> GetLoadEndpoints(int count) { diff --git a/mROA/Implementation/ChannelInteractionModule.cs b/mROA/Implementation/ChannelInteractionModule.cs index 63b4778..6b41ec0 100644 --- a/mROA/Implementation/ChannelInteractionModule.cs +++ b/mROA/Implementation/ChannelInteractionModule.cs @@ -156,7 +156,7 @@ namespace mROA.Implementation public async Task SingleReceive(CancellationToken token = default) { - var firstRead = _ioStream.Read(_buffer.Span); + var firstRead = await _ioStream.ReadAsync(_buffer, token); var meta = MemoryMarshal.Read(_buffer.Span);