24#ifndef EVENT2_WATCH_H_INCLUDED_
25#define EVENT2_WATCH_H_INCLUDED_
43#include <event2/visibility.h>
47struct evwatch_prepare_cb_info;
48struct evwatch_check_cb_info;
59typedef void (*
evwatch_prepare_cb)(
struct evwatch *,
const struct evwatch_prepare_cb_info *,
void *);
69typedef void (*
evwatch_check_cb)(
struct evwatch *,
const struct evwatch_check_cb_info *,
void *);
Structure to hold information and state for a Libevent dispatch loop.
Definition event.h:221
void(* evwatch_check_cb)(struct evwatch *, const struct evwatch_check_cb_info *, void *)
Check callback, invoked by event_base_loop immediately after polling for I/O and before processing an...
Definition watch.h:69
EVENT2_EXPORT_SYMBOL int evwatch_prepare_get_timeout(const struct evwatch_prepare_cb_info *info, struct timeval *timeout)
Get the timeout (the expected polling duration) passed to the underlying implementation's dispatch.
EVENT2_EXPORT_SYMBOL struct evwatch * evwatch_check_new(struct event_base *base, evwatch_check_cb callback, void *arg)
Register a new "check" watcher, to be called in the event loop after polling for events and before ha...
EVENT2_EXPORT_SYMBOL struct event_base * evwatch_base(struct evwatch *watcher)
Get the event_base that a given evwatch is registered with.
EVENT2_EXPORT_SYMBOL struct evwatch * evwatch_prepare_new(struct event_base *base, evwatch_prepare_cb callback, void *arg)
Register a new "prepare" watcher, to be called in the event loop prior to polling for events.
EVENT2_EXPORT_SYMBOL void evwatch_free(struct evwatch *watcher)
Deregister and deallocate a watcher.
void(* evwatch_prepare_cb)(struct evwatch *, const struct evwatch_prepare_cb_info *, void *)
Prepare callback, invoked by event_base_loop immediately before polling for I/O.
Definition watch.h:59