<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>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.</div>
<div><br>
</div>
<div>- Jeff T</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Nfd-dev <<a href="mailto:nfd-dev-bounces@lists.cs.ucla.edu">nfd-dev-bounces@lists.cs.ucla.edu</a>> on behalf of Giuseppe Carella <<a href="mailto:gcarella228@gmail.com">gcarella228@gmail.com</a>><br>
<span style="font-weight:bold">Date: </span>Friday, October 27, 2017 at 7:17:00<br>
<span style="font-weight:bold">To: </span>"<a href="mailto:ndn-interest@lists.cs.ucla.edu">ndn-interest@lists.cs.ucla.edu</a>" <<a href="mailto:ndn-interest@lists.cs.ucla.edu">ndn-interest@lists.cs.ucla.edu</a>>, nfd-dev <<a href="mailto:nfd-dev@lists.cs.ucla.edu">nfd-dev@lists.cs.ucla.edu</a>><br>
<span style="font-weight:bold">Subject: </span>[Nfd-dev] NDN_API<br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">
<div>
<div>Good morning community,<br>
<br>
</div>
can someone explain me the difference between face.putData(data) and face.send(data)?</div>
<div><br>
</div>
<div>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).</div>
<div>In the ndn-js examples I studied, face.send(data) is not used.</div>
<div><br>
</div>
<div>So what is the role of face.send(data) compared with face.putData(data)?</div>
<div><br>
</div>
<div>Thank you.</div>
<div>Giuseppe.<br>
</div>
</div>
</div>
</div>
</span>
</body>
</html>