From 5c26c1aa5ce38fc47c5757e7256c367ca52f6345 Mon Sep 17 00:00:00 2001 From: ahmed Date: Sun, 5 Apr 2026 15:12:51 +0300 Subject: [PATCH] clients --- Tests/Distribution/NodeFanout/Server/Program.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Tests/Distribution/NodeFanout/Server/Program.cs b/Tests/Distribution/NodeFanout/Server/Program.cs index ce9fe38..2ba9191 100644 --- a/Tests/Distribution/NodeFanout/Server/Program.cs +++ b/Tests/Distribution/NodeFanout/Server/Program.cs @@ -21,7 +21,7 @@ Console.WriteLine($"[Server] resources={resourceCount} interval={intervalMs}ms var wh = new Warehouse(); // --- Warehouse setup ------------------------------------------------- await wh.Put("sys", new MemoryStore()); -await wh.Put("sys/server", new EpServer() { Port = (ushort)port }); +var server = await wh.Put("sys/server", new EpServer() { Port = (ushort)port }); // Create and register all sensor resources var sensors = new SensorResource[resourceCount]; @@ -34,6 +34,8 @@ for (int i = 0; i < resourceCount; i++) await wh.Open(); Console.WriteLine($"[Server] Listening on port {port} with {resourceCount} resources."); + + // --- Emit loop ------------------------------------------------------- // Continuously update all resource properties at the given interval. // This drives property-change notifications to all attached clients. @@ -63,7 +65,7 @@ _ = Task.Run(async () => await Task.Delay(5000); long delta = totalEmitted - lastEmitted; lastEmitted = totalEmitted; - Console.WriteLine($"[Server] {DateTime.Now:HH:mm:ss} emitted/5s={delta} rate={delta/5.0:F0}/s"); + Console.WriteLine($"[Server] {DateTime.Now:HH:mm:ss} emitted/5s={delta} rate={delta/5.0:F0}/s Clients:{server.Connections.Count}"); } });