IPC between Java and C applications

前端 未结 4 1341
傲寒
傲寒 2021-01-20 08:33

I have 2 applications, one written in C and the other in Java, that suppose to run on the same machine. What is the best way to implement an IPC between them?

best m

4条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-20 09:19

    I would use Sockets over loop back to start with. This allows you to send text or binary data and cleanly handle when one process starts or dies. The latency is about 20-50 micro-seconds depending on what you are doing with the data and how much you send.

    Sockets are platform independent and can be use in pure Java. There are millions of examples and tutorials available for Java.

提交回复
热议问题