构建客户端服务器应用程序的最佳解决方案

发布于 2024-11-24 18:14:26 字数 331 浏览 3 评论 0原文

我运行并使用 C#,想知道如何创建一个可以交换信息的客户端服务器解决方案。

我创建了一个程序,可以读取数据并将其传输到 USB 设备。 我想要的是创建客户端应用程序,它可以与该服务器应用程序通信,并在有来自 USB 的数据时接收信息,并且可以将数据发送回 USB。 它是一种客户端-服务器解决方案。我支持 WPF 应用程序,并且将来可以创建可以显示 USB 设备状态图标的 www 页面。

问题本质上是应该如何实现? WCF 服务/Web 服务/TCP 堆栈(客户端服务器解决方案)

当涉及 USB 数据时,我需要一个事件触发器,以便客户端不需要一直询问是否有新数据。这可以在网络服务中实现吗?

I run and play with c # and wonder how I can create a client server solution that can exchange information.

I have created a program that reads and transmits data to a USB device.
What I want is to create client applications that can talk to this server application and receive information when there is data from USB and can send back data to the USB.
It is a kind of client-server solution. Where I have support for WPF app, and in the future could create www pages that can display the status icons from the USB device.

The question is in essence how this should be made?
WCF services / web services / TCP Stack (client server solution)

I need an event trigger when it comes USB data so that clients do not need to ask all the time if there is new data. Is this posible in a web service?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你的背包 2024-12-01 18:14:26

问题本质上是应该如何实现? WCF 服务/Web 服务/TCP 堆栈
(客户端服务器解决方案)

取决于。唯一明智的答案是“通过编程”。 Web 服务大多已经过时了(WCF 确实做了他们所做的事情,而且更多 - 旧的 Web 服务实现基本上是一个过时的旧实现。

但除此之外,这完全取决于。我这里有一个应用程序,需要每秒传输 100.000 个数据项,速度为可能 - 没有 Web 服务可以做到这一点,我有一些需要 Web 服务

可能是一个好的开始,但您应该学习所有技术,然后根据明确的需求进行调整。

The question is in essence how this should be made? WCF services / web services / TCP Stack
(client server solution)

Depends. The only sensible answer is "by programming". Web Services are mostly out (WCF does waht they do and more - the old web service implementation is basically an outdated old implementation.

But besides that it totally depends. I have an app here that needs to transport 100.000 data items per econd as fast as possible - no web service could do that. I have some that require web services.

WCF is possibly a good start, but you should learn all the technologies and then coose according to explicit needs.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文