I have a native-app written in c++.
I am able to send data from my native-app to chrome extension using How to send message FROM native app TO Chrome extension?
But I am unable to figure out the other way.
Chrome doc. states : Chrome starts each native messaging host in a separate process and communicates with it using standard input (stdin) and standard output (stdout). The same format is used to send messages in both directions: each message is serialized using JSON, UTF-8 encoded and is preceded with 32-bit message length in native byte order.
how do I read/interpret data from stdin, sent by the chrome-extension?
How do I read 4byte length information and also the rest of the data that is being sent UTF-8 encoded?
Please help!
Thanks!