IPC在Java和C ++之间的最佳方法是什么? [英] What is the best approach for IPC between Java and C++?

查看:172
本文介绍了IPC在Java和C ++之间的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在单个JVM应用程序(一个进程,潜在的多个线程)和一个链接到C ++ dll的本地C ++应用程序之间实现一个强大的IPC解决方案。 dll可能或可能不在同一物理机器上。这样做的最佳方法是什么?

I would like to implement a robust IPC solution between a single JVM app (one process, potentially multiple threads) and a native C++ application that is linked to a C++ dll. The dll may or may not be on the same physical machine. What is the best approach for doing so?

任何建议将非常感谢!谢谢!

Any suggestions will be greatly appreciated! Thanks!

推荐答案

我会使用标准的TCP / IP套接字,其中应用程序监听某些端口,

I'd use a standard TCP/IP socket, where the app listens on some port and the library connects to it to report what it has to report and expect the answers.

抽象是强大的,支持得很好,没有互操作问题。

The abstraction is robust, well supported and will have no interop issues.

这篇关于IPC在Java和C ++之间的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆