[Ndn-interest] face_object

Thompson, Jeff jefft0 at remap.ucla.edu
Mon Nov 6 08:15:14 PST 2017

This is a general question about asynchronous programming, not specific to NDN-JS, and not even specific to NDN. This is how all async programming works. expressInterest is “non-blocking”. You call the expressInterest method to give callbacks to the system and the method returns immediately, “non-blocking”. When the system completes the task, it calls the callback.

- 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 Giuseppe Carella <gcarella228 at gmail.com<mailto:gcarella228 at gmail.com>>
Date: Monday, November 6, 2017 at 5:58:00
To: "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>>, nfd-dev <nfd-dev at lists.cs.ucla.edu<mailto:nfd-dev at lists.cs.ucla.edu>>
Subject: [Ndn-interest] face_object

Good morning community,

can someone explain me the bahavior of the face.expressInterest method in ndn-js?
I understood that it has the aim to launch the callbacks onData and onTimeOut, but I don't understand how it is possible that this object doesn't work like a tcpListener.
It doesn't wait that one of the callbacks (onData or onTimeOut) returns something.
It seems that this object launches the callbacks without waiting for the result of one of those two callbacks.

Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndn-interest/attachments/20171106/0cc54c0d/attachment.html>

More information about the Ndn-interest mailing list