feat: replace inline writes with channel-based write loop and batch flush

This commit is contained in:
Joseph Doherty
2026-02-22 23:41:44 -05:00
parent ad6a02b9a2
commit 31660a4187
3 changed files with 118 additions and 71 deletions

View File

@@ -99,8 +99,8 @@ public class ClientTests : IAsyncDisposable
using var readCts = new CancellationTokenSource(TimeSpan.FromSeconds(5));
await _clientSocket.ReceiveAsync(buf, SocketFlags.None, readCts.Token);
// Trigger SendErrAsync
await _natsClient.SendErrAsync("Invalid Subject");
// Trigger SendErr
_natsClient.SendErr("Invalid Subject");
var n = await _clientSocket.ReceiveAsync(buf, SocketFlags.None, readCts.Token);
var response = Encoding.ASCII.GetString(buf, 0, n);