Skip to content

Instantly share code, notes, and snippets.

@yoursunny
Last active July 21, 2016 17:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yoursunny/3168450693808539096bede23951d17a to your computer and use it in GitHub Desktop.
Save yoursunny/3168450693808539096bede23951d17a to your computer and use it in GitHub Desktop.
<!doctype html>
<title>WebSocketTransport FaceScope test</title>
<p>
<input id="btn127" type="button" value="127.0.0.1">
<input id="btn1" type="button" value="::1">
</p>
<script src="https://cdn.rawgit.com/named-data/ndn-js/fae355398c0961e2d4e0c8c709e38b435e421fb1/build/ndn.js"></script>
<script>
var face;
function openFace(host) {
face = new Face({host:host});
face.expressInterest(new Interest('/'), function(){});
}
document.getElementById('btn127').onclick = openFace.bind(null, '127.0.0.1');
document.getElementById('btn1').onclick = openFace.bind(null, '[::1]');
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment