Go to the source code of this file.
Typedefs | |
| typedef struct hook_s | hook_t |
| typedef int(* | hook_server_init_t )(void) |
| typedef int(* | hook_server_term_t )(void) |
| typedef int(* | hook_child_init_t )(void) |
| typedef int(* | hook_child_term_t )(void) |
| typedef int(* | hook_request_t )(request_t *, response_t *) |
Functions | |
| int | hook_server_init (hook_server_init_t) |
| int | hook_server_term (hook_server_term_t) |
| int | hook_child_init (hook_child_init_t) |
| int | hook_child_term (hook_child_term_t) |
| int | hook_request (hook_request_t) |
| int | hook_create (hook_t **phook) |
| int | hook_free (hook_t *hook) |
| typedef int(* hook_child_init_t)(void) |
| typedef int(* hook_child_term_t)(void) |
| typedef int(* hook_request_t)(request_t *, response_t *) |
| typedef int(* hook_server_init_t)(void) |
| typedef int(* hook_server_term_t)(void) |
| int hook_child_init | ( | hook_child_init_t | func | ) |
Set a hook to be notified when new children get forked.
When the main server forks a child func will be called in the child context so it'll have the opportunity to initialize any one-per-process resources.
Note that a single child can (and probably will) handle more then one HTTP connection.
Pass a NULL pointer to disable a previously set hook.
| func | the function pointer |
Definition at line 21 of file child_nfy.c.
| int hook_child_term | ( | hook_child_term_t | func | ) |
Set a hook to be notified when a child is about to die.
This hook executes just before the child dies; you may use it to free resources allocated by the hook_child_init hook.
Pass a NULL pointer to disable a previously set hook.
| func | the function pointer |
Definition at line 47 of file child_nfy.c.
| int hook_request | ( | hook_request_t | func | ) |
Set a hook that executes on every HTTP request.
This hook will be executed on every HTTP request; for dynamic pages the hook will fire after the execution of the code of the dynamic page.
Pass a NULL pointer to disable a previously set hook.
| func | the function pointer |
| int hook_server_init | ( | hook_server_init_t | func | ) |
Set a hook that executes when on server startup.
This hook will be executed just once on server startup.
Pass a NULL pointer to disable a previously set hook.
| func | the function pointer |
Definition at line 16 of file server_nfy.c.
| int hook_server_term | ( | hook_server_term_t | func | ) |
Set a hook that executes just before quitting the server.
This hook is called during the shutdown procedure of the Klone server.
Pass a NULL pointer to disable a previously set hook.
| func | the function pointer |
Definition at line 41 of file server_nfy.c.