What is the best approach for IPC between Java and C++?

前端 未结 5 978
日久生厌
日久生厌 2020-12-08 11:52

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

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-08 12:30

    Google protocol buffer can help you serialize data in a language and platform neutral way. It will also generate code in Java and C++ to handle reading and writing the serialized data. You can then use any communication mechanism you wish to send the data. For example, you could send it over a TCP socket or via shared memory IPC.

提交回复
热议问题