Efficient data transfer from Java to C++ on windows

后端 未结 11 1238
我在风中等你
我在风中等你 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:28

    Named pipes would be more efficient than TCP, but how about just using shared memory blocks?

    I don't know what primitives exist on the Java side for interfacing with shared memory, but from the C++ side it would be more efficient to access data in shared memory than read it out of either a socket or named pipe. You would have to implement your own flow control and blocking primitives, but these could be fairly straight forward.

提交回复
热议问题