NexNet 0.4.0

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

// Install NexNet as a Cake Tool
#tool nuget:?package=NexNet&version=0.4.0                

This package is the core functionality for NexNet.

NexNet is a .NET real-time asynchronous networking library, providing developers with the capability to seamlessly incorporate server and client bidirectional event-driven functionality into their applications. This framework streamlines the transmission of updates bidirectionally between server-side code and connected clients with resilient communication channels.

Features

  • Automatic reconnection upon timeout or socket losing connection.
  • High performance Socket and Pipeline usage.
  • Multiple transports and easy extensibility.
  • Server ↔ Client communication
    • Cancellable Invocations
    • Streaming byte data via INexusDuplexPipe with built-in congestion control.
    • Streaming classes/structs data via NexusChannel<T>
    • Proxies can return:
      • void for "fire and forget" invocation situations such as notifications.
      • ValueTask whcih waiting for invocation completion.
      • ValueTask<T> which will return a value from the remote invocation method.
  • Server can message multiple connected clients with a single invocation.
  • Automatic reconnection of clients upon timeout or loss of connection.
  • Thorough use of ValueTasks in hot paths for reduced invocation overhead.
  • Ping system to detect timeouts from cline tand server side.
  • No reflection. All hubs and proxies are created by the NexNet.Generator project. This allows for fast execution and easier tracing of bugs.
  • Full asynchronous TPL useage throughout socket reading/writing, processing and execution of invocations and their return values.
  • Minimal external package requirements. MemoryPack

Transports Supported

  • Unix Domain Sockets (UDS)
  • TCP
  • TLS over TCP
  • QUIC (UDP)

Unix Domain Sockets are the most efficient as they encounter the least overhead and is a good candidate for inter process communication.

TCP allows for network and internet communication. Fastest option next to a UDS.

TLS over TCP allows for TLS encryption provided by the SslStream on both the server and client. This is still fast, but not as fast as either prior options as it creates a Socket, wrapped by a Network stream wrapped by a SslStream.

QUIC (UDP) s a UDP protocol which guarantees packet transmission, order and survives a connection IP and port change such as a connection switching from WiFi to celular. It requires the libmsquic library which can be installed on linux/unix based systems via the local app pacakge manager. Ubuntu: sudo apt install libmsquic. Must install the NexNet.Quic Nuget package to add the Quic transport.

Additional transports can be added easily as long as the transports guarantees order and transmission.

Product Compatible and additional computed target framework versions.
.NET 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 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. 
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 NexNet:

Package Downloads
NexNet.Quic

Quic transport protocol for NexNet.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.8.0 198 1/12/2024
0.7.0 126 1/11/2024
0.6.0 233 11/29/2023
0.5.0 193 10/23/2023
0.4.0 165 9/17/2023
0.3.3 165 9/17/2023
0.3.2 165 9/13/2023
0.3.1 169 9/8/2023
0.3.0 162 9/7/2023
0.2.0 192 8/28/2023
0.1.0 165 5/10/2023