apt_poller_task.h File Reference
Poller Task.
More...
#include "apt_pollset.h"
#include "apt_task.h"
#include "apt_timer_queue.h"
Go to the source code of this file.
Typedefs |
typedef
typedefAPT_BEGIN_EXTERN_C
struct apt_poller_task_t | apt_poller_task_t |
typedef apt_bool_t(* | apt_poll_signal_f )(void *obj, const apr_pollfd_t *descriptor) |
Functions |
apt_poller_task_t * | apt_poller_task_create (apr_size_t max_pollset_size, apt_poll_signal_f signal_handler, void *obj, apt_task_msg_pool_t *msg_pool, apr_pool_t *pool) |
apt_bool_t | apt_poller_task_destroy (apt_poller_task_t *task) |
void | apt_poller_task_cleanup (apt_poller_task_t *task) |
apt_bool_t | apt_poller_task_start (apt_poller_task_t *task) |
apt_bool_t | apt_poller_task_terminate (apt_poller_task_t *task) |
apt_task_t * | apt_poller_task_base_get (const apt_poller_task_t *task) |
apt_task_vtable_t * | apt_poller_task_vtable_get (apt_poller_task_t *task) |
void * | apt_poller_task_object_get (const apt_poller_task_t *task) |
apt_bool_t | apt_poller_task_descriptor_add (const apt_poller_task_t *task, const apr_pollfd_t *descriptor) |
apt_bool_t | apt_poller_task_descriptor_remove (const apt_poller_task_t *task, const apr_pollfd_t *descriptor) |
apt_timer_t * | apt_poller_task_timer_create (apt_poller_task_t *task, apt_timer_proc_f proc, void *obj, apr_pool_t *pool) |
Detailed Description
Poller Task.
Typedef Documentation
Function prototype to handle signalled descripors
Opaque poller task declaration
Function Documentation
Get task base.
- Parameters:
-
| task | the poller task to get task base from |
Cleanup poller task.
- Parameters:
-
Create poller task.
- Parameters:
-
| max_pollset_size | the maximum number of descriptors pollset can hold |
| signal_handler | the handler of signalled descriptors |
| obj | the external object to pass to callback |
| msg_pool | the pool of task messages |
| pool | the pool to allocate memory from |
Add descriptor to pollset.
- Parameters:
-
| task | the task which holds the pollset |
| descriptor | the descriptor to add |
Remove descriptor from pollset.
- Parameters:
-
| task | the task which holds the pollset |
| descriptor | the descriptor to remove |
Destroy poller task.
- Parameters:
-
Get external object.
- Parameters:
-
| task | the poller task to get object from |
Start poller task and wait for incoming messages.
- Parameters:
-
Terminate poller task.
- Parameters:
-
| task | the task to terminate |
Create timer.
- Parameters:
-
| task | the poller task to create timer in the scope of |
| proc | the timer callback |
| obj | the object to pass to callback |
| pool | the pool to allocate memory from |
Get task vtable.
- Parameters:
-
| task | the poller task to get vtable from |