开发者

What is the best way to communicate between two process with C#? [closed]

开发者 https://www.devze.com 2023-02-06 14:38 出处:网络
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, argumen开发者_运维知识库ts, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 11 years ago.

use net remoting or others ??

I want sample way, I think that no socket or other would be more easy to deploy ...

anyway ,help please , thanks.


You will want to begin with Namedpipes.

Since you are dealing with C#, have a look at:

http://msdn.microsoft.com/en-us/library/aa365590(v=vs.85).aspx

Essentially, this got me going instantly when I was looking into it:

http://msdn.microsoft.com/en-us/library/bb546085.aspx#Y1920

Good luck.


It depends on what you want to do. If you just want to send notifications between two processes running on the same computer, named events work just fine. If you want to send long messages, then there are named pipes, sockets, and WCF (which replaces .NET Remoting). You might also want to share memory with memory mapped files. There are several other possibilities.

The method you use depends in large part on how much data you want to communicate, how fast you need it to be, and how much time you want to spend futzing with it.

0

精彩评论

暂无评论...
验证码 换一张
取 消