stores a pending Interest and associated callbacks More...
#include <pending-interest.hpp>


Public Member Functions | |
| PendingInterest (shared_ptr< const Interest > interest, const DataCallback &dataCallback, const NackCallback &nackCallback, const TimeoutCallback &timeoutCallback, Scheduler &scheduler) | |
| Construct a pending Interest record. More... | |
| shared_ptr< const Interest > | getInterest () const |
| void | invokeDataCallback (const Data &data) |
| invokes the Data callback More... | |
| void | invokeNackCallback (const lp::Nack &nack) |
| invokes the Nack callback More... | |
| void | setDeleter (const std::function< void()> &deleter) |
| Set cleanup function to be invoked when Interest times out. More... | |
stores a pending Interest and associated callbacks
Definition at line 35 of file pending-interest.hpp.
|
inline |
Construct a pending Interest record.
The timeout is set based on the current time and the Interest lifetime. This class will invoke the timeout callback unless the record is deleted before timeout.
| interest | the Interest |
| dataCallback | invoked when matching Data packet is received |
| nackCallback | invoked when Nack matching Interest is received |
| timeoutCallback | invoked when Interest times out |
| scheduler | Scheduler for scheduling the timeout event |
Definition at line 50 of file pending-interest.hpp.
References ndn::DEFAULT_INTEREST_LIFETIME, and ndn::util::scheduler::Scheduler::scheduleEvent().
|
inline |
Definition at line 72 of file pending-interest.hpp.
|
inline |
invokes the Data callback
Definition at line 82 of file pending-interest.hpp.
|
inline |
invokes the Nack callback
Definition at line 94 of file pending-interest.hpp.
|
inline |
Set cleanup function to be invoked when Interest times out.
Definition at line 105 of file pending-interest.hpp.