如何使用 .NET 1.1 实现点对点通信?
我正在从事的项目在 Windows NT 和 Windows XP 计算机上运行,因此在我们能够升级操作系统之前我只能使用 .NET 1.1。该软件分布在计算机网络上,我无权访问服务器。我只被允许访问客户端计算机。该软件包的一部分将同时在两个控制台上运行。一台将作为主设备运行(完成所有工作),一台作为从设备运行(万一主设备出现故障时进行备份)。现在这两个进程需要在网络上找到对方,或者确定另一个进程没有在网络上运行,以确定它将作为主进程还是从进程运行。
我一直在研究 WCF 和 .NET 中的 P2P 机制,结果发现它们是在 .NET 3.0 及更高版本中实现的,因此我无法使用它们。所以我想知道使用 .NET 1.1 框架执行此通信的最佳方法是什么?如果有必要,我可以编组一些本机 Windows DLL 并创建一个包装类,但我希望 v1.1 中有一些东西可以用作纯托管代码。
谢谢!
The project I am working on is running on Windows NT and Windows XP machines so I can only use .NET 1.1 until we are able to upgrade operating systems. The software is distributed on a network of computers and I do not have access to the server. I am only allowed access to the client machines. Part of this software package will be running on two consoles simultaneously. One will run as a master (doing all the work) and one as a slave (backup in case master goes down). Now these two processes need to find each other on the network or determine that the other process is not running on the network to determine if it will be running as master or slave.
I have been looking into WCF and the P2P mechanisms in .NET only to realize they were implemented in .NET 3.0 and forward so I cannot use them. So I was wondering what the best way would be to perform this communication using the .NET 1.1 framework? If necessary I can marshal some native windows DLL's and create a wrapper class, but I was hoping there was something in v1.1 that I could use as pure managed code.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用.Net 远程处理吗? http://msdn.microsoft.com/en-我们/library/kwdt6w2k(v=vs.71).aspx
Can you use .Net Remoting? http://msdn.microsoft.com/en-us/library/kwdt6w2k(v=vs.71).aspx