Libevhtp  1.2.13
evhtp_callback_t Struct Reference

structure containing a single callback and configuration More...

Data Fields

evhtp_callback_type type
 the type of callback (regex|path) More...
 
evhtp_callback_cb cb
 the actual callback function More...
 
void * cbarg
 user-defind arguments passed to the cb More...
 
evhtp_hooks_t * hooks
 per-callback hooks More...
 
size_t len
 
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 51 of file evhtp.c.

Field Documentation

◆ cb

evhtp_callback_cb evhtp_callback_t::cb

the actual callback function

Definition at line 53 of file evhtp.c.

◆ cbarg

void* evhtp_callback_t::cbarg

user-defind arguments passed to the cb

Definition at line 54 of file evhtp.c.

◆ glob

char* evhtp_callback_t::glob

Definition at line 60 of file evhtp.c.

◆ hooks

evhtp_hooks_t* evhtp_callback_t::hooks

per-callback hooks

Definition at line 55 of file evhtp.c.

◆ len

size_t evhtp_callback_t::len

Definition at line 56 of file evhtp.c.

◆ path

char* evhtp_callback_t::path

Definition at line 59 of file evhtp.c.

◆ regex

regex_t* evhtp_callback_t::regex

Definition at line 62 of file evhtp.c.

◆ type

evhtp_callback_type evhtp_callback_t::type

the type of callback (regex|path)

Definition at line 52 of file evhtp.c.

◆ val

union { ... } evhtp_callback_t::val

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