An ExponentialReExpress uses an internal onTimeout to express the interest again with double the interestLifetime. More...
#include <exponential-re-express.hpp>
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... | |
An ExponentialReExpress uses an internal onTimeout to express the interest again with double the interestLifetime.
|
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.
| face | This calls face.expressInterest. |
| onData | When 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. |
| onTimeout | If 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. |
1.8.6