Problem:
My code native code (c/c++) is called via JNI.
Once it's started it needs to get byte[] buffer from Java object several times per second for further heavy processing. Native code should request buffer when processing of previous buffer is completed.
The orginal idea was to pass buffer via AF_INET socket to avoid JNI stuff, but that solution did not work efficiently enough.
Possible solutions:
There are following ways to improve passing buffer:
- JNI stuff
- AF_LOCAL
- ???
What is the most efficient way to get java byte [] buffer from native code?