.NET Standard 2.0
Suggested Alternatives


There is a newer version of this package available.
See the version list below for details.
NuGet\Install-Package PiperNamedPipes -Version
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
dotnet add package PiperNamedPipes --version
<PackageReference Include="PiperNamedPipes" Version="" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PiperNamedPipes --version
#r "nuget: PiperNamedPipes,"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install PiperNamedPipes as a Cake Addin
#addin nuget:?package=PiperNamedPipes&version=

// Install PiperNamedPipes as a Cake Tool
#tool nuget:?package=PiperNamedPipes&version=


Easy (and type-safe) communication using named pipes. This library allows your apps to communicate with each other, locally anyway.

How it works?

Create a server (instance of the Piper.Server class). Then start a client (instance of the Piper.Client class), or multiple clients. Now anytime on of the clients sends a message to the server, the server re-sends the message to all the other clients. Nothing too complicated...


First, create a class you want to use as the message. I'll call it the Message class. You can also just use string or anything that's already defined in C# or your project.

//the message class
public class Message{
    public DateTime TimeStamp { get; set; }
    public string Text { get; set; }

Create a named pipe server (instance of Piper.Server class).

//create and instance of the server
//in this sample, we're just going to send strings as messages
var server = new Piper.Server<Message>("pipename");
//start the server

Now that the server is running, let's create a client.

//create and instance of a client
var client = new Piper.Client<Message>("pipename");
//let's also define what the client will do, once it recieves a message
client.OnMessageRecieved += async (sender, args) =>
    //args is an instance of PiperArgs class and it's Msg property holds the message
    //I'll just print it here
    Console.WriteLine($"Time Stamp: {args.Msg.TimeStamp}, Text: {args.Msg.Text}");
//now we start the client

//you can send a message like this
var message = new Message{
    TimeStamp = DateTime.Now,
    Text = "Hey there"

Also, multiple clients can run at the same time...

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated 453 6/21/2019 401 6/21/2019 404 6/20/2019 394 6/20/2019 417 6/20/2019 397 6/20/2019 406 6/20/2019 403 6/20/2019 412 6/20/2019