<div dir="ltr">Hi everyone!<div><br></div><div>I have a question regarding how applications can deal with different interest names.</div><div><br></div><div>Take for example the custom application ndn-custom-app-producer.cpp</div><div><br></div><div>Let's say that I want the producer application to handle different operations such as adding a hash to a list, deleting a has from a list and returning some data regarding a certain hash:</div><div><br></div><div>"/prefix/sub/<b>add</b>/{some hash}"</div><div>"/prefix/sub/<b>delete</b>/{some hash}"</div><div>"/prefix/sub/<b>get</b>/{some hash}"</div><div><br></div><div>So another application (a consumer) can send the above interests but how should my producer application handle this?</div><div><br></div><div>Currently I am doing this:</div><div><br></div><div>I add "/prefix/sub" to the FIB so that my producer listens to everything coming in on that prefix. </div><div><br></div><div>Then I have this logic:</div><div><br></div><div>onInterest(){</div><div>  if(interest -> getName().get(3).value() == "add")</div><div>  {</div><div>     //add the data</div><div>  }</div><div>  else if (interest -> getName().get(3).value() == "delete")</div><div>  {</div><div>      //delete the data</div><div>   }<br>   else if (interest -> getName().get(3).value() == "get")</div><div>   {</div><div>      //create a data packet and send the data to the consumer</div><div>   }</div><div>}</div><div><br></div><div>Is this the correct way ?</div><div><br></div><div>Best regards,</div><div>Hafsteinn</div></div>