Error registerPrefix(const Name &prefix, InterestCallback callback)
Register a prefix.
Error expressInterest(const Interest &interest, DataCallback onData, TimeoutCallback onTimeout=nullptr)
Send an Interest and wait for Data.
Error putData(const Data &data)
Send Data.
void processEvents()
Process events.
Common definitions for the NDN protocol stack.
NDN cryptographic utilities.
Forwarding Information Base (FIB)
std::function< void(const Interest &, FaceId)> InterestCallback
Interest receive callback.
std::function< void(const Interest &)> TimeoutCallback
Timeout callback.
std::function< void(const Data &)> DataCallback
Data receive callback.
void setForwarder(Forwarder &fw)
Register the application's Forwarder for convenience APIs.
Error expressInterest(const Interest &interest, DataCallback onData, TimeoutCallback onTimeout=nullptr)
Send an Interest and wait for Data.
void processEvents()
Process events.
Error registerPrefix(std::string_view prefix, InterestCallback callback)
Register a prefix.
Error putData(const Data &data)
Send Data.
Forwarder & getForwarder()
Get the global Forwarder instance.
Error initialize()
Initialize the NDN protocol stack.
Pending Interest Table (PIT)
NDN signature types and constants.
NDN TLV (Type-Length-Value) encoding.