#include <pending-interest.hpp>
Public Types | |
typedef function< void(const Interest &, Data &)> | OnData |
typedef function< void(const Interest &)> | OnTimeout |
Public Member Functions | |
PendingInterest (shared_ptr< const Interest > interest, const OnData &onData, const OnTimeout &onTimeout, Scheduler &scheduler) | |
Create a new PitEntry and set the timeout based on the current time and the interest lifetime. More... | |
const Interest & | getInterest () const |
void | invokeDataCallback (const Data &data) |
invokes the DataCallback More... | |
void | setDeleter (const std::function< void()> &deleter) |
Set cleanup function to be called after interest times out. More... | |
Definition at line 34 of file pending-interest.hpp.
typedef function<void(const Interest&, Data&)> ndn::PendingInterest::OnData |
Definition at line 37 of file pending-interest.hpp.
typedef function<void(const Interest&)> ndn::PendingInterest::OnTimeout |
Definition at line 38 of file pending-interest.hpp.
|
inline |
Create a new PitEntry and set the timeout based on the current time and the interest lifetime.
interest | A shared_ptr for the interest |
onData | A function object to call when a matching data packet is received. |
onTimeout | A function object to call if the interest times out. If onTimeout is an empty OnTimeout(), this does not use it. |
scheduler | Scheduler instance to use to schedule a timeout event. The scheduled event will be automatically cancelled when pending interest is destroyed. |
Definition at line 51 of file pending-interest.hpp.
References ndn::DEFAULT_INTEREST_LIFETIME.
|
inline |
Definition at line 69 of file pending-interest.hpp.
|
inline |
invokes the DataCallback
Definition at line 79 of file pending-interest.hpp.
|
inline |
Set cleanup function to be called after interest times out.
Definition at line 88 of file pending-interest.hpp.