OutWit.Communication.Client.Pipes 2.0.1

dotnet add package OutWit.Communication.Client.Pipes --version 2.0.1
                    
NuGet\Install-Package OutWit.Communication.Client.Pipes -Version 2.0.1
                    
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="OutWit.Communication.Client.Pipes" Version="2.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OutWit.Communication.Client.Pipes" Version="2.0.1" />
                    
Directory.Packages.props
<PackageReference Include="OutWit.Communication.Client.Pipes" />
                    
Project file
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 OutWit.Communication.Client.Pipes --version 2.0.1
                    
#r "nuget: OutWit.Communication.Client.Pipes, 2.0.1"
                    
#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 OutWit.Communication.Client.Pipes@2.0.1
                    
#: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=OutWit.Communication.Client.Pipes&version=2.0.1
                    
Install as a Cake Addin
#tool nuget:?package=OutWit.Communication.Client.Pipes&version=2.0.1
                    
Install as a Cake Tool

OutWit.Communication.Client.Pipes

Named Pipes transport client for WitRPC, allowing efficient inter-process communication via named pipes on the local machine (with support for multiple clients).

Overview

OutWit.Communication.Client.Pipes enables the use of Named Pipes as the transport for a WitRPC client. Named pipes are a reliable, high-throughput IPC mechanism provided by the operating system, suitable for communication between processes on the same machine (and even across machines in a Windows domain). This transport allows multiple clients to connect to a server using the same pipe name, with the OS handling the connections behind the scenes. It's useful for local communications where you might have several client processes interacting with a single server process (for example, multiple applications or services talking to a local service host).

Using named pipes, the server creates a pipe with a specific name, and clients connect to that name. The WitRPC framework handles framing and message transfer over the pipe, so you use it just like any other transport.

Note: Use this client together with OutWit.Communication.Server.Pipes on the server side. The pipe name must match exactly on both ends.

Installation

Install-Package OutWit.Communication.Client.Pipes

Usage

To use the named pipe transport, specify it when building your WitRPC client. For example:

using OutWit.Communication.Client;
using OutWit.Communication.Client.Pipes;
using OutWit.Communication.Serializers;

var client = WitClientBuilder.Build(options =>
{
    options.WithNamedPipe("MyAppPipe");  // connect to a named pipe "MyAppPipe"
    options.WithJson();
    options.WithEncryption();           // encryption is optional for local pipes
});
await client.ConnectAsync(TimeSpan.FromSeconds(5));

IMyService service = client.GetService<IMyService>();

On the server side, you would use the corresponding server package to listen on the same pipe name:

// Server-side (OutWit.Communication.Server.Pipes) configuration example:
options.WithNamedPipe("MyAppPipe", maxNumberOfClients: 10);

The maxNumberOfClients parameter on the server defines how many simultaneous client connections are allowed.

After the client is connected, using service is the same as with any other transport. You can call methods and subscribe to events normally. The named pipe transport ensures that these calls and events are transmitted through the pipe efficiently.

Remote and Cross-Platform Usage: By default, calling .WithNamedPipe("MyAppPipe") on the client will try to connect to a pipe on the local machine (the server field defaults to "." for local). If you need to connect to a named pipe on a remote Windows machine, you can use the overload options.WithNamedPipe("ServerMachineName", "MyAppPipe") which will attempt to open \\ServerMachineName\pipe\MyAppPipe. Keep in mind that remote named pipe access may require proper network permissions and is generally limited to Windows environments. On Linux/macOS, .NET's named pipe implementation uses Unix domain sockets, which are local-only.

Security: Named pipes on Windows can have ACLs restricting which users or processes can connect. When you create a named pipe without specifying security, it usually is accessible to the same user account or local system. For added security, you can incorporate WitRPC's token authentication (so that even if a process connects to the pipe, it must present the correct token to use the service). Also, enabling WithEncryption() will encrypt messages over the pipe, which might be useful if you have concerns even on a local machine (though typically pipe communication is not easily intercepted without access to the machine).

Further Documentation

For more about using named pipes in WitRPC and advanced pipe usage (including setting custom security or handling remote connections), see the official documentation on witrpc.io.

Product 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 is compatible.  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.

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.1 68 7/5/2025
2.0.0 74 6/7/2025
1.2.0 117 2/28/2025
1.1.1 122 2/1/2025
1.1.0 99 1/25/2025
1.0.2 104 1/11/2025
1.0.0 115 1/2/2025