Carubbi.Communication 1.2.2

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

// Install Carubbi.Communication as a Cake Tool
#tool nuget:?package=Carubbi.Communication&version=1.2.2                

Carubbi.Communication

Implementation of named pipes stream to abstract the complexity. Allow you to use inter-process communication in a simple way

1. Server sample:

Echo Service:

public class EchoService : Server<string, string>
{
    public EchoService()
    : base(nameof(EchoService))
    {

    }

    protected override string ProcessRequest(string requestMessage)
    {
        Console.WriteLine($"Message received: {requestMessage}");
        return $"Message sent: {requestMessage}";
    }

    protected override void BeforeStart()
    {
        Console.WriteLine("Server starting...");
    }
}

Server App:

var service = new EchoService();
service.Start();

2. Client Sample

Service Callback:

public class EchoServiceCallback : IObserver<string>
{
   public void OnNext(string value)
   {
       Console.WriteLine(value);
   }

   public void OnError(Exception error)
   {
       Console.WriteLine(error.Message);
   }

   public void OnCompleted()
   {
       Console.WriteLine("Request Completed");
   }
}

Client App:

using (var client = new Client<string, string>("EchoService"))
{
    client.BeforeConnect += (sender, eventArgs) => Console.WriteLine("Connecting...");
    client.AfterEnd += (sender, eventArgs) => Console.WriteLine("Disconected.");
    client.Subscribe(new EchoServiceCallback());
    client.Connect();
   
    Console.WriteLine("Type your message:");
    var message = Console.ReadLine();
    client.SendRequest(new List<string> { message });
} 
Product Compatible and additional computed target framework versions.
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 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.2.2 972 9/7/2018
1.2.1 791 9/5/2018
1.2.0 810 9/5/2018
1.1.4 813 9/5/2018
1.1.3 793 9/5/2018
1.1.2 776 9/5/2018
1.1.1 761 9/5/2018
1.1.0 785 9/4/2018
1.0.0 809 8/21/2018