简体   繁体   English

是否可以在 Node.js 后端使用 SignalR?

[英]Is it possible to use SignalR on a Node.js backend?

I'm aware that the library @microsoft/signalr can be used on the client-side to connect with a SignalR hub, but is it possible to integrate SignalR in a node server?我知道库@microsoft/signalr可以在客户端用于连接 SignalR 集线器,但是否可以将 SignalR 集成到节点服务器中? We're trying to implement a chat system using SignalR with React Native as the client but we can't figure out how to integrate it into Node or is it just meant to be used with the ASP.NET server?我们正在尝试使用 SignalR 和 React Native 作为客户端来实现一个聊天系统,但我们不知道如何将它集成到 Node 中,或者它只是为了与 ASP.NET 服务器一起使用?

The SignalR server must be hosted in a .NET application, because it is implemented as a .NET Class Library. SignalR 服务器必须托管在 .NET 应用程序中,因为它是作为 .NET 类库实现的。 SignalR clients are available for many languages/platforms, including JavaScript and Node. SignalR 客户端可用于多种语言/平台,包括 JavaScript 和 Node.js。

If you want to do real time communications or two way communication using Node as the server, you'll need to look into other options.如果您想使用 Node 作为服务器进行实时通信或双向通信,则需要研究其他选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM