简体   繁体   English

C#中的LAN进程间通信?

[英]LAN inter-process communication in C#?

What's the easiest way to implement lan interprocess communication? 实现lan进程间通信的最简单方法是什么? I need process on machine A be blocked until process on machine B send him just a simple string msg 我需要机器A上的进程被阻塞,直到机器B上的进程发送给他一个简单的字符串msg

Don't know if it is worth building a whole WCF project. 不知道是否值得建立一个完整的WCF项目。

What Do you say? 你说什么?

Go WCF. 去WCF。

Why creating something on your own, when there is this perfectly suited library? 当有这个非常适合的图书馆时,为什么要自己创作? WCF can exactly what you need out of the box. WCF可以完全满足您的需求。 It supports those synchronous blocking calls you need. 它支持您需要的那些同步阻塞调用。

Do yourself a favor and learn it, you will not regret. 帮自己一个忙,学习它,你不会后悔。

I had thought there was a win32 "named" object that could be created, potentially able to serve this capability. 我原以为有一个win32“命名”对象可以创建,可能能够提供这种功能。 I'm not spotting it on net searches though. 我不是在网络搜索中发现它。 Of course you could try to use the BCL socket mechanisms directly, blocking for a socket accept. 当然你可以尝试直接使用BCL套接字机制,阻塞套接字接受。 You could also try .net remoting, though I'm not sure it would be more light-weight than WCF. 您也可以尝试.net远程处理,但我不确定它会比WCF更轻量级。

Ultimately WCF might be best. 最终WCF可能是最好的。 If you use self-hosting, then I don't think it is as heavy-weight as you are thinking. 如果你使用自托管,那么我认为它不像你想的那么重。

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

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