Efficient data transfer from Java to C++ on windows

后端 未结 11 1313
我在风中等你
我在风中等你 2021-01-18 03:39

I\'m looking to stream lots of data (up to ~1 Gbit) from Java to a C++ application (both on the same machine). I\'m currently using a FIFO on Linux but need a Windows soluti

11条回答
  •  無奈伤痛
    2021-01-18 04:16

    I would use a local socket, which is, as you state, the most cross-platform method.

    Kernel-User space copies should not be an issue since any other method you could choose would requiere this kind of copy except for maybe shared memory. It is available on every Unix system and also Windows has its way of doing it

    To use shared memory in Java the only way is to implement it by means of your own .DLL/.SO and JNI to access it.

提交回复
热议问题