{"id":15039294,"url":"https://github.com/jacqueskang/ipcserviceframework","last_synced_at":"2025-04-08T09:09:01.298Z","repository":{"id":28204381,"uuid":"116245385","full_name":"jacqueskang/IpcServiceFramework","owner":"jacqueskang","description":".NET Core Inter-process communication framework","archived":false,"fork":false,"pushed_at":"2022-12-08T08:57:11.000Z","size":343,"stargazers_count":364,"open_issues_count":11,"forks_count":79,"subscribers_count":19,"default_branch":"develop","last_synced_at":"2025-04-08T09:08:48.515Z","etag":null,"topics":["dotnetcore","interprocess-communication","named-pipes","tcp","wcf"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jacqueskang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"jacqueskang","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2018-01-04T10:12:33.000Z","updated_at":"2025-03-09T13:10:04.000Z","dependencies_parsed_at":"2022-07-16T01:16:05.306Z","dependency_job_id":null,"html_url":"https://github.com/jacqueskang/IpcServiceFramework","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacqueskang%2FIpcServiceFramework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacqueskang%2FIpcServiceFramework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacqueskang%2FIpcServiceFramework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacqueskang%2FIpcServiceFramework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jacqueskang","download_url":"https://codeload.github.com/jacqueskang/IpcServiceFramework/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247809964,"owners_count":20999816,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotnetcore","interprocess-communication","named-pipes","tcp","wcf"],"created_at":"2024-09-24T20:42:21.044Z","updated_at":"2025-04-08T09:09:01.262Z","avatar_url":"https://github.com/jacqueskang.png","language":"C#","readme":"| CI build | Stable build |\n|----------|--------------|\n|[![Build Status](https://dev.azure.com/jacques-kang/IpcServiceFramework/_apis/build/status/IpcServiceFramework%20CI?branchName=develop)](https://dev.azure.com/jacques-kang/IpcServiceFramework/_build/latest?definitionId=9\u0026branchName=develop)|[![Build Status](https://dev.azure.com/jacques-kang/IpcServiceFramework/_apis/build/status/IpcServiceFramework?branchName=master)](https://dev.azure.com/jacques-kang/IpcServiceFramework/_build/latest?definitionId=14\u0026branchName=master)|\n\n# IpcServiceFramework\n\nA .NET Core 3.1 based lightweight framework for efficient inter-process communication.\nNamed pipeline and TCP support out-of-the-box, extensible with other protocols.\n\n## NuGet packages\n| Name | Purpose | Status |\n| ---- | ------- | ------ |\n| JKang.IpcServiceFramework.Client.NamedPipe | Client SDK to consume IPC service over Named pipe | [![NuGet version](https://badge.fury.io/nu/JKang.IpcServiceFramework.Client.NamedPipe.svg)](https://badge.fury.io/nu/JKang.IpcServiceFramework.Client.NamedPipe) |\n| JKang.IpcServiceFramework.Client.Tcp | Client SDK to consume IPC service over TCP | [![NuGet version](https://badge.fury.io/nu/JKang.IpcServiceFramework.Client.Tcp.svg)](https://badge.fury.io/nu/JKang.IpcServiceFramework.Client.Tcp) |\n| JKang.IpcServiceFramework.Hosting.NamedPipe | Server SDK to run Named pipe IPC service endpoint | [![NuGet version](https://badge.fury.io/nu/JKang.IpcServiceFramework.Hosting.NamedPipe.svg)](https://badge.fury.io/nu/JKang.IpcServiceFramework.Hosting.NamedPipe) |\n| JKang.IpcServiceFramework.Hosting.Tcp | Server SDK to run TCP IPC service endpoint | [![NuGet version](https://badge.fury.io/nu/JKang.IpcServiceFramework.Hosting.Tcp.svg)](https://badge.fury.io/nu/JKang.IpcServiceFramework.Hosting.Tcp) |\n\n\n## Usage\n\n 1. Create an interface as service contract and package it in an assembly to be referenced by server and client applications, for example:\n\n    ```csharp\n    public interface IInterProcessService\n    {\n        string ReverseString(string input);\n    }\n    ```\n\n 1. Implement the service in server application, for example:\n \n    ```csharp\n    class InterProcessService : IInterProcessService\n    {\n        public string ReverseString(string input)\n        {\n            char[] charArray = input.ToCharArray();\n            Array.Reverse(charArray);\n            return new string(charArray);\n        }\n    }\n    ```\n\n 1. Install the following NuGet packages in server application:\n\n    ```powershell\n    \u003e Install-Package Microsoft.Extensions.Hosting\n    \u003e Install-Package JKang.IpcServiceFramework.Hosting.NamedPipe\n    ```\n\n 1. Register the service implementation and configure IPC endpoint(s):\n\n    ```csharp\n    class Program\n    {\n        public static void Main(string[] args)\n        {\n            CreateHostBuilder(args).Build().Run();\n        }\n\n        public static IHostBuilder CreateHostBuilder(string[] args) =\u003e\n            Host.CreateDefaultBuilder(args)\n                .ConfigureServices(services =\u003e\n                {\n                    services.AddScoped\u003cIInterProcessService, InterProcessService\u003e();\n                })\n                .ConfigureIpcHost(builder =\u003e\n                {\n                    // configure IPC endpoints\n                    builder.AddNamedPipeEndpoint\u003cIInterProcessService\u003e(pipeName: \"pipeinternal\");\n                })\n                .ConfigureLogging(builder =\u003e\n                {\n                    // optionally configure logging\n                    builder.SetMinimumLevel(LogLevel.Information);\n                });\n    }\n    ```\n\n 1. Install the following NuGet package in client application:\n\n    ```powershell\n    \u003e Install-Package JKang.IpcServiceFramework.Client.NamedPipe\n    ```\n\n 1. Invoke the server\n\n    ```csharp\n    // register IPC clients\n    ServiceProvider serviceProvider = new ServiceCollection()\n        .AddNamedPipeIpcClient\u003cIInterProcessService\u003e(\"client1\", pipeName: \"pipeinternal\")\n        .BuildServiceProvider();\n\n    // resolve IPC client factory\n    IIpcClientFactory\u003cIInterProcessService\u003e clientFactory = serviceProvider\n        .GetRequiredService\u003cIIpcClientFactory\u003cIInterProcessService\u003e\u003e();\n\n    // create client\n    IIpcClient\u003cIInterProcessService\u003e client = clientFactory.CreateClient(\"client1\");\n\n    string output = await client.InvokeAsync(x =\u003e x.ReverseString(input));\n    ```\n\n## FAQs\n\n\n","funding_links":["https://github.com/sponsors/jacqueskang"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacqueskang%2Fipcserviceframework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacqueskang%2Fipcserviceframework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacqueskang%2Fipcserviceframework/lists"}