OutWit.Communication.Server.Pipes 2.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package OutWit.Communication.Server.Pipes --version 2.0.2
                    
NuGet\Install-Package OutWit.Communication.Server.Pipes -Version 2.0.2
                    
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.Server.Pipes" Version="2.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OutWit.Communication.Server.Pipes" Version="2.0.2" />
                    
Directory.Packages.props
<PackageReference Include="OutWit.Communication.Server.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.Server.Pipes --version 2.0.2
                    
#r "nuget: OutWit.Communication.Server.Pipes, 2.0.2"
                    
#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.Server.Pipes@2.0.2
                    
#: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.Server.Pipes&version=2.0.2
                    
Install as a Cake Addin
#tool nuget:?package=OutWit.Communication.Server.Pipes&version=2.0.2
                    
Install as a Cake Tool

OutWit.Communication.Server.Pipes

Named Pipes transport server for WitRPC, enabling a server to handle client connections over named pipes (efficient local IPC with support for multiple clients).

Overview

OutWit.Communication.Server.Pipes allows a WitRPC server to listen for incoming connections via a Named Pipe. Named pipes are a powerful IPC mechanism on Windows (and supported on other OSes via .NET's implementation), suitable for communication on the same machine and even between machines in a Windows network. This transport supports multiple clients: the server can accept several pipe connections concurrently (up to a configured limit). Named pipes are useful for local services that need to talk to multiple client applications without using network sockets, as well as for secure intra-machine communication.

When you configure a named pipe server, it creates a pipe name. Clients connect to that name (locally as \\.\pipe\Name on Windows, or a similar path on Unix). Under the hood, the OS handles each client as a separate connection instance of the same named pipe. WitRPC will manage these connections and route RPC calls from each client to your service.

Usage note: Use this server in conjunction with OutWit.Communication.Client.Pipes on the client side. The pipe name must match.

Installation

Install-Package OutWit.Communication.Server.Pipes

Usage

To host a WitRPC service over named pipes, specify a pipe name and an optional client limit:

using OutWit.Communication.Server;
using OutWit.Communication.Server.Pipes;
using OutWit.Communication.Serializers;

var server = WitServerBuilder.Build(options =>
{
    options.WithService(new MyService());
    options.WithNamedPipe("MyAppPipe", maxNumberOfClients: 5);
    options.WithJson();
    options.WithoutEncryption(); // local pipes may not need encryption, but you can enable it
});
server.StartWaitingForConnection();
Console.WriteLine("Named pipe server listening on MyAppPipe");

This configures the server to create a named pipe called "MyAppPipe" and allow up to 5 simultaneous client connections. The server will wait for clients to connect to MyAppPipe. On Windows, the full pipe path is \\.\pipe\MyAppPipe; on Linux/macOS, .NET will create a domain socket (usually in a temp path) to represent the pipe.

Clients (using OutWit.Communication.Client.Pipes) should connect with the same name:

options.WithNamedPipe("MyAppPipe");

Optionally, clients can specify a machine name to connect to a remote machine's pipe, e.g., .WithNamedPipe("ServerMachine", "MyAppPipe"), if the server's machine is accessible and the pipe is permitted for remote access.

When multiple clients connect, the WitRPC server will handle each in parallel (each client gets its own thread or async task context). Your service calls are invoked concurrently as needed, so ensure your service implementation is thread-safe if multiple clients might call at the same time.

Security: By default, named pipes on Windows will be accessible only to the same user that created them (and administrators). You can further restrict or open access using pipe security (though that is outside the scope of WitRPC and done at OS level). For most cases, using the default security and running both client and server under the same account is sufficient. Additionally, you can require an access token for your WitRPC server (options.WithAccessToken("...")), so even if another process connects to the pipe, it cannot successfully invoke service calls without the token. Also consider using encryption (WithEncryption()) if you want to ensure that even on-machine data cannot be sniffed (though named pipe traffic stays within the OS and is not exposed on the network).

Cross-machine usage: If you attempt to use named pipes across machines (Windows only), make sure the server's pipe is created with the proper prefix and security for remote access, and that the client has the necessary permissions. This is an advanced scenario; in many cases if cross-machine communication is needed, using TCP or WebSocket is simpler.

Further Documentation

Refer to the WitRPC documentation for more about using named pipes, including troubleshooting connection issues and performance considerations for IPC.

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.1.0 104 9/11/2025
2.0.2 80 7/5/2025
2.0.1 77 7/5/2025
2.0.0 76 6/7/2025
1.2.0 121 2/28/2025
1.1.1 113 2/1/2025
1.1.0 120 1/25/2025
1.0.2 104 1/11/2025
1.0.0 127 1/2/2025