Less console output
diff --git a/js/WebSocketTransport.js b/js/WebSocketTransport.js
index 76c1c18..d845eff 100644
--- a/js/WebSocketTransport.js
+++ b/js/WebSocketTransport.js
@@ -113,21 +113,21 @@
// We are in starting phase, record publisherPublicKeyDigest in self.ccndid
if(!co.signedInfo || !co.signedInfo.publisher
|| !co.signedInfo.publisher.publisherPublicKeyDigest) {
- console.log("Cannot contact router");
+ console.log("Cannot contact router, close NDN now.");
// Close NDN if we fail to connect to a ccn router
ndn.readyStatus = NDN.CLOSED;
ndn.onclose();
- console.log("NDN.onclose event fired.");
+ //console.log("NDN.onclose event fired.");
} else {
- console.log('Connected to ccnd.');
+ //console.log('Connected to ccnd.');
self.ccndid = co.signedInfo.publisher.publisherPublicKeyDigest;
if (LOG>3) console.log(self.ccndid);
// Call NDN.onopen after success
ndn.readyStatus = NDN.OPENED;
ndn.onopen();
- console.log("NDN.onopen event fired.");
+ //console.log("NDN.onopen event fired.");
}
} else {
var pitEntry = getEntryForExpressedInterest(nameStr);
@@ -184,7 +184,7 @@
// Close NDN when WebSocket is closed
ndn.readyStatus = NDN.CLOSED;
ndn.onclose();
- console.log("NDN.onclose event fired.");
+ //console.log("NDN.onclose event fired.");
}
}
diff --git a/wsproxy/README.md b/wsproxy/README.md
index 89078e9..3b8dc26 100644
--- a/wsproxy/README.md
+++ b/wsproxy/README.md
@@ -1,5 +1,5 @@
-ws-ndn-js
-=========
+wsproxy
+=======
WebSocket proxy server between NDN javascript stack and ccnd.
@@ -8,14 +8,20 @@
Installation guide:
1) node.js: go to http://nodejs.org/ to download and install node.js;
+
2) ws package: use command 'npm install ws' or go to https://github.com/einaros/ws for more information;
+
3) node-getopt package: use command 'npm install node-getopt' or go to https://npmjs.org/package/node-getopt for more information.
To run the proxy, simply use the command 'node wsproxy-tcp.js' or 'node wsproxy-udp.js'.
+
To specify remote ccnd router's hostname or ip address, use option '-c x.x.x.x'. Default is 'localhost'.
+
To specify the port number on which the proxy will listen, use option '-p xxxx'. Default is 9696.
+
To specify maximum number of concurrent clients, use option '-m N'. Default is 40.
+
To specify the level of log info display, use option '-L x'. x=0 means no output; x=1 will log connection startup and close; x=2 will log contents of all messages that flow across the proxy. Default is 1.
Example: to setup UDP connection to ccnd router 192.168.1.51 with max client number 50 and log level 2, use the command: