PiperNamedPipes 1.0.0.7
See the version list below for details.
dotnet add package PiperNamedPipes --version 1.0.0.7
NuGet\Install-Package PiperNamedPipes -Version 1.0.0.7
<PackageReference Include="PiperNamedPipes" Version="1.0.0.7" />
paket add PiperNamedPipes --version 1.0.0.7
#r "nuget: PiperNamedPipes, 1.0.0.7"
// Install PiperNamedPipes as a Cake Addin #addin nuget:?package=PiperNamedPipes&version=1.0.0.7 // Install PiperNamedPipes as a Cake Tool #tool nuget:?package=PiperNamedPipes&version=1.0.0.7
PiperNamedPipes
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...
Sample
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
server.Start();
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
client.Start();
//you can send a message like this
var message = new Message{
TimeStamp = DateTime.Now,
Text = "Hey there"
};
client.SendMessage(message);
Also, multiple clients can run at the same time...
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- NamedPipeWrapper (>= 1.5.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.