SoM.Ipc 0.5.2-pre

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

SoM.Ipc

An Net API style Ipc abstraction independent of used framework ( WatsonTcp, SignalR, other )

A library that allows quick setup of Ipc ( [ Inter | Remote ]-Process-Communication) between .Net Core/Core or Core/Framework apps with minimal boilerplate. Abstracts IPC in a way that allows trivial changes of underling communication framework ( SignalR, WatsonTcp, RabbitMq, etc) without changes to methods that actually handle the incoming events/requests. . We use it to migrate existing services from Net Framework to .Net with WatsonTcp being a commonly supported step framework along the way. Uploaded to NuGet for convenience of use.

Features:

  • Supports Events ( one way send ) ot Requests ( needs a response ) between clients/server ( both ways )
  • Follows ASP.Net Api style ( Use attributes to mark a class as an IPC controller and a method as end an endpoint handler )
  • Monitors connection with periodic pings and Auto-reconnects
  • Serializes dto's to json with short type discriminators

Server usage

Register with Dependency Injection in program.cs:

    
    var builder = Host.CreateApplicationBuilder(args);
     …

    builder.Services.AddKeyedSoMIpcWatsonTcpService("MyIpc1",
        (options) =>
        {
            options.Uri = "127.0.0.1:50543";
        });
     …

or use appsettings.json

  "MyIpc1": {
    "Uri": "10.0.0.100:50543"
  },

with

    # builder.Services.AddKeyedSoMIpcWatsonTcpService("MyIpc1")

Server

    IpcServices _ipc;  // DI injected
    var srv = _ipc.Get("MyIpc1");  // <- get server instance
   
   …
   
   /* send event to all connected clients */
    srv.SendEventAsync( new MyIpc1.DemoIpcA() { Endpoint = "foo.evtA") });

BoilerPlate that IS required

/* server side */

 [SoMEndpointController]  // <-- mark class as containing endpoint handlers ( speeds up finding handler methods on startup )
 class Controller {
    … 
    /* receive a one-way event from the client */
    [SoMEndpoint("foo.evtA")]  // <- client specified foo.evtA as endpoint for the 
    public void OnAReceived(DemoIpcA msg, IpcMetadata src)
    {
      Console.WriteLine($"Got A = {msg.PropA}");
    }
    … 
  }

/* Dto objects ( inherited from SoMIpcMessage )

  /// <summary>
  /// Create a Message Dto ( DataTransferObject) type to send to and from server. 
  /// Mark it as Dto and serializable by adding SoMIpc attribute with unique string discriminator  
  /// </summary>
  [SoMIpc("nov.A")]    
  public class DemoIpcA : SoMIpcMessage
  {
      public string PropA { get; set; }
  }

client usage

 /* client side call to server */


  IpcClient<WatsonTcpClientConnector> _ipc = new IpcClient<FrWatsonTcp>( optionalILogger);

  _ipc.Connect(new HubConnectionOptions() {
            Server = "127.0.0.1",
            Port = 50543,
  });

   … 
   /* invoke server method marked as eventhandler for "foo.evtA" , passing it our Dto  */
   await _ipc.SendEventAsync(new MyIpc1.DemoIpcA() { Endpoint = "foo.evtA", PropA = "FooFeeFiFoFum" }, _cts.Token);

Examples

There are minimal sample apps: Server ( .Net/Console ), Client ( Winforms/.Net Framework ) and common class library with Dto's in the Examples folder

Project Git Page

https://github.com/jmarczewski/SoM.Ipc.git

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on SoM.Ipc:

Package Downloads
SoM.WatsonTcp

WatsonTcp connector for use with the SoM.Ipc library.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.5.2-pre 85 5/6/2026
0.5.1-pre 68 5/4/2026
0.5.0-pre 74 4/29/2026

Added convinience