[Ndn-interest] (NDN-js) query localhost from browser?

El Mimouni, Omar Ilias (IntlAssoc) omarilias.elmimouni at nist.gov
Thu Jul 21 07:46:49 PDT 2016


Hi Junxiao,

First, in my html file I had:

var face = new Face({host: "127.0.0.1"});

Now, based on your reply, I changed it to this:

var ws = new WebSocket("ws://127.0.0.1:9696");
var face = new Face(ws);

But still not working!!!

In the web page I receive a timeout (Time out for interest /localhost/nfd/faces/list).

And in NFD log:

1469111817.516596 INFO: [WebSocketTransport] [id=0,local=ws://[::ffff:127.0.0.1]:9696,remote=wsclient://[::ffff:127.0.0.1]:56256] Creating transport
1469111817.516618 INFO: [FaceTable] Added face id=259 remote=wsclient://[::ffff:127.0.0.1]:56256 local=ws://[::ffff:127.0.0.1]:9696

Cheers,
Omar
From: Junxiao Shi [mailto:shijunxiao at email.arizona.edu]
Sent: Wednesday, July 20, 2016 5:47 PM
To: El Mimouni, Omar Ilias (IntlAssoc) <omarilias.elmimouni at nist.gov>
Cc: ndn-interest at lists.cs.ucla.edu
Subject: Re: [Ndn-interest] (NDN-js) query localhost from browser?


Hi Omar

This should be possible.
You have to connect to NFD on the local machine with a loopback address, either ws://127.0.0.1:9696/<http://127.0.0.1:9696/> or ws://[::1]:9696/ , in order to be treated as a local face.

Yours, Junxiao

On Jul 20, 2016 13:17, "El Mimouni, Omar Ilias (IntlAssoc)" <omarilias.elmimouni at nist.gov<mailto:omarilias.elmimouni at nist.gov>> wrote:
Hi all,

I am currently playing with NDN-js library, and I was wondering if it is possible to query the localhost (e.g.  ndn:/localhost/nfd/faces/list) .
I could do that with node using UnixSocket. Is it possible to do it from a browser (knowing that the browser uses WebSockets) ?

Thanks.

_______________________________________________
Ndn-interest mailing list
Ndn-interest at lists.cs.ucla.edu<mailto:Ndn-interest at lists.cs.ucla.edu>
http://www.lists.cs.ucla.edu/mailman/listinfo/ndn-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndn-interest/attachments/20160721/401171a6/attachment.html>


More information about the Ndn-interest mailing list