Nachonet.Common.Communication
10.0.0.9
dotnet add package Nachonet.Common.Communication --version 10.0.0.9
NuGet\Install-Package Nachonet.Common.Communication -Version 10.0.0.9
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="Nachonet.Common.Communication" Version="10.0.0.9" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nachonet.Common.Communication" Version="10.0.0.9" />
<PackageReference Include="Nachonet.Common.Communication" />
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 Nachonet.Common.Communication --version 10.0.0.9
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Nachonet.Common.Communication, 10.0.0.9"
#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 Nachonet.Common.Communication@10.0.0.9
#: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=Nachonet.Common.Communication&version=10.0.0.9
#tool nuget:?package=Nachonet.Common.Communication&version=10.0.0.9
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
This library allows for 2-ways communication between a client and server. It is designed to maintain a permanant link to the server for the lifetime of the client. It supports the following transport mechanisms:
- TCP - client connects to a server using unencrypted TCP packets
- TLS - client connects to a server using encrypted TCP packets) - server requires a certificate
- WS - client connects to a server using http websockets
- WSS - client connects to a server using https websockets) - server requires a certificate
The library supports the following types of messages:
- Request - a message that expects a response
- Reply - a response to a request
- ErrorReply - an error reply to a request (contains the exception that occurred on the server)
- Event - an unsolicited event
- Ping/Pong - keep alive messages automatically sent if the connection is idle
Other Features:
- automatic reconnection. A client will attempt to reconnect if disconnected from a server
- Multiple servers. A client can attempt to connect to servers in a round-robin fashion until it connects
- Strongly typed requests and replies. Replies are serialized into the correct type for the end-user
- This library doesn't nativly provide authorisation; however for TLS or WSS you can extend the library via configuration to provide/require a specific client certificate and expect a specific server certificate. For WSS you can also add extra HTTP headers (i.e. X-API-KEY, or Authorization).
Limitations and notes:
- For websockets the maximum message size is approx 20MB. Larger messages will disconnect the link
- Websocket servers are expected to use ASP Net core to host and accept the websocket
- This library makes heavy use of async/await patterns. The end user must be careful not to block in callbacks or events as they might block the reader from running. Be particularly careful with Console.ReadLine() in test apps.
- The library uses System.Text.Json to serialise messages into a text format; thus messages must be in a format that supports serialisation.
Other notes:
- I'd love to eventually provide a javascript implementation of the client so that webpages can directly connect using this protocol
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.7)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.