|
cwist
Modern C web framework with libttak runtime
|
#include <stdbool.h>#include <stddef.h>#include <stdint.h>

Go to the source code of this file.
Classes | |
| struct | cwist_reactor_post |
| struct | cwist_reactor_timer |
Macros | |
| #define | CWIST_REACTOR_PAYLOAD_SIZE 64 |
Typedefs | |
| typedef void(* | cwist_reactor_cb_t) (int fd, void *ctx) |
| typedef struct cwist_reactor | cwist_reactor_t |
| typedef struct cwist_reactor_post | cwist_reactor_post_t |
| typedef struct cwist_reactor_timer | cwist_reactor_timer_t |
| typedef struct cwist_reactor cwist_reactor_t |
| bool cwist_reactor_add | ( | cwist_reactor_t * | reactor, |
| int | fd, | ||
| cwist_reactor_cb_t | cb, | ||
| const void * | payload, | ||
| size_t | payload_size | ||
| ) |
Definition at line 1357 of file reactor.c.
References cap.
Referenced by cwist_async_server_loop(), cwist_reactor_create(), and cwist_websocket_async_attach_ex().
| bool cwist_reactor_add_out | ( | cwist_reactor_t * | reactor, |
| int | fd, | ||
| cwist_reactor_cb_t | cb, | ||
| const void * | payload, | ||
| size_t | payload_size | ||
| ) |
Definition at line 1362 of file reactor.c.
References cap.
Referenced by cwist_http_async_send_response(), cwist_http_coalesce_flush(), cwist_http_send_response_async(), and cwist_http_send_response_coalesced().
| cwist_reactor_t * cwist_reactor_create | ( | void | ) |
Definition at line 1006 of file reactor.c.
References cap, cwist_alloc(), cwist_free(), and cwist_reactor_add().
Referenced by cwist_async_server_loop(), cwist_http_pool_init_mode(), and cwist_webrtc_ctx_new().
| bool cwist_reactor_del | ( | cwist_reactor_t * | reactor, |
| int | fd | ||
| ) |
| void cwist_reactor_destroy | ( | cwist_reactor_t * | reactor | ) |
Definition at line 1116 of file reactor.c.
References cap, and cwist_free().
Referenced by cwist_async_server_loop(), cwist_http_pool_destroy(), cwist_webrtc_ctx_free(), and cwist_webrtc_ctx_new().
| bool cwist_reactor_mod | ( | cwist_reactor_t * | reactor, |
| int | fd, | ||
| cwist_reactor_cb_t | cb, | ||
| const void * | payload, | ||
| size_t | payload_size | ||
| ) |
| bool cwist_reactor_post | ( | cwist_reactor_t * | reactor, |
| cwist_reactor_post_t * | node | ||
| ) |
Definition at line 833 of file reactor.c.
References cap, cwist_reactor_post::cb, head, and cwist_reactor_post::next.
| void cwist_reactor_run | ( | cwist_reactor_t * | reactor | ) |
Definition at line 1579 of file reactor.c.
References cap, cwist_free(), and head.
Referenced by cwist_async_server_loop().
| void cwist_reactor_stop | ( | cwist_reactor_t * | reactor | ) |
| bool cwist_reactor_timer_arm | ( | cwist_reactor_t * | reactor, |
| cwist_reactor_timer_t * | timer, | ||
| uint64_t | delay_us | ||
| ) |
Definition at line 937 of file reactor.c.
References cap, cwist_reactor_timer::cb, cwist_alloc(), cwist_free(), cwist_reactor_timer::deadline_ns, and cwist_reactor_timer::heap_slot.
| bool cwist_reactor_timer_armed | ( | const cwist_reactor_timer_t * | timer | ) |
Definition at line 961 of file reactor.c.
References cwist_reactor_timer::heap_slot.
| void cwist_reactor_timer_cancel | ( | cwist_reactor_t * | reactor, |
| cwist_reactor_timer_t * | timer | ||
| ) |
Definition at line 956 of file reactor.c.
References cwist_reactor_timer::heap_slot.
| void cwist_reactor_timer_init | ( | cwist_reactor_timer_t * | timer, |
| void(*)(void *ctx) | cb, | ||
| void * | ctx | ||
| ) |
Definition at line 929 of file reactor.c.
References cwist_reactor_timer::cb, cwist_reactor_timer::ctx, cwist_reactor_timer::deadline_ns, and cwist_reactor_timer::heap_slot.