libwebsockets
Lightweight C library for HTML5 websockets
lws_threadpool_task_args Struct Reference

#include <lws-threadpool.h>

+ Collaboration diagram for lws_threadpool_task_args:

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)
 

Detailed Description

Definition at line 73 of file lws-threadpool.h.

Field Documentation

◆ wsi

struct lws* lws_threadpool_task_args::wsi

either wsi or ss must be set

Definition at line 77 of file lws-threadpool.h.

◆ user

void* lws_threadpool_task_args::user

user may set (user-private pointer)

Definition at line 79 of file lws-threadpool.h.

◆ name

const char* lws_threadpool_task_args::name

user may set to describe task

Definition at line 80 of file lws-threadpool.h.

◆ async_task

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.

◆ task

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.

◆ cleanup

void(* lws_threadpool_task_args::cleanup) (struct lws *wsi, void *user)

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.


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