libwebsockets
Lightweight C library for HTML5 websockets
|
#include <lws-threadpool.h>
Data Fields | |
struct lws * | wsi |
void * | user |
const char * | name |
char | async_task |
enum lws_threadpool_task_return(* | task )(void *user, enum lws_threadpool_task_status s) |
void(* | cleanup )(struct lws *wsi, void *user) |
Definition at line 73 of file lws-threadpool.h.
struct lws* lws_threadpool_task_args::wsi |
either wsi or ss must be set
Definition at line 77 of file lws-threadpool.h.
void* lws_threadpool_task_args::user |
user may set (user-private pointer)
Definition at line 79 of file lws-threadpool.h.
const char* lws_threadpool_task_args::name |
user may set to describe task
Definition at line 80 of file lws-threadpool.h.
char lws_threadpool_task_args::async_task |
set to allow the task to shrug off the loss of the associated wsi and continue to completion
Definition at line 81 of file lws-threadpool.h.
enum lws_threadpool_task_return(* lws_threadpool_task_args::task) (void *user, enum lws_threadpool_task_status s) |
user must set to actual task function
Definition at line 81 of file lws-threadpool.h.
socket lifecycle may end while task is not stoppable, so the task must be able to detach from any wsi and clean itself up when it does stop. If NULL, no cleanup necessary, otherwise point to a user- supplied function that destroys the stuff in user
.
wsi may be NULL on entry, indicating the task got detached due to the wsi closing before.
Definition at line 87 of file lws-threadpool.h.