libcortex
Event loop library following a "batteries included" approach
Loading...
Searching...
No Matches
pipe.h
1#ifndef _CRTX_PIPE_H
2#define _CRTX_PIPE_H
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8/*
9 * Mario Kicherer (dev@kicherer.org) 2018
10 *
11 */
12
13#define CRTX_READ_END (0)
14#define CRTX_WRITE_END (1)
15
17 struct crtx_listener_base base;
18
19 int fds[2];
20 char *event_type;
21
22 crtx_handle_task_t fd_event_handler;
23 void *fd_event_handler_data;
24
25 int fd_flags;
26};
27
28struct crtx_listener_base *crtx_setup_pipe_listener(void *options);
29void crtx_pipe_clear_lstnr(struct crtx_pipe_listener *lstnr);
30CRTX_DECLARE_ALLOC_FUNCTION(pipe)
31
32void crtx_pipe_init();
33void crtx_pipe_finish();
34
35#ifdef __cplusplus
36}
37#endif
38
39#endif
base structure of a listener
Definition core.h:186
Definition pipe.h:16