Ipc.Connect 1.0.6

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

// Install Ipc.Connect as a Cake Tool
#tool nuget:?package=Ipc.Connect&version=1.0.6                

Ipc.Connect

Nuget GitHub GitHub top language

A cross-platform shared memory Client/Server Implementation

The main idea of this library is to have an easy to use IPC (Interprocess Communication) library which you can use as any other client / server library.

How to use

Create a Server

  // Create a new ChannelFactory. The Settings of this Factory should be same on Client and Server 
  IpcChannelFactory channelFactory = new IpcChannelFactory();
  
  // Create the Server
  IpcServer server = new IpcServer(channelFactory);
  server.Listen("MyChannelName", new IpcServerRequestHandlerDelegate((reqestStream) => {
    // handle the request here
  
    // Return Result
    return new IpcDataEmpty(); 
  }));
  

Connect to the Server

  // Create a new ChannelFactory. The Settings of this Factory should be same on Client and Server 
  IpcChannelFactory channelFactory = new IpcChannelFactory();
  
  // Create the Client
  IpcClient client = new IpcClient(channelFactory, "MyChannelName")
  using (Stream responseStream = client.Send(new IpcDataBytes(Encoding.UTF8.GetBytes("Hello World")), TimeSpan.FromSeconds(2)))
  {
      // Process the response
  }
  

For more example you can also check the Tests

Performance

The system is designed for high performance. This means the comunication has very low overhead and high bandwidth.

Method Time (ms) Comment
Execute 100000 Small Request 2400 (For one Request 24 ns) or (41666 Requests per second)
Send 10 GB Data 1700 Bandwidth 47 Gbit/s
Retrieve 10 GB Data 1700 Bandwidth 47 Gbit/s

Times are measured on an Intel i7-9750H (2.6 GHz), 16 GB Memory and Windows 11

Dependencies

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. 
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
1.0.6 143 2/26/2024
1.0.5 190 12/31/2023
1.0.4 487 3/13/2022
1.0.3 415 3/13/2022
1.0.2 438 3/13/2022
1.0.1 437 3/12/2022