.NET 和 Java 客户端应用程序之间的 IPC
我必须在没有任何类型的代理或服务器的情况下获得两个不同的客户端应用程序对话。 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我是 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.
您可以通过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
我会使用 protobuf。
I would use protobuf.