JKang.IpcServiceFramework.Server
1.0.2
A lightweight .NET Core inter-process communication framework allowing invoking a service via named pipeline in a similar way as WCF.
This package is for server hosting.
See the version list below for details.
Install-Package JKang.IpcServiceFramework.Server -Version 1.0.2
dotnet add package JKang.IpcServiceFramework.Server --version 1.0.2
<PackageReference Include="JKang.IpcServiceFramework.Server" Version="1.0.2" />
paket add JKang.IpcServiceFramework.Server --version 1.0.2
#r "nuget: JKang.IpcServiceFramework.Server, 1.0.2"
// Install JKang.IpcServiceFramework.Server as a Cake Addin
#addin nuget:?package=JKang.IpcServiceFramework.Server&version=1.0.2
// Install JKang.IpcServiceFramework.Server as a Cake Tool
#tool nuget:?package=JKang.IpcServiceFramework.Server&version=1.0.2
IpcServiceFramework
A .NET Core lightweight inter-process communication framework allowing invoking a service via named pipeline (in a similar way as WCF, which is currently unavailable for .NET Core).
Support using primitive or complexe types in service contract.
Support multi-threading on server side with configurable number of threads.
ASP.NET Core Dependency Injection framework friendly.
Usage
- Create an interface as service contract and package it in an assembly to be shared between server and client.
- Implement the service and host it in an console or web applciation
- Invoke the service with framework provided proxy client
Downloads
IpcServiceFramework is available via NuGet:
Quick Start:
Step 1 - Create service contract
public interface IComputingService
{
float AddFloat(float x, float y);
}
Step 2: Implement the service
class ComputingService : IComputingService
{
public float AddFloat(float x, float y)
{
return x + y;
}
}
Step 3 - Host the service in Console application
class Program
{
static void Main(string[] args)
{
// configure DI
IServiceCollection services = ConfigureServices(new ServiceCollection());
// run IPC service host
IpcServiceHostBuilder
.Buid("pipeName", services.BuildServiceProvider())
.Run();
}
private static IServiceCollection ConfigureServices(IServiceCollection services)
{
return services
.AddIpc(options =>
{
options.ThreadCount = 4;
})
.AddService<IComputingService, ComputingService>();
}
}
It's possible to host IPC service in web application, please check out the sample project IpcServiceSample.WebServer
Step 4 - Invoke the service from client process
var proxy = new IpcServiceClient<IComputingService>("pipeName");
float result = await proxy.InvokeAsync(x => x.AddFloat(1.23f, 4.56f));
Please feel free to download, fork and/or provide any feedback!
IpcServiceFramework
A .NET Core lightweight inter-process communication framework allowing invoking a service via named pipeline (in a similar way as WCF, which is currently unavailable for .NET Core).
Support using primitive or complexe types in service contract.
Support multi-threading on server side with configurable number of threads.
ASP.NET Core Dependency Injection framework friendly.
Usage
- Create an interface as service contract and package it in an assembly to be shared between server and client.
- Implement the service and host it in an console or web applciation
- Invoke the service with framework provided proxy client
Downloads
IpcServiceFramework is available via NuGet:
Quick Start:
Step 1 - Create service contract
public interface IComputingService
{
float AddFloat(float x, float y);
}
Step 2: Implement the service
class ComputingService : IComputingService
{
public float AddFloat(float x, float y)
{
return x + y;
}
}
Step 3 - Host the service in Console application
class Program
{
static void Main(string[] args)
{
// configure DI
IServiceCollection services = ConfigureServices(new ServiceCollection());
// run IPC service host
IpcServiceHostBuilder
.Buid("pipeName", services.BuildServiceProvider())
.Run();
}
private static IServiceCollection ConfigureServices(IServiceCollection services)
{
return services
.AddIpc(options =>
{
options.ThreadCount = 4;
})
.AddService<IComputingService, ComputingService>();
}
}
It's possible to host IPC service in web application, please check out the sample project IpcServiceSample.WebServer
Step 4 - Invoke the service from client process
var proxy = new IpcServiceClient<IComputingService>("pipeName");
float result = await proxy.InvokeAsync(x => x.AddFloat(1.23f, 4.56f));
Please feel free to download, fork and/or provide any feedback!
Release Notes
1.0.2
- support implicitly converting input parameters from derived type to base type
1.0.1
- support passing array parameters
Dependencies
-
.NETStandard 2.0
- JKang.IpcServiceFramework.Core (>= 1.0.2)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 2.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 2.0.0)
Used By
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on JKang.IpcServiceFramework.Server:
Repository | Stars |
---|---|
FubarDevelopment/FtpServer
Portable FTP server written in .NET
|
|
kennyvv/Alex
A Minecraft client written in C# aimed at compatibility with MC:Java & MC:Bedrock
|
Version History
Version | Downloads | Last updated |
---|---|---|
2.3.1 | 6,310 | 12/27/2019 |
2.3.0 | 212 | 12/20/2019 |
2.2.2 | 5,120 | 4/30/2019 |
2.2.1 | 2,314 | 3/28/2019 |
2.2.0 | 2,240 | 12/18/2018 |
2.1.2 | 945 | 12/11/2018 |
2.1.1 | 405 | 11/20/2018 |
2.1.0 | 372 | 11/19/2018 |
2.0.3 | 350 | 11/16/2018 |
2.0.2 | 348 | 11/14/2018 |
2.0.1.1 | 904 | 10/29/2018 |
2.0.0.2 | 694 | 7/16/2018 |
1.0.4.3 | 464 | 7/13/2018 |
1.0.3 | 485 | 6/30/2018 |
1.0.2 | 431 | 5/30/2018 |
1.0.1 | 1,186 | 2/14/2018 |
1.0.0 | 606 | 1/9/2018 |