GrpcDotNetNamedPipes 3.0.0

dotnet add package GrpcDotNetNamedPipes --version 3.0.0                
NuGet\Install-Package GrpcDotNetNamedPipes -Version 3.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="GrpcDotNetNamedPipes" Version="3.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GrpcDotNetNamedPipes --version 3.0.0                
#r "nuget: GrpcDotNetNamedPipes, 3.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.
// Install GrpcDotNetNamedPipes as a Cake Addin
#addin nuget:?package=GrpcDotNetNamedPipes&version=3.0.0

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

GrpcDotNetNamedPipes

NuGet

Named pipe transport for gRPC in C#/.NET.

This is not an official Google product.

Supported platforms

  • .NET Framework 4.6.2+ (Windows)
  • .NET 6+ (Windows, macOS, Linux)

Usage

Suppose you have a Greeter service as described in the gRPC on .NET Core intro.

Server:

var server = new NamedPipeServer("MY_PIPE_NAME");
Greeter.BindService(server.ServiceBinder, new GreeterService());
server.Start();

Client:

var channel = new NamedPipeChannel(".", "MY_PIPE_NAME");
var client = new Greeter.GreeterClient(channel);

var response = await client.SayHelloAsync(
	new HelloRequest { Name = "World" });

Console.WriteLine(response.Message);

Why named pipes?

Named pipes are suitable for inter-process communication (IPC).

Since the introduction of this project, ASP.NET Core has added support for gRPC over Unix Domain Sockets and over Named Pipes. Here is a handy matrix to help you decide what's right for you:

GrpcDotNetNamedPipes ASP.NET UDS ASP.NET Named Pipes ASP.NET HTTP
.NET Platform .NET Framework 4.6.2<br>.NET 5 .NET 5 .NET 8 (server)<br>.NET 5 (client) .NET 5
OS Windows 7<br>Mac<br>Linux Windows 10<br>Mac<br>Linux Windows 7 Windows 7<br>Mac<br>Linux
No firewall warnings ✔️ ✔️ ✔️
No network adapter ✔️ ✔️ ✔️
Access controls ✔️ ✔️
Binary size (trimmed) ~ 300 KB ~ 7 MB ~ 7 MB ~ 7 MB
Startup time < 25ms < 25ms < 25ms ~ 250ms
Large message throughput ~ 500MB/s ~ 400MB/s ~ 100MB/s ~ 100MB/s
Streaming messages ~ 400k/s ~ 500k/s ~ 500k/s ~ 400k/s
Method calls ~ 8000/s ~ 4000/s ~ 5000/s ~ 2500/s
Compatible with gRPC-Go ✔️ ✔️ ✔️
Official Microsoft support ✔️ ✔️ ✔️

Performance numbers are based on tests running on Windows 11 with .NET 8.

Caveats

This implementation currently uses a custom wire protocol so it won't be compatible with other gRPC named pipe implementations.

Linux and macOS support is provided for universal compatibility but may not be as optimized as Windows.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  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 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. 
.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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (8)

Showing the top 5 NuGet packages that depend on GrpcDotNetNamedPipes:

Package Downloads
XAMLTest

A library that allows unit tests to be written against WPF XAML.

NINA.Equipment

This assembly contains the Equipment components of N.I.N.A. to interact and connect to various types of astronomy equipment.

ITHit.FileSystem.Windows

IT Hit User File System Engine provides a high-level API for creating a virtual file system for Wndows in .NET with synchronization support, on-demand loading, offline files, and Windows Explorer integration. 100% safe, managed code. No unsafe memory management operations. No blue screens. IT Hit User File System provides a file system synchronization framework based on the new Windows 10 Cloud Files API (used in OneDrive). It supports OneDrive-like on-demand loading, selective offline availability, download/upload progress, file system status reporting, and Windows Explorer integration. The library API relies on the newest Windows 10 API specifically designed for creating user file systems with synchronization support. The Engine is using the Microsoft Cloud Files driver supplied with Windows 10, providing unprecedented reliability, deep customization, and development simplicity in C#, VB.NET, or any other .NET language.

ITHit.FileSystem.Windows.Rpc.Proto

Contains RPC protocol, used by the IT Hit User File System Engine in case of out-of-proc or surrogate COM thumbnails handler, context menu, custom state (custom columns) handler, etc.

NAPS2.Sdk

NAPS2.Sdk is a fully-featured scanning library, supporting WIA, TWAIN, SANE, and ESCL scanners on Windows, Mac, and Linux.

GitHub repositories (4)

Showing the top 4 popular GitHub repositories that depend on GrpcDotNetNamedPipes:

Repository Stars
rocksdanister/lively
Free and open-source software that allows users to set animated desktop wallpapers and screensavers powered by WinUI 3.
cyanfish/naps2
Scan documents to PDF and more, as simply as possible.
LAB02-Research/HASS.Agent
Windows-based client for Home Assistant. Provides notifications, quick actions, commands, sensors and more.
dragonfruitnetwork/onionfruit
OnionFruit™ - Connect to the Tor network with minimal effort
Version Downloads Last updated
3.0.0 45,904 12/29/2023
2.1.1 4,019 11/25/2023
2.1.0 28,438 8/6/2023
2.0.0 30,365 11/11/2022
1.4.4 57,202 12/19/2021
1.4.2 64,585 4/11/2021
1.4.1 621 4/11/2021
1.4.0 1,045 4/7/2021
1.3.0 86,788 11/22/2020
1.2.0 743 11/22/2020
1.1.2 5,299 11/22/2020
1.1.1 28,551 5/12/2020
1.1.0 978 3/25/2020
1.0.2 921 1/25/2020
1.0.1 923 1/25/2020