将SignalR用于桌面应用程序是否正确? [英] Is it correct to use SignalR for desktop applications?

查看:185
本文介绍了将SignalR用于桌面应用程序是否正确?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SignalR是否适合Windows桌面应用程序(winforms / wpf)?

Is SignalR suitable for windows desktop applications (winforms/wpf)?

将SignalR与Windows桌面应用程序一起使用有什么优缺点?

What are the advantages and disadvantages using SignalR with windows desktop applications?

是否有性能方面的考虑?

Are there any performance considerations?

我想在服务器与许多客户端之间建立实时连接。连接将保持不变。

I want to make real-time connections between server and a lot of clients. The connections will be constant.

推荐答案


SignalR是否适用于Windows桌面应用程序(winforms / wpf) ?

Is SignalR suitable for windows desktop applications (winforms/wpf)?

signalr.net的答案是:


SignalR可用于向ASP.NET应用程序添加任何类型的实时 Web功能。 。

SignalR can be used to add any sort of "real-time" web functionality to your ASP.NET application.

(正如其他人正确指出的那样,它可以是自托管的,因此不需要IIS

(As stated correctly by others it can be self-hosted, so no need for IIS)

所以答案似乎是。它是服务器端API。但是今天是您的幸运之日,因为下载SignalR不仅显示服务器端API,而且还揭示了名为 Microsoft.AspNet.SignalR.Client45 的客户端API。在您的应用程序中使用。它适用于WPF,WF甚至控制台应用程序。

So the answer seems to be no. It is a server side API. But today is your lucky day, since the download of SignalR doesn't only reveal the server side API, but also a client side API called Microsoft.AspNet.SignalR.Client45 to use in your application. It works for WPF, WF or even console applications.

即使不是,SignalR也只是 WebSockets协议,它是HTTP协议的一部分,几乎可以在任何平台上使用。该下载还包含一个适用于iOS和Xamarin的示例。

And even if it didn't, SignalR is just a wrapper around the WebSockets protocol, which is part of the HTTP protocol, which can be used on virtually any platform. The download also contains a sample for iOS and Xamarin for example.


在Windows桌面应用程序中使用SignalR有什么优点和缺点?

What are the advantages and disadvantages using SignalR with windows desktop applications?

具有往返服务器的实时通知。

To have real-time notifications from and to the server.


是否存在性能问题?

Is there any performance problems?

这是一个很难回答的问题,因为没有参考点。相比什么表现是好是坏?一般来说,我认为您不必为此担心很多。该API本身速度很快,并且可以防止您需要执行其他操作时缓慢的请求请求。

That is a hard question to answer, since there is no reference point. Compared to what the performance is good or bad? Generally spoken, I don't think you have to worry to much about that. The API itself is fast, and it may prevent slow pull-requests you need to do else.

这篇关于将SignalR用于桌面应用程序是否正确?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆