Skip to content

Instantly share code, notes, and snippets.

View Suplanus's full-sized avatar

Johann Weiher Suplanus

View GitHub Profile
@Suplanus
Suplanus / PipeBidirectional.cs
Last active August 28, 2019 06:53
NamedPipeServerStream & NamedPipeClientStream InOut async: https://suplanus.de/namedpipestream-inout-async/
// Client
var pipeClient = new PipeBidirectional(PipeType.Client);
pipeClient.PipeMessage += PipeServerOnPipeMessage;
pipeClient.Start("MyPipe");
pipeClient.ListenAsync();
pipeClient.WriteAsync("Hello from Client");
private static void PipeServerOnPipeMessage(string args)
{
// Do stuff