SimplePipe 1.1.2

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

SimplePipe

Simple Pipe is a small convenience wrapper for .NET's 'AnonymousPipeServerStream' and 'AnonymousPipeClientStream' classes. As it uses anonymous pipes, it can not do Network IPC and is intended for local use.

How to use

  1. Create an instance of the 'LocalServer' class.
  2. With that instance, you need to get hold of the pipe handles to instatiate the 'LocalClient' class, using the 'GetPipeHandles' method.
  3. Pass the pipe handles to the 'LocalClient' instance.
  4. Use the 'DisposeLocalCopyOfClientHandle' method in the instance of 'LocalServer' once the 'LocalClient' instance has created the pipes with the handles.

NOTE: Dispoing of the handles in the server is necessary for IPC. If you, for some reason, use server and client in the same program, you do not want to call 'DisposeLocalCopyOfClientHandle' on the server instance as it will throw an exception when you try to use sever and client. Disposing of the handles to early might cause problems, so you need to make sure you check if it safe to do so. A safe bet is to do so when the connection was established. As the server lives in another program, it is not possible to do it automatically

  1. Call 'Listen' method on each instances, or only one if you do not need to listen on both. Consider wrapping that call in a 'Task.Run(instance.Listen)' to make it run async.
  2. Call 'Write' method to write to the other side.
  3. Any messages received by either side will trigger a 'NewMessage' event on the respective side. In the server, the event data is a 'ClientMessage' instance, in the client it is a 'ServerMessage' instance.

V 1.1.0

Added the necessity to include a message type integer in the message. The first 6 characters of the message will be parsed as int. Their values can be found in the 'MessageType' property in the instances of 'ServerMessage' and 'ClientMessage'.

Product Compatible and additional computed target framework versions.
.NET 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 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.  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.
  • net8.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
1.1.2 112 5/23/2025
1.1.1 113 5/23/2025
1.1.0 112 5/23/2025
1.0.0 141 5/22/2025