Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1448)

Unified Diff: native_client_sdk/src/examples/demo/nacl_io/example.js

Issue 99933002: [NaCl SDK] nacl_io: implement getaddrinfo() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | native_client_sdk/src/examples/demo/nacl_io/handlers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/examples/demo/nacl_io/example.js
diff --git a/native_client_sdk/src/examples/demo/nacl_io/example.js b/native_client_sdk/src/examples/demo/nacl_io/example.js
index 1200af35d1532b7cb6ef09bef80f4ce19238fbd7..2b5b516ec7814935cab7e8fa3eaf077c5dcc48cd 100644
--- a/native_client_sdk/src/examples/demo/nacl_io/example.js
+++ b/native_client_sdk/src/examples/demo/nacl_io/example.js
@@ -230,6 +230,24 @@ function getcwdResult(dirname) {
common.logMessage('getcwd: ' + dirname + '.');
}
+function getaddrinfo(e) {
+ var name = document.getElementById('getaddrinfoName').value;
+ var family = document.getElementById('getaddrinfoFamily').value;
+ nacl_module.postMessage(makeCall('getaddrinfo', name, family));
+}
+
+function getaddrinfoResult(name, addr_type) {
+ common.logMessage('getaddrinfo returned successfully');
+ common.logMessage('ai_cannonname = ' + name + '.');
+ var count = 1;
+ for (var i = 1; i < arguments.length; i+=2) {
+ var msg = 'Address number ' + count + ' = ' + arguments[i] +
+ ' (' + arguments[i+1] + ')';
+ common.logMessage(msg);
+ count += 1;
+ }
+}
+
function gethostbyname(e) {
var name = document.getElementById('gethostbynameName').value;
nacl_module.postMessage(makeCall('gethostbyname', name));
« no previous file with comments | « no previous file | native_client_sdk/src/examples/demo/nacl_io/handlers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698