DH.NRemoting 4.18.2026.210

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package DH.NRemoting --version 4.18.2026.210
                    
NuGet\Install-Package DH.NRemoting -Version 4.18.2026.210
                    
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" Version="4.18.2026.210" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DH.NRemoting" Version="4.18.2026.210" />
                    
Directory.Packages.props
<PackageReference Include="DH.NRemoting" />
                    
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 --version 4.18.2026.210
                    
#r "nuget: DH.NRemoting, 4.18.2026.210"
                    
#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@4.18.2026.210
                    
#: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&version=4.18.2026.210
                    
Install as a Cake Addin
#tool nuget:?package=DH.NRemoting&version=4.18.2026.210
                    
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 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.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on DH.NRemoting:

Package Downloads
DH.NStardust

星尘分布式服务框架核心库。提供配置中心、注册中心、服务发现、全链路追踪、APM性能监控、日志中心等客户端SDK,支持配置拉取、服务注册与发现、调用追踪、性能和日志上报。

DH.NMQTT

纯国产自主MQTT 3.1/3.1.1/5.0完整协议实现,MqttClient客户端与MqttServer服务端一体化。六种传输TCP/TLS/WebSocket/WSS/QUIC/UDP;内置集群、桥接、规则引擎、WebHook、ACL、$SYS等企业功能免费;零第三方依赖,MIT开源,信创合规

DH.NRemoting.Extensions

提供设备接入控制器、令牌服务与会话管理扩展

DH.NAntJob

分布式任务调度系统,纯NET打造的重量级大数据实时计算平台,万亿级调度经验积累。

DH.NMQ

轻量级消息队列,无延迟分发,支持消费组和消息去重,不支持集群部署

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.21.2026.305-beta0814 449 3/5/2026
4.21.2026.305-beta0807 98 3/5/2026
4.21.2026.305-beta0805 99 3/5/2026
4.21.2026.305-beta0803 101 3/5/2026
4.21.2026.305-beta0759 108 3/5/2026
4.21.2026.305-beta0758 100 3/5/2026
4.18.2026.301-beta0417 402 3/1/2026
4.18.2026.301-beta0414 103 3/1/2026
4.18.2026.301-beta0347 104 3/1/2026
4.18.2026.225-beta1153 388 2/25/2026
4.18.2026.210 790 2/10/2026
4.18.2026.210-beta0829 121 2/10/2026
4.17.2026.130-beta0826 1,587 1/30/2026
4.17.2026.130-beta0823 116 1/30/2026
4.17.2026.130-beta0817 114 1/30/2026
4.17.2026.122-beta0845 471 1/22/2026
4.17.2026.122-beta0804 156 1/22/2026
4.17.2026.122-beta0726 121 1/22/2026
4.17.2026.122-beta0358 159 1/22/2026
4.17.2026.121-beta1147 250 1/21/2026
Loading failed

ApiServer支持动态端口分配;修正证书密钥赋值错误;优化OAuth异常处理;增强HttpMessage解析兼容性;提升单元测试稳定性