NamedPipeIpc 2.0.0
dotnet add package NamedPipeIpc --version 2.0.0
NuGet\Install-Package NamedPipeIpc -Version 2.0.0
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.
<PackageReference Include="NamedPipeIpc" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NamedPipeIpc" Version="2.0.0" />
<PackageReference Include="NamedPipeIpc" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NamedPipeIpc --version 2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NamedPipeIpc, 2.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package NamedPipeIpc@2.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NamedPipeIpc&version=2.0.0
#tool nuget:?package=NamedPipeIpc&version=2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Named Pipe Wrapper for .NET 8
A simple, easy to use, strongly-typed wrapper around .NET named pipes.
Features
- Create named pipe servers that can handle multiple client connections simultaneously.
- Send strongly-typed messages between clients and servers: any serializable .NET object can be sent over a pipe and will be automatically serialized/deserialized, including cyclical references and complex object graphs.
- Messages are sent and received asynchronously on a separate background thread and marshalled back to the calling thread (typically the UI).
- Supports large messages - up to 300 MiB.
Requirements
Requires .NET 8
Usage
Message:
(Class must be possible to serialize with Json. How to write .NET objects as JSON (serialize))
class SomeClass
{
public int Id { get; set; }
public string Text { get; set; }
}
Server:
var server = new NamedPipeServer<SomeClass>("MyServerPipe");
server.ClientConnected += delegate(NamedPipeConnection<SomeClass> conn)
{
Console.WriteLine("Client {0} is now connected!", conn.Id);
conn.PushMessage(new SomeClass { Text: "Welcome!" });
};
server.ClientMessage += delegate(NamedPipeConnection<SomeClass> conn, SomeClass message)
{
Console.WriteLine("Client {0} says: {1}", conn.Id, message.Text);
};
// Start up the server asynchronously and begin listening for connections.
// This method will return immediately while the server runs in a separate background thread.
server.Start();
// ...
Client:
var client = new NamedPipeClient<SomeClass>("MyServerPipe");
client.ServerMessage += delegate(NamedPipeConnection<SomeClass> conn, SomeClass message)
{
Console.WriteLine("Server says: {0}", message.Text);
};
// Start up the client asynchronously and connect to the specified server pipe.
// This method will return immediately while the client runs in a separate background thread.
client.Start();
// ...
Tests
- If you run all tests, some tests may fail. If you do them one by one, there is no problem.
History
- 2024-03-25 Ver 2.0
Breaking Changes
- Changed .NET Framework 4.0 to .NET 8.
- Deprecated BinaryFormatter.
Serializableattribute is not required. - Changed BinaryFormatter to JsonSerializer.
- Changed WinForm to WPF on ExampleGUI.
- Changed nUnit to xUnit Test.
Changes for porting
Changes in NamedPipeWrapper Project
Original Project
This is a fork of Named Pipe Wrapper.
MIT License
Copyright (c) 2013 Andrew C. Dvorak andy@andydvorak.net
Copyright (c) 2024 Taisidô Mikihiro (Ganges)
Also See Credits
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. 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 is compatible. 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 is compatible. 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. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
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 |
|---|---|---|
| 2.0.0 | 544 | 11/23/2025 |