initial commit

This commit is contained in:
Matthias Heil
2026-11-02 13:14:37 +01:00
commit 9d0cfd3c8e
6 changed files with 234 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
using H.Pipes.Apps.ConsoleApp.MessagePack;
using System;
using System.Linq;
const string DefaultPipeName = "named_pipe_test_server";
string? mode;
string pipeName = DefaultPipeName;
if (args.Any())
{
mode = args.ElementAt(0);
pipeName = args.ElementAtOrDefault(1) ?? DefaultPipeName;
}
else
{
Console.WriteLine("Enter mode('server' or 'client'):");
mode = await Console.In.ReadLineAsync().ConfigureAwait(false);
}
switch (mode?.ToUpperInvariant())
{
case "SERVER":
await MyServer.RunAsync(pipeName).ConfigureAwait(false);
break;
default:
await MyClient.RunAsync(pipeName).ConfigureAwait(false);
break;
}