可用的中继 APIAvailable Relay APIs

运行时 APIRuntime APIs

下表列出了当前可用的所有中继运行时客户端。The following table lists all currently available Relay runtime clients.

其他信息部分包含有关每个运行时库状态的详细信息。The additional information section contains more information about the status of each runtime library.

语言/平台Language/Platform 可用功能Available feature 客户端程序包Client package 存储库Repository
.NET Standard.NET Standard 混合连接Hybrid Connections Microsoft.Azure.RelayMicrosoft.Azure.Relay GitHubGitHub
.NET framework.NET Framework WCF 中继WCF Relay WindowsAzure.ServiceBusWindowsAzure.ServiceBus 不适用N/A
节点Node 混合连接Hybrid Connections Websocket:hyco-wsWebsockets: hyco-ws
Websocket:hyco-websocketWebsockets: hyco-websocket
HTTP 请求:hyco-httpsHTTP Requests: hyco-https
GitHubGitHub

其他信息Additional information

.NET.NET

.NET 生态系统具有多个运行时,因此中继有多个 .NET 库。The .NET ecosystem has multiple runtimes, hence there are multiple .NET libraries for the Relay. 可以使用 .NET Core 或 .NET Framework 运行 .NET Standard 库,但 .NET Framework 库只能在 .NET Framework 环境中运行。The .NET Standard library can be run using either .NET Core or the .NET Framework, while the .NET Framework library can only be run in a .NET Framework environment.

.NET Framework 库仅支持 WCF 编程模型并依赖于基于 WCF net.tcp 传输的专有二进制协议。The .NET Framework library only supports the WCF programming model and relies on a proprietary binary protocol based on the WCF net.tcp transport. 保留此协议和库是为了实现与现有应用程序的后向兼容性。This protocol and library is maintained for backwards compatibility with existing applications.

.NET Standard 库基于混合连接中继的开放协议定义,该中继以 HTTP 和 WebSocket 为基础。The .NET Standard library is based on the open protocol definition for the Hybrid Connections Relay that builds on HTTP and WebSockets. 该库支持通过 Websocket 进行流抽象和用于答复 HTTP 请求的简单请求-响应 API 手势。The library supports a stream abstraction over Websockets and a simple request-response API gesture for answering HTTP requests. Web API 示例展示了如何将混合连接与适用于 Web 服务的 ASP.NET Core 进行集成。The Web API sample shows how to integrate Hybrid Connections with ASP.NET Core for web services.

Node.jsNode.js

上表中列出的混合连接模块使用在 Azure 中继服务上而非在本地网络堆栈上进行侦听的备用实现替代或修正了现有 Node.js 模块。The Hybrid Connections modules listed in the table above replace or amend existing Node.js modules with alternative implementations that listen on the Azure Relay service instead of the local networking stack.

hyco-https 模块修正并部分替代了核心 Node.js 模块 httphttps,提供了一个与依赖于这些核心模块的许多现有 Node.js 模块和应用程序兼容的 HTTPS 侦听器实现。The hyco-https module amends and partially overrides the core Node.js modules http and https, providing a HTTPS listener implementation that is compatible with many existing Node.js modules and applications that rely on these core modules.

hyco-wshyco-websocket 模块修正了 Node.js 的常用 wswebsocket 模块,提供了备用侦听器实现,这些实现使得依赖于上述任一模块的模块和应用程序能够在混合连接中继后面工作。The hyco-ws and hyco-websocket modules amend the popular ws and websocket modules for Node.js, providing alternate listener implementations that enable modules and applications relying on either module to work behind the Hybrid Connections Relay.

可在 azure-relay-node GitHub 存储库中找到有关这些模块的详细信息。Details about those modules can be found in the azure-relay-node GitHub repository.

后续步骤Next steps

若要了解有关 Azure 中继的详细信息,请访问以下链接:To learn more about Azure Relay, visit these links: