DH.NRemoting.Extensions 4.24.2026.714-beta1306

This is a prerelease version of DH.NRemoting.Extensions.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package DH.NRemoting.Extensions --version 4.24.2026.714-beta1306
                    
NuGet\Install-Package DH.NRemoting.Extensions -Version 4.24.2026.714-beta1306
                    
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="DH.NRemoting.Extensions" Version="4.24.2026.714-beta1306" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DH.NRemoting.Extensions" Version="4.24.2026.714-beta1306" />
                    
Directory.Packages.props
<PackageReference Include="DH.NRemoting.Extensions" />
                    
Project file
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 DH.NRemoting.Extensions --version 4.24.2026.714-beta1306
                    
#r "nuget: DH.NRemoting.Extensions, 4.24.2026.714-beta1306"
                    
#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 DH.NRemoting.Extensions@4.24.2026.714-beta1306
                    
#: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=DH.NRemoting.Extensions&version=4.24.2026.714-beta1306&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=DH.NRemoting.Extensions&version=4.24.2026.714-beta1306&prerelease
                    
Install as a Cake Tool

DH.NRemoting - 协议通信库

协议通信库,包含RPC架构和HTTP架构,提供客户端服务端通信的基础框架,内置SRMP协议实现,并支持实现各种自定义协议。

参考目录:

RPC架构

客户端:ApiClient

服务端:ApiServer

应用客户端:ClientBase

特点:

  1. 服务端根据Action把请求转发给各个Controller,用法跟WebApi一致。
  2. 简单高性能,通信报文使用二进制序列化,中间没有任何损耗
  3. 接口出入参支持灵活的Json序列化(常规接口),同时也支持高效的二进制序列化(图片视频)
  4. TCP/UDP长会话,支持服务端主动下发消息
  5. 典型连接数,单机1万TCP长连接,最高400万
  6. 典型吞吐数,单机10万TPS,最高2266万TPS
  7. 服务端可寄宿于控制台、Web项目、桌面应用、IoT嵌入式应用
  8. 支持集群部署横向扩展,每个客户端跟其中一个服务端维持长连接,所有请求落到该服务器

代表性应用(蚂蚁调度AntJob):

  1. 客户端AntClient继承自ClientBase,通过Tcp/Udp等协议连接服务端ApiServer,进行登录、心跳等操作。
  2. 客户端使用应用AppId和AppSecret登录,获得令牌,后续无需携带或验证令牌,直到令牌过期重新登录。

HTTP架构

客户端:ApiHttpClient

服务端:ASP.NET WebApi

应用客户端:ClientBase

应用服务端:BaseDeviceController

特点:

  1. 标准ASP.NET WebApi作为服务端,重用现有技术栈,包括接口测试和集群部署管理。
  2. 客户端ApiHttpClient是标准HttpClient的进一步封装,支持多服务端地址负载均衡。
  3. 默认通信使用Json序列化,不适合传输文件、图片和视频等二进制数据。
  4. 服务端提供BaseController基类,封装了令牌验证等鉴权机制
  5. 服务端提供BaseDeviceController基类,封装常见的登录、心跳和更新等接口
  6. 通过WebSocket长连接实现指令下发,心跳保活
  7. 典型连接数,单机1000并发连接
  8. 典型吞吐数,单机1万TPS
  9. 服务端仅寄宿于 Kestrel和IIS
  10. 支持集群部署横向扩展,客户端每次请求都可能分流到不同应用服务器

代表性应用(轻量级IoT平台ZeroIoT):

  1. 客户端HttpDevice继承自ClientBase,通过Http/Https协议连接服务端WebApi,进行登录、注销、心跳和更新等操作。
  2. 客户端使用设备DeviceCode和DeviceSecret登录,获得令牌,后续每次请求头都需要带上令牌。
  3. 在心跳时检测并维持WebSocket长连接。

各项目默认支持net9.0/netstandard2.1/netstandard2.0/net4.5

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

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
4.25.2026.906-beta0855 118 9/6/2026
4.25.2026.906-beta0853 104 9/6/2026
4.25.2026.828-beta0929 96 8/28/2026
4.24.2026.828-beta0924 101 8/28/2026
4.24.2026.828-beta0921 90 8/28/2026
4.24.2026.828-beta0919 96 8/28/2026
4.24.2026.828-beta0917 98 8/28/2026
4.24.2026.828-beta0857 93 8/28/2026
4.24.2026.828-beta0852 88 8/28/2026
4.24.2026.828-beta0851 92 8/28/2026
4.24.2026.828-beta0850 90 8/28/2026
4.24.2026.828-beta0847 92 8/28/2026
4.24.2026.828-beta0828 136 8/28/2026
4.24.2026.828-beta0714 106 8/28/2026
4.24.2026.714-beta1306 112 7/14/2026
4.24.2026.714-beta1304 112 7/14/2026
4.24.2026.713-beta1700 111 7/13/2026
4.24.2026.713-beta1637 111 7/13/2026
4.24.2026.713-beta1626 106 7/13/2026
4.18.2026.210 173 2/10/2026
Loading failed

新增 Server-Streaming 流式调用与元数据透传,提升大规模数据推送效率;重构指令下发架构,支持响应总线与同步等待机制;支持 SSE 通道自动降级推送与 WebSocket 积压命令推送,增强推送兼容性;增强自动更新机制,支持冒烟测试、回滚与 Linux 兼容性;精简命令模型,移除持久化与重试实现,降低复杂度;修复设备控制器异常处理,优化客户端健壮性