OutWit.Communication
1.0.0
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
<PackageReference Include="OutWit.Communication" Version="1.0.0" />
paket add OutWit.Communication --version 1.0.0
#r "nuget: OutWit.Communication, 1.0.0"
// 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 | Versions 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. |
-
net5.0
- Castle.Core (>= 5.1.1)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.2)
- Newtonsoft.Json (>= 13.0.3)
- OutWit.Common.MessagePack (>= 1.0.2)
- OutWit.Common.Reflection (>= 1.0.0)
-
net6.0
- Castle.Core (>= 5.1.1)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.2)
- Newtonsoft.Json (>= 13.0.3)
- OutWit.Common.MessagePack (>= 1.0.2)
- OutWit.Common.Reflection (>= 1.0.0)
-
net7.0
- Castle.Core (>= 5.1.1)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.2)
- Newtonsoft.Json (>= 13.0.3)
- OutWit.Common.MessagePack (>= 1.0.2)
- OutWit.Common.Reflection (>= 1.0.0)
-
net8.0
- Castle.Core (>= 5.1.1)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.2)
- Newtonsoft.Json (>= 13.0.3)
- OutWit.Common.MessagePack (>= 1.0.2)
- OutWit.Common.Reflection (>= 1.0.0)
-
net9.0
- Castle.Core (>= 5.1.1)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.2)
- Newtonsoft.Json (>= 13.0.3)
- OutWit.Common.MessagePack (>= 1.0.2)
- OutWit.Common.Reflection (>= 1.0.0)
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.