1 #ifndef PROTON_SELECTABLE_H 2 #define PROTON_SELECTABLE_H 1 PN_EXTERN pn_socket_t pn_selectable_get_fd(pn_selectable_t *selectable)
Get the file descriptor associated with a selectable.
PN_EXTERN bool pn_selectable_is_terminal(pn_selectable_t *selectable)
Check if a selectable is in the terminal state.
PN_EXTERN void pn_selectable_error(pn_selectable_t *selectable)
Notify a selectable that there is an error on the file descriptor.
PN_EXTERN bool pn_selectable_is_registered(pn_selectable_t *selectable)
Check if a selectable is registered.
PN_EXTERN pn_selectable_t * pn_selectable(void)
PN_EXTERN pn_selectable_t * pn_selectables_next(pn_selectables_t *selectables)
Get the next selectable from an iterator.
struct pn_record_t pn_record_t
Definition: object.h:46
PN_EXTERN void pn_selectable_set_deadline(pn_selectable_t *sel, pn_timestamp_t deadline)
PN_EXTERN pn_timestamp_t pn_selectable_get_deadline(pn_selectable_t *selectable)
Get the next deadline for a selectable.
PN_EXTERN void pn_selectable_collect(pn_selectable_t *selectable, pn_collector_t *collector)
Configure a selectable with a set of callbacks that emit readable, writable, and expired events into ...
PN_EXTERN void pn_selectable_free(pn_selectable_t *selectable)
Free a selectable object.
PN_EXTERN void pn_selectable_expired(pn_selectable_t *selectable)
Notify a selectable that its deadline has expired.
PN_EXTERN void pn_selectable_terminate(pn_selectable_t *selectable)
Terminate a selectable.
PN_EXTERN void pn_selectable_set_reading(pn_selectable_t *sel, bool reading)
PN_EXTERN pn_record_t * pn_selectable_attachments(pn_selectable_t *sel)
#define PN_EXTERN
Definition: import_export.h:53
PN_EXTERN pn_selectables_t * pn_selectables(void)
Construct a new selectables iterator.
struct pn_collector_t pn_collector_t
An event collector.
Definition: types.h:244
PN_EXTERN void pn_selectable_set_writing(pn_selectable_t *sel, bool writing)
PN_EXTERN void pn_selectable_on_finalize(pn_selectable_t *sel, void(*finalize)(pn_selectable_t *))
PN_EXTERN void pn_selectable_set_fd(pn_selectable_t *selectable, pn_socket_t fd)
Set the file descriptor associated with a selectable.
PN_EXTERN void pn_selectable_on_readable(pn_selectable_t *sel, void(*readable)(pn_selectable_t *))
PN_EXTERN void pn_selectable_set_registered(pn_selectable_t *selectable, bool registered)
Set the registered flag for a selectable.
PN_EXTERN void pn_selectables_free(pn_selectables_t *selectables)
Free a selectables iterator.
int pn_socket_t
A pn_socket_t provides an abstract handle to an IO stream.
Definition: io.h:58
PN_EXTERN bool pn_selectable_is_reading(pn_selectable_t *selectable)
Check if a selectable is interested in readable events.
PN_EXTERN void pn_selectable_on_expired(pn_selectable_t *sel, void(*expired)(pn_selectable_t *))
PN_EXTERN void pn_selectable_release(pn_selectable_t *selectable)
PN_EXTERN void pn_selectable_writable(pn_selectable_t *selectable)
Notify a selectable that the file descriptor is writable.
Event API for the proton Engine.
int64_t pn_timestamp_t
Definition: types.h:50
PN_EXTERN void pn_selectable_readable(pn_selectable_t *selectable)
Notify a selectable that the file descriptor is readable.
PN_EXTERN void pn_selectable_on_release(pn_selectable_t *sel, void(*release)(pn_selectable_t *))
pn_iterator_t pn_selectables_t
An iterator for selectables.
Definition: selectable.h:48
PN_EXTERN void pn_selectable_on_writable(pn_selectable_t *sel, void(*writable)(pn_selectable_t *))
PN_EXTERN bool pn_selectable_is_writing(pn_selectable_t *selectable)
Check if a selectable is interested in writable events.
struct pn_iterator_t pn_iterator_t
Definition: object.h:45
struct pn_selectable_t pn_selectable_t
A selectable object provides an interface that can be used to incorporate proton's I/O into third par...
Definition: selectable.h:68
PN_EXTERN void pn_selectable_on_error(pn_selectable_t *sel, void(*error)(pn_selectable_t *))