How to make it work properly "browser.runtime.connectNative"

I’m developing my first add-on that needs to connect with an app (also written by me in C- ) but “browser.runtime.connectNative” doesn’t work as described in the documentation.
1/ If the app is already launched, Mozilla launches another instance.
2/ 2 or 3 seconds after a “port.postMessage” Mozilla forces the application to sleep, interrupting threads and any action on the app’s interface triggers the message “no response”.
Has anyone had similar problems?
Thank you for your answers and wherever you are in the world, keep the courage in the face of coronavirus.

1 Like