1 #ifndef ACL_IOCTL_INCLUDE_H 2 #define ACL_IOCTL_INCLUDE_H 8 #include "../stdlib/acl_define.h" 9 #include "../event/acl_events.h" 10 #include "../stdlib/acl_vstream.h" 54 int idle_timeout,
int delay_sec,
int delay_usec);
70 #define ACL_IOCTL_CTL_END 0 71 #define ACL_IOCTL_CTL_THREAD_MAX 1 72 #define ACL_IOCTL_CTL_THREAD_IDLE 2 73 #define ACL_IOCTL_CTL_DELAY_SEC 3 74 #define ACL_IOCTL_CTL_DELAY_USEC 4 75 #define ACL_IOCTL_CTL_INIT_FN 5 76 #define ACL_IOCTL_CTL_EXIT_FN 6 77 #define ACL_IOCTL_CTL_INIT_CTX 7 78 #define ACL_IOCTL_CTL_EXIT_CTX 8 79 #define ACL_IOCTL_CTL_THREAD_STACKSIZE 9 252 int block_mode,
int io_bufsize,
int io_timeout);
263 char *ipbuf,
int size);
HTTP_API void const char * name
ACL_API int acl_ioctl_add(ACL_IOCTL *ioc, ACL_IOCTL_WORKER_FN callback, void *arg)
ACL_API void acl_ioctl_enable_write(ACL_IOCTL *ioc, ACL_VSTREAM *stream, int timeout, ACL_IOCTL_NOTIFY_FN callback, void *context)
ACL_API ACL_VSTREAM * acl_ioctl_listen(const char *addr, int qlen)
ACL_API void acl_ioctl_disable_read(ACL_IOCTL *ioc, ACL_VSTREAM *stream)
void(* ACL_IOCTL_THREAD_INIT_FN)(void *)
void(* ACL_IOCTL_NOTIFY_FN)(int event_type, ACL_IOCTL *ioc, ACL_VSTREAM *stream, void *context)
void(* ACL_IOCTL_WORKER_FN)(ACL_IOCTL *ioc, void *arg)
struct ACL_IOCTL ACL_IOCTL
ACL_API ACL_EVENT * acl_ioctl_event(ACL_IOCTL *ioc)
ACL_API ACL_IOCTL * acl_ioctl_create(int max_threads, int idle_timeout)
void(* ACL_IOCTL_THREAD_EXIT_FN)(void *)
ACL_API void acl_ioctl_loop(ACL_IOCTL *ioc)
ACL_API acl_int64 acl_ioctl_cancel_timer(ACL_IOCTL *ioc, ACL_EVENT_NOTIFY_TIME timer_fn, void *context)
ACL_API int acl_ioctl_isrset(ACL_IOCTL *ioc, ACL_VSTREAM *stream)
ACL_API ACL_VSTREAM * acl_ioctl_connect(const char *addr, int timeout)
ACL_API int acl_ioctl_isset(ACL_IOCTL *ioc, ACL_VSTREAM *stream)
ACL_API void acl_ioctl_enable_listen(ACL_IOCTL *ioc, ACL_VSTREAM *stream, int timeout, ACL_IOCTL_NOTIFY_FN callback, void *context)
ACL_API void acl_ioctl_disable_readwrite(ACL_IOCTL *ioc, ACL_VSTREAM *stream)
ACL_API int acl_ioctl_nworker(ACL_IOCTL *ioc)
ACL_API void acl_ioctl_free(ACL_IOCTL *ioc)
ACL_API void acl_ioctl_disable_write(ACL_IOCTL *ioc, ACL_VSTREAM *stream)
ACL_API int acl_ioctl_start(ACL_IOCTL *ioc)
ACL_API ACL_VSTREAM * acl_ioctl_listen_ex(const char *addr, int qlen, int block_mode, int io_bufsize, int io_timeout)
ACL_API void acl_ioctl_ctl(ACL_IOCTL *ioc, int name,...)
ACL_API void acl_ioctl_enable_connect(ACL_IOCTL *ioc, ACL_VSTREAM *stream, int timeout, ACL_IOCTL_NOTIFY_FN callback, void *context)
ACL_API acl_int64 acl_ioctl_request_timer(ACL_IOCTL *ioc, ACL_EVENT_NOTIFY_TIME timer_fn, void *context, acl_int64 idle_limit)
struct ACL_EVENT ACL_EVENT
ACL_API int acl_ioctl_iswset(ACL_IOCTL *ioc, ACL_VSTREAM *stream)
ACL_API int acl_ioctl_iocp_close(ACL_IOCTL *ioc, ACL_VSTREAM *stream)
ACL_API ACL_VSTREAM * acl_ioctl_accept(ACL_VSTREAM *sstream, char *ipbuf, int size)
ACL_API ACL_IOCTL * acl_ioctl_create_ex(int event_mode, int max_threads, int idle_timeout, int delay_sec, int delay_usec)
ACL_API void acl_ioctl_add_dog(ACL_IOCTL *ioc)
ACL_API void acl_ioctl_enable_read(ACL_IOCTL *ioc, ACL_VSTREAM *stream, int timeout, ACL_IOCTL_NOTIFY_FN callback, void *context)
void(* ACL_EVENT_NOTIFY_TIME)(int event_type, ACL_EVENT *event, void *context)