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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Ipc.Connect
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 | Versions 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.
-
net8.0
- Cloudtoid.Interprocess (>= 1.0.175)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.