OutWit.Communication 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package OutWit.Communication --version 1.0.0                
NuGet\Install-Package OutWit.Communication -Version 1.0.0                
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="OutWit.Communication" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add OutWit.Communication --version 1.0.0                
#r "nuget: OutWit.Communication, 1.0.0"                
#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 OutWit.Communication as a Cake Addin
#addin nuget:?package=OutWit.Communication&version=1.0.0

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

WitCom

WitCom is a modern API for client-server communication designed to simplify development and provide a robust, extensible framework. It offers a seamless way to handle real-time and event-driven interactions with minimal setup, acting as a powerful alternative to traditional frameworks like WCF and SignalR.

Features

  • Dynamic Proxy Mechanism: Client-side proxies mirror server interfaces, enabling natural interaction with server-side objects via method calls, property access, and event subscriptions.
  • Multiple Transport Options:
    • Memory-Mapped Files
    • Named Pipes
    • TCP
    • WebSocket
    • REST
  • Security:
    • End-to-end encryption (AES/RSA)
    • Token-based authorization
  • Serialization:
    • JSON (default)
    • MessagePack (for high performance and compact payloads)
  • Cross-Platform Support: Works across all .NET-supported platforms.
  • Extensibility: Default implementations for serialization, encryption, and authorization can be replaced with custom ones.

Getting Started

Installation

Add server transport to server project via NuGet:

Install-Package OutWit.Communication.Server.MMF

or

Install-Package OutWit.Communication.Server.Pipes

or

Install-Package OutWit.Communication.Server.Tcp

or

Install-Package OutWit.Communication.Server.WebSocket

or

Install-Package OutWit.Communication.Server.Rest

Add client transport to client project via NuGet:

Install-Package OutWit.Communication.Client.MMF

or

Install-Package OutWit.Communication.Client.Pipes

or

Install-Package OutWit.Communication.Client.Tcp

or

Install-Package OutWit.Communication.Client.WebSocket

Defining an Interface

public interface IExampleService
{
    event Action ProcessingStarted;
    event Action<double> ProgressChanged;
    event Action<string> ProcessingCompleted;

    bool StartProcessing();
    void StopProcessing();
}

Implementing the Service

public class ExampleService : IExampleService
{
    public event Action ProcessingStarted = delegate { };
    public event Action<double> ProgressChanged = delegate { };
    public event Action<string> ProcessingCompleted = delegate { };

    public bool StartProcessing()
    {
        // Implementation logic
        ProcessingStarted();
        return true;
    }

    public void StopProcessing()
    {
        // Stop logic
    }
}

Setting Up the Server

var server = WitComServerBuilder.Build(options =>
{
    options.WithService(new ExampleService());
    options.WithWebSocket("http://localhost:5000", 10);
    options.WithJson();
    options.WithEncryption();
});

server.StartWaitingForConnection();

Connecting the Client

var client = WitComClientBuilder.Build(options =>
{
    options.WithWebSocket("ws://localhost:5000");
    options.WithJson();
    options.WithEncryption();
});

await client.ConnectAsync(TimeSpan.FromSeconds(5), CancellationToken.None);
var service = client.GetService<IExampleService>();

service.ProcessingStarted += () => Console.WriteLine("Processing Started");
service.ProgressChanged += progress => Console.WriteLine($"Progress: {progress}%");
service.ProcessingCompleted += result => Console.WriteLine($"Processing Completed: {result}");

service.StartProcessing();

More Info

For more info visit the ratner.io.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  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 is compatible.  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 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.  net9.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on OutWit.Communication:

Package Downloads
OutWit.Communication.Client

Base client logic for WitCom - OutWit.Communication - the easiest and most natural way to communicate with .Net processes/services/clients.

OutWit.Communication.Server

Base server logic for WitCom - OutWit.Communication - the easiest and most natural way to communicate with .Net processes/services/clients.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.2 192 2/1/2025
1.1.1 161 1/25/2025
1.0.2 191 1/11/2025
1.0.0 224 1/2/2025