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

Ashlesh Gawande (agawande) agawande at memphis.edu
Thu Jul 21 10:33:21 PDT 2016


Yes this example works in chrome for me.


Thanks

Ashlesh

________________________________
From: Nfd-dev <nfd-dev-bounces at lists.cs.ucla.edu> on behalf of Thompson, Jeff <jefft0 at remap.UCLA.edu>
Sent: Thursday, July 21, 2016 11:21:11 AM
To: El Mimouni, Omar Ilias (IntlAssoc); Junxiao Shi
Cc: nfd-dev
Subject: Re: [Nfd-dev] [Ndn-interest] (NDN-js) query localhost from browser?

Hi Omar,

Chrome has a separate problem loading the auxiliary file from the local directory. Can you try the attached test-list-faces?

- Jeff T

From: "El Mimouni, Omar Ilias (IntlAssoc)" <omarilias.elmimouni at nist.gov<mailto:omarilias.elmimouni at nist.gov>>
Date: Thursday, July 21, 2016 at 9:15:00
To: Jeff Thompson <jefft0 at remap.ucla.edu<mailto:jefft0 at remap.ucla.edu>>, Junxiao Shi <shijunxiao at email.arizona.edu<mailto:shijunxiao at email.arizona.edu>>
Cc: nfd-dev <nfd-dev at lists.cs.ucla.edu<mailto:nfd-dev at lists.cs.ucla.edu>>
Subject: RE: [Ndn-interest] (NDN-js) query localhost from browser?

Chrome is not working for me. I am using Ubuntu 14.04 too.
I re-installed NFD and NDN-js just to be sure. No result!

Cheers,
Omar

From: Thompson, Jeff [mailto:jefft0 at remap.ucla.edu]
Sent: Thursday, July 21, 2016 12:06 PM
To: El Mimouni, Omar Ilias (IntlAssoc) <omarilias.elmimouni at nist.gov<mailto:omarilias.elmimouni at nist.gov>>; Junxiao Shi <shijunxiao at email.arizona.edu<mailto:shijunxiao at email.arizona.edu>>
Cc: nfd-dev <nfd-dev at lists.cs.ucla.edu<mailto:nfd-dev at lists.cs.ucla.edu>>
Subject: Re: [Ndn-interest] (NDN-js) query localhost from browser?

On Ubuntu 14.04, I cannot use WebSocket to connect to the local NFD with Firefox. But I can with Chrome.

Junxiao, are you using Chrome?

- Jeff T

From: Ndn-interest <ndn-interest-bounces at lists.cs.ucla.edu<mailto:ndn-interest-bounces at lists.cs.ucla.edu>> on behalf of "El Mimouni, Omar Ilias (IntlAssoc)" <omarilias.elmimouni at nist.gov<mailto:omarilias.elmimouni at nist.gov>>
Date: Thursday, July 21, 2016 at 7:46:00
To: Junxiao Shi <shijunxiao at email.arizona.edu<mailto:shijunxiao at email.arizona.edu>>
Cc: "ndn-interest at lists.cs.ucla.edu<mailto:ndn-interest at lists.cs.ucla.edu>" <ndn-interest at lists.cs.ucla.edu<mailto:ndn-interest at lists.cs.ucla.edu>>
Subject: Re: [Ndn-interest] (NDN-js) query localhost from browser?

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<mailto:omarilias.elmimouni at nist.gov>>
Cc: ndn-interest at lists.cs.ucla.edu<mailto: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/nfd-dev/attachments/20160721/df465f3e/attachment.html>


More information about the Nfd-dev mailing list