void EdgeStrategy::toPreserve( ndn::Data& data, const ndn::Interest& interest ) { if( data.getContentType() == ndn::tlv::ContentType_Nack ) { data.setContent( ndn::Block() ); data.wireEncode(); } }
void EdgeStrategy::toNack( ndn::Data& data, const ndn::Interest& interest ) { // ensure that denied data doesn't leave the network data.setContent( ndn::Block() ); data.wireEncode(); // do whatever a normal router would do RouterStrategy::toNack( data, interest ); }