2026-04-01 12:46:48 +02:00
|
|
|
using System.Text;
|
|
|
|
|
using NamedPipes;
|
|
|
|
|
var count = 0;
|
|
|
|
|
var message = "Hello World!".ToCharArray();
|
2026-04-07 12:21:37 +02:00
|
|
|
VisualizerModel visualizerModel = new VisualizerModel
|
|
|
|
|
{
|
|
|
|
|
Content = "Hello from TestClient",
|
|
|
|
|
Point = new System.Numerics.Vector3(1, 2, 3),
|
|
|
|
|
//Orientation = System.Numerics.Quaternion.Identity,
|
|
|
|
|
//PointArray = [new System.Numerics.Vector3(4, 5, 6), new System.Numerics.Vector3(7, 8, 9)],
|
|
|
|
|
//Frame = (new System.Numerics.Vector3(10, 11, 12), System.Numerics.Quaternion.Identity, 1.0f),
|
|
|
|
|
//FrameArray = [(new System.Numerics.Vector3(13, 14, 15), System.Numerics.Quaternion.Identity, 2.0f), (new System.Numerics.Vector3(16, 17, 18), System.Numerics.Quaternion.Identity, 3.0f)]
|
|
|
|
|
};
|
2026-04-01 12:46:48 +02:00
|
|
|
while (true)
|
|
|
|
|
{
|
2026-04-01 15:47:54 +02:00
|
|
|
var pipeClient = new NamedPipeClient("testPipe",@".\","TestServer",logger:Console.WriteLine);
|
|
|
|
|
Thread.Sleep(1000);
|
2026-04-07 12:21:37 +02:00
|
|
|
await pipeClient.SetVisualizerModelAsync(visualizerModel);
|
2026-04-01 12:46:48 +02:00
|
|
|
pipeClient.SetMessageAsync($"Hello from TestClient " + count++).GetAwaiter().GetResult();
|
2026-04-07 12:21:37 +02:00
|
|
|
//pipeClient.SetDebugObjectAsync(new DebugObject{Type = typeof(string).FullName,Data = Encoding.GetEncoding("UTF-8").GetBytes(message)}).GetAwaiter().GetResult();
|
2026-04-01 12:46:48 +02:00
|
|
|
pipeClient.Dispose();
|
|
|
|
|
}
|