Вопрос

Is there any efficient way to let C programs talk to Java programs on Windows, Linux and Mac OS X? I tried a simple TCP/IP-Server, but it causes a lot of CPU load.

Isn't there a simpler way?

Это было полезно?

Решение

For cross-platform communication you can use sockets if the parties run on different computers, or, for local communication you can use memory-mapped files.

Properly written socket server should not cause too much CPU load, but it's easy to implement it wrong.

Our company offers MsgConnect product (free with source version is available), which hides complexities of building the transport and offers a simple SendMessage-like interface for inter-process communication on various platforms.

Другие советы

The gold standard for these things is ZeroMQ.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top