My NaCl application needs to have a way of connecting to a https server with POST request to access some data. I have been studied all available ways of getting libcurl to work, but not possible to do so. At the end, it turns out that there is no way of using socket API outside of chrome apps, according to forum discussion 3 years ago and assuming nothing has been changed since then.
For those who has problem running the demo, please check the following:
1. Make sure your build is using the latest pepper toolchain and follow the exact instruction
2. Make sure your make file is configure in this order LIBS = ppapi_cpp ppapi pthread curl glibc-compat ssl crypto z nacl_io
3. Make sure when you launch chrome, add the following command --allow-nacl-socket-api=<origin> my origin is localhost for example
4. If you are running Chrome app, add required sockets permssion to your manifest json file
Enough sharing. My question to everyone here is any alternative way to make my application access URL without using socket API？I am using pexe not a chrome app(nexe), step 3 is not an option for my final publish release. nacl_io seems to have tcp api to use, but SSL for https is a question which I need to study further. The reason I choose curl at the beginning is because my original c++ application use it, and it has everything I need. Any suggestion is greatly appreciated. Thanks.