[英]C# Server-Client Application Advise
i want to write a server-client application with C#. 我想用C#编写服务器 - 客户端应用程序。 Server app must send a message or object to client and after this message must trigger some functions in client app. 服务器应用程序必须向客户端发送消息或对象,此消息必须在客户端应用程序中触发某些功能。 What class or tech should i use? 我应该使用什么类或技术? System.Net TcpClient class or .NET Remoting or other technology? System.Net TcpClient类还是.NET Remoting或其他技术? Where should i begin? 我应该从哪里开始? I am beginner at network programming. 我是网络编程的初学者。 Any advise will be helpful. 任何建议都会有所帮助。 Thanks for reading this question and your answers. 感谢您阅读此问题和答案。
If you are specifically dealing with a publish/subscribe scenario, I would advise using ZeromMQ (clrzmq + libzmq). 如果您专门处理发布/订阅方案,我建议使用ZeromMQ (clrzmq + libzmq)。 ZeroMQ is extremely easy to use and very fast. ZeroMQ非常易于使用且速度非常快。 You'll find plenty of C# examples, corresponding to various scenarios on the ZeroMQ site. 你会发现很多C#例子,对应于ZeroMQ网站上的各种场景。 Depending on your specific needs, you can combine ZeroMQ and OpenPGM to do pgm (tcp) or epgm (udp) multicasting. 根据您的特定需求,您可以将ZeroMQ和OpenPGM结合起来进行pgm(tcp)或epgm(udp)多播。
Try figuring out how these chat client/server apps work. 尝试弄清楚这些聊天客户端/服务器应用程序如何工作。 It Will get you thinking in the right direction. 它会让你思考正确的方向。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.