Changed NDN to take getTransport and added WebSocketTransport.js which defines the default transport. Make NDN.expressInterest take the Name and call the specified transport's expressInterest.
diff --git a/js/testing/test-get-async.html b/js/testing/test-get-async.html
index fc7d84a..f93db6c 100644
--- a/js/testing/test-get-async.html
+++ b/js/testing/test-get-async.html
@@ -11,7 +11,7 @@
<script type="text/javascript">
var ndn = new NDN();
- ndn.connectWebSocket();
+ ndn.transport.connectWebSocket(ndn);
var AsyncGetClosure = function AsyncGetClosure() {
// Inherit from Closure.
@@ -35,7 +35,7 @@
function run() {
- ndn.expressInterestWS(document.getElementById('interest').value, new AsyncGetClosure(), null);
+ ndn.expressInterest(new Name(document.getElementById('interest').value), new AsyncGetClosure());
}
</script>