Files

13 lines
523 B
C#
Raw Permalink Normal View History

2026-04-01 12:46:48 +02:00
using System.Text;
using NamedPipes;
var count = 0;
var message = "Hello World!".ToCharArray();
while (true)
{
var pipeClient = new NamedPipeClient("testPipe",@".\","TestServer",logger:Console.WriteLine);
Thread.Sleep(1000);
2026-04-01 12:46:48 +02:00
pipeClient.SetMessageAsync($"Hello from TestClient " + count++).GetAwaiter().GetResult();
pipeClient.SetDebugObjectAsync(new DebugObject{Type = typeof(string).FullName,Data = Encoding.GetEncoding("UTF-8").GetBytes(message)}).GetAwaiter().GetResult();
pipeClient.Dispose();
}