.NET 和 Java 客户端应用程序之间的 IPC

发布于 2024-07-09 13:09:07 字数 237 浏览 5 评论 0原文

我必须在没有任何类型的代理或服务器的情况下获得两个不同的客户端应用程序对话。 Java 和 .NET 这两个进程之间 IPC 的最佳方法是什么?

它必须能够在多用户终端服务器上工作,所以请不要使用套接字。 我希望它是轻量级的、简单的、即插即用的,所以不要使用 RMI/WS。

我现在正在考虑 JNI 来访问互斥体和命名管道,我的方向正确吗?

欢迎任何想法!

谢谢丹尼斯

I must get two different client application talk without any kind of broker or server.
What is the best method for IPC beween two process, Java and .NET?

It must able to be work in multi-user termainl server, so no socket please.
I wish that it is lightweight and simple, something plug and run, so no RMI/WS please.

I'm now thinking about JNI to access Mutex and Named pipes, am I going to a right direction?

Any ideas welcome!

Thanks Dennis

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

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

发布评论

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

评论(3

玩物 2024-07-16 13:09:07

我是 jni4net 的作者,它是 JVM 和 CLR 之间的开源进程内桥梁。 它构建在 JNI 和 PInvoke 之上。 无需 C/C++ 代码。 我希望它能帮助你。

I am author of jni4net, open source intraprocess bridge between JVM and CLR. It's build on top of JNI and PInvoke. No C/C++ code needed. I hope it will help you.

谈场末日恋爱 2024-07-16 13:09:07

您可以通过JNI(Java)和PInvoke(C#)访问WinAPI。
使用以下 WinAPI 函数:
创建事件
设置事件
等待单个对象
创建互斥体
释放互斥体
CreateFileMapping(用于共享内存)
文件映射视图
取消文件视图映射

You can access WinAPI through JNI(Java) and PInvoke(C#).
Use following WinAPI functions:
CreateEvent
SetEvent
WaitForSingleObject
CreateMutex
ReleaseMutex
CreateFileMapping (for share memory)
MapViewOfFile
UnmapViewOfFile

静待花开 2024-07-16 13:09:07

我会使用 protobuf

协议缓冲区是一种以高效且可扩展的格式对结构化数据进行编码的方法。 Google 几乎所有内部​​ RPC 协议和文件格式都使用 Protocol Buffer。

I would use protobuf.

Protocol Buffers are a way of encoding structured data in an efficient yet extensible format. Google uses Protocol Buffers for almost all of its internal RPC protocols and file formats.

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