Reputation: 56
Right now I'm trying to migrate a code written in C to a application for Chrome browser.
I'm new in programming on the NaCl for Chrome Apps and I don't get really good if with the native client I can use the raw sockets. I need to use the raw sockets because I must create modified packets such as UDP with TTL very low.
So in general my question is, Can I use raw sockets (C style) with the NaCl? If the answer is yes, If you could provide some extra information, It would be great.
Upvotes: 0
Views: 377
Reputation: 1860
You can use TCP and UDP sockets, via the nacl_io library. Look at the nacl_io demo in the Native Client SDK. It can be found in the subdirectory examples/demo/nacl_io_demo
.
Please note that these sockets APIs are only allowed when running as a Chrome App, not on the open web.
Upvotes: 2