需要使用 .NET Remoting 启动单独的后台进程进行进程间通信

发布于 2024-09-08 09:41:34 字数 232 浏览 0 评论 0原文

我有一个抽象工厂,它将根据需要启动单独的进程(.NET EXE)。抽象工厂需要随时启动进程,并让新创建的进程能够与抽象工厂所在的进程进行通信。这种进程间通信将在创建它们的工厂完成。这些将是后台进程(不涉及 GUI)。这个问题可能的解决方案是什么?

.NET 远程处理或 PIPES 都使进程能够在启动后进行通信,但首先它们需要按需启动,并且它们将执行单独的独立进程(它们将显示在任务管理器以及常设进程中)并且然后,将进行进程间通信。

I have an abstract factory which will initiate separate processes (.NET EXE's) on demand. The abstract factory needs to initiate processes at any time and let the newly created processes be able to communicate with processes in which the abstract factory reside. This interprocess communication is going to be done at the factory that created them. These will be background processes (no GUI involved). What's the possible solution to this problem?

.NET remoting or PIPES both make the processes able to communicate after they have been initiated, but first they need to be initiated on demand and they'll execute separate standalone processes (They will be shown in task manager as well as standing process) and then after that, the interprocess communication will take place.

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

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

发布评论

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

评论(1

心如狂蝶 2024-09-15 09:41:34

查看 System.IO.Pipes 命名空间

匿名管道是为父子进程间通信而设计的。

如果您点击链接,则会提供示例。

您还可以使用命名的 互斥类 进行同步以及用于启动子进程的进程类

Look at the System.IO.Pipes Namespace.

Anonymous pipes are designed for parent-child interprocess communication.

There are examples provided if you follow the link.

You can also use the named Mutex Class for synchronization and the Process Class for starting child processes.

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