[Ndn-interest] [Nfd-dev] NDN_API

Thompson, Jeff jefft0 at remap.ucla.edu
Sat Oct 28 01:31:18 PDT 2017

It is not face.send(data), it is face.send(encoding). This is a legacy method to send a raw packet through the face which has already been encoded. As you point out, the correct method to use is face.putData(data) which encodes the Data object and performs other checks.

- Jeff T

From: Nfd-dev <nfd-dev-bounces at lists.cs.ucla.edu<mailto:nfd-dev-bounces at lists.cs.ucla.edu>> on behalf of Giuseppe Carella <gcarella228 at gmail.com<mailto:gcarella228 at gmail.com>>
Date: Friday, October 27, 2017 at 7:17: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: [Nfd-dev] NDN_API

Good morning community,

can someone explain me the difference between face.putData(data) and face.send(data)?

I know that face.putData(data) is used to put data which satisfies an interest packet (and I always thought that it was enough to send a data packet to the consumer).
In the ndn-js examples I studied, face.send(data) is not used.

So what is the role of face.send(data) compared with face.putData(data)?

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

More information about the Ndn-interest mailing list