All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Static Public Member Functions | List of all members
ndn::ExponentialReExpress Class Reference

An ExponentialReExpress uses an internal onTimeout to express the interest again with double the interestLifetime. More...

#include <exponential-re-express.hpp>

Inheritance diagram for ndn::ExponentialReExpress:

Static Public Member Functions

static OnTimeout makeOnTimeout (Face *face, const OnData &onData, const OnTimeout &onTimeout, Milliseconds maxInterestLifetime=16000.0)
 Return a function object to use in expressInterest for onTimeout which will express the interest again with double the interestLifetime. More...
 

Detailed Description

An ExponentialReExpress uses an internal onTimeout to express the interest again with double the interestLifetime.

See ExponentialReExpress.makeOnTimeout.

Member Function Documentation

OnTimeout ndn::ExponentialReExpress::makeOnTimeout ( Face face,
const OnData onData,
const OnTimeout onTimeout,
Milliseconds  maxInterestLifetime = 16000.0 
)
static

Return a function object to use in expressInterest for onTimeout which will express the interest again with double the interestLifetime.

If the interesLifetime goes over maxInterestLifetime (see below), then call the provided onTimeout. If a Data packet is received, this calls the provided onData.

Parameters
faceThis calls face.expressInterest.
onDataWhen a matching data packet is received, this calls onData(interest, data) where interest is the interest given to expressInterest and data is the received Data object. This is normally the same onData you initially passed to expressInterest. NOTE: The library will log any exceptions thrown by this callback, but for better error handling the callback should catch and properly handle any exceptions.
onTimeoutIf the interesLifetime goes over maxInterestLifetime, this calls onTimeout(interest). However, if onTimeout is the default OnTimeout(), this does not use it. NOTE: The library will log any exceptions thrown by this callback, but for better error handling the callback should catch and properly handle any exceptions.
maxInterestLifetime(optional) The maximum lifetime in milliseconds for re-expressed interests. If omitted, use 16000.
Returns
The OnTimeout function object to pass to expressInterest.

The documentation for this class was generated from the following files: