Shared memory between C ++ and JS program

I want to use shared memory between two different types of programs; C ++ and JavaScript. A C ++ program must write to memory, and a JS program must read at the same time from the same piece of memory. Is it possible?

+6
source share
1 answer

Browsers cannot do this. However, there are three possible ways to achieve what you want:

  • Create a RESTful service in which your C ++ POST that runs the web socket to update your JS in the browser. Or ask JS to query the service.

  • Or your browser page embeds an iFrame pointing to an HTML page in a file system that is written / updated by your C ++ program.

  • Or, assuming this is for an intranet, you can write an ActiveX control that allows IE to do anything. However, since you are using Linux, you will have to use IEs4Linux and / or WINE.

Hope this helps.

0
source

Source: https://habr.com/ru/post/945034/


All Articles