ndn-lite
Typedefs
callback-funcs.h File Reference
#include <stdint.h>

Go to the source code of this file.

Typedefs

typedef int(* ndn_on_interest_func) (const uint8_t *interest, uint32_t interest_size, void *userdata)
 The onInterest callback function. More...
 
typedef void(* ndn_on_data_func) (const uint8_t *data, uint32_t data_size, void *userdata)
 The onData callback function. More...
 
typedef void(* ndn_on_timeout_func) (void *userdata)
 The onTimeout callback function. More...
 

Typedef Documentation

◆ ndn_on_data_func

typedef void(* ndn_on_data_func) (const uint8_t *data, uint32_t data_size, void *userdata)

The onData callback function.

Parameters
[in]dataThe encoded data.
[in]data_sizeThe length of the data .
[in]userdata[Optional] User defined data.

◆ ndn_on_interest_func

typedef int(* ndn_on_interest_func) (const uint8_t *interest, uint32_t interest_size, void *userdata)

The onInterest callback function.

Parameters
[in]interestThe encoded interest.
[in]interest_sizeThe length of the interest .
[in]userdata[Optional] User defined data.
Returns
The forward strategy to take, only used if no Data get from this function.

◆ ndn_on_timeout_func

typedef void(* ndn_on_timeout_func) (void *userdata)

The onTimeout callback function.

Parameters
[in]userdata[Optional] User defined data.