コード例 #1
0
void
GenericLinkService::doSendNack(const lp::Nack& nack, const EndpointId& endpointId)
{
  lp::Packet lpPacket(nack.getInterest().wireEncode());
  lpPacket.add<lp::NackField>(nack.getHeader());

  encodeLpFields(nack, lpPacket);

  this->sendNetPacket(std::move(lpPacket), endpointId, false);
}
コード例 #2
0
ファイル: pit-out-record.cpp プロジェクト: MobinRanjbar/NFD
bool
OutRecord::setIncomingNack(const lp::Nack& nack)
{
  if (nack.getInterest().getNonce() != this->getLastNonce()) {
    return false;
  }

  m_incomingNack.reset(new lp::NackHeader(nack.getHeader()));
  return true;
}
コード例 #3
0
void
DummyClientFace::receive(const lp::Nack& nack)
{
  lp::Packet lpPacket;
  lpPacket.add<lp::NackField>(nack.getHeader());
  Block interest = nack.getInterest().wireEncode();
  lpPacket.add<lp::FragmentField>(make_pair(interest.begin(), interest.end()));

  addFieldFromTag<lp::IncomingFaceIdField, lp::IncomingFaceIdTag>(lpPacket, nack);
  addFieldFromTag<lp::CongestionMarkField, lp::CongestionMarkTag>(lpPacket, nack);

  static_pointer_cast<Transport>(getTransport())->receive(lpPacket.wireEncode());
}
コード例 #4
0
void
DummyClientFace::receive<lp::Nack>(const lp::Nack& nack)
{
  lp::Packet lpPacket;
  lpPacket.add<lp::NackField>(nack.getHeader());
  Block interest = nack.getInterest().wireEncode();
  lpPacket.add<lp::FragmentField>(make_pair(interest.begin(), interest.end()));

  nfd::LocalControlHeader localControlHeader = nack.getLocalControlHeader();

  if (localControlHeader.hasIncomingFaceId()) {
    lpPacket.add<lp::IncomingFaceIdField>(localControlHeader.getIncomingFaceId());
  }

  m_transport->receive(lpPacket.wireEncode());
}