EM-ODP  3.7.0
Event Machine on ODP
em_api_hooks_t Struct Reference

#include <event_machine_hooks.h>

Data Fields

em_api_hook_alloc_t alloc_hook
 
em_api_hook_free_t free_hook
 
em_api_hook_send_t send_hook
 

Detailed Description

API-callback hooks provided by the user at start-up (init)

EM API functions will call an API hook if given by the user through this struct to em_init(). E.g. em_alloc() will call api_hooks->alloc(...) if api_hooks->alloc != NULL. Not all hooks need to be provided, use NULL for unused hooks.

Note
Not all EM API funcs have associated hooks, only the most used functions (in the fast path) are included. Notice that extensive usage or heavy processing in the hooks might significantly impact performance since each API call (that has a hook) will execute the extra code in the user provided hook.
Only used if EM_API_HOOKS_ENABLE != 0

Definition at line 214 of file event_machine_hooks.h.

Field Documentation

◆ alloc_hook

em_api_hook_alloc_t em_api_hooks_t::alloc_hook

API callback hook for all alloc-variants: em_alloc() and em_alloc_multi() Initialize to NULL if unused.

Definition at line 220 of file event_machine_hooks.h.

◆ free_hook

em_api_hook_free_t em_api_hooks_t::free_hook

API callback hook for all free-variants: em_free() and em_free_multi() Initialize to NULL if unused.

Definition at line 227 of file event_machine_hooks.h.

◆ send_hook

em_api_hook_send_t em_api_hooks_t::send_hook

API callback hook used for all send-variants: em_send(), em_send_multi(), em_send_group() and em_send_group_multi() Initialize to NULL if unused.

Definition at line 234 of file event_machine_hooks.h.


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