evhtp_callback_t Struct Reference

structure containing a single callback and configuration More...

`#include <evhtp.h>`

## Public Member Functions

| TAILQ_ENTRY (evhtp_callback_s) next

## Data Fields

evhtp_callback_type | type
| the type of callback (regex|path) More...
evhtp_callback_cb | cb
| the actual callback function More...
unsigned int | hash
| the full hash generated integer More...
void * | cbarg
| user-defind arguments passed to the cb More...
evhtp_hooks_t * | hooks
| per-callback hooks More...
union {
char * path
char * glob
regex_t * regex
} | val

## Detailed Description

structure containing a single callback and configuration

The definition structure which is used within the evhtp_callbacks_t structure. This holds information about what should execute for either a single or regex path.

For example, if you registered a callback to be executed on a request for "/herp/derp", your defined callback will be executed.

Optionally you can set callback-specific hooks just like per-connection hooks using the same rules.

Definition at line 346 of file evhtp.h.

## Member Function Documentation

evhtp_callback_t::TAILQ_ENTRY | ( | evhtp_callback_s |  | ) |

## Field Documentation

evhtp_callback_cb evhtp_callback_t::cb

the actual callback function

Definition at line 348 of file evhtp.h.

void* evhtp_callback_t::cbarg

user-defind arguments passed to the cb

Definition at line 350 of file evhtp.h.

char* evhtp_callback_t::glob

Definition at line 355 of file evhtp.h.

unsigned int evhtp_callback_t::hash

the full hash generated integer

Definition at line 349 of file evhtp.h.

evhtp_hooks_t* evhtp_callback_t::hooks

per-callback hooks

Definition at line 351 of file evhtp.h.

char* evhtp_callback_t::path

Definition at line 354 of file evhtp.h.

regex_t* evhtp_callback_t::regex

Definition at line 357 of file evhtp.h.

evhtp_callback_type evhtp_callback_t::type

the type of callback (regex|path)

Definition at line 347 of file evhtp.h.

union { ... } evhtp_callback_t::val

The documentation for this struct was generated from the following file:

- evhtp.h