equal
deleted
inserted
replaced
13 #include <event2/event.h> |
13 #include <event2/event.h> |
14 #include <stdbool.h> |
14 #include <stdbool.h> |
15 |
15 |
16 // forward-declare |
16 // forward-declare |
17 struct transport_fd; |
17 struct transport_fd; |
|
18 |
|
19 /** |
|
20 * Our transport_type |
|
21 */ |
|
22 extern const struct transport_type transport_fd_type; |
18 |
23 |
19 /** |
24 /** |
20 * Low-level callback |
25 * Low-level callback |
21 */ |
26 */ |
22 typedef void (*transport_fd_callback_func) (struct transport_fd *fd, short what, void *arg); |
27 typedef void (*transport_fd_callback_func) (struct transport_fd *fd, short what, void *arg); |
74 * |
79 * |
75 * For TRANSPORT_WRITE, the write event will only be enabled if given in the mask, *and* the ev_write event is currently |
80 * For TRANSPORT_WRITE, the write event will only be enabled if given in the mask, *and* the ev_write event is currently |
76 * active (via transport_fd_methods_write()); otherwise, the write event will not be enabled. |
81 * active (via transport_fd_methods_write()); otherwise, the write event will not be enabled. |
77 */ |
82 */ |
78 err_t transport_fd_methods_events (transport_t *transport, short mask, error_t *err); |
83 err_t transport_fd_methods_events (transport_t *transport, short mask, error_t *err); |
79 |
|
80 /** |
|
81 * The transport_methods struct |
|
82 */ |
|
83 extern const struct transport_methods transport_fd_methods; |
|
84 |
84 |
85 /** |
85 /** |
86 * A transport_fd_callback_func that simply invokes the transport_callback user functions. |
86 * A transport_fd_callback_func that simply invokes the transport_callback user functions. |
87 * |
87 * |
88 * Register with a NULL cb_arg. |
88 * Register with a NULL cb_arg. |