1#ifndef CONCORD_IO_POLLER_H
2#define CONCORD_IO_POLLER_H
io_poller_events
The flags to poll for.
Definition: io_poller.h:10
@ IO_POLLER_IN
Definition: io_poller.h:11
@ IO_POLLER_OUT
Definition: io_poller.h:12
int io_poller_perform(struct io_poller *io)
performs any actions needed and clears events set by io_poller_poll
void io_poller_destroy(struct io_poller *io)
bool io_poller_socket_del(struct io_poller *io, io_poller_socket sock)
removes a socket or file descriptor from watch list
bool io_poller_socket_add(struct io_poller *io, io_poller_socket sock, enum io_poller_events events, io_poller_cb cb, void *user_data)
adds or modifies a socket or file descriptor to watch list
bool io_poller_curlm_enable_perform(struct io_poller *io, CURLM *multi)
this multi should be performed on next cycle causing poll to return immediately
void(* io_poller_cb)(struct io_poller *io, enum io_poller_events events, void *user_data)
callback for when an event is triggered by the socket
Definition: io_poller.h:28
int io_poller_poll(struct io_poller *io, int milliseconds)
wait for events to be triggered
struct io_poller * io_poller_create(void)
int(* io_poller_curl_cb)(struct io_poller *io, CURLM *multi, void *user_data)
callback for when curl multi should be performed on
Definition: io_poller.h:84
void io_poller_wakeup(struct io_poller *io)
wakeup the thread listening to this io_poller
int io_poller_socket
a socket or file descriptor
Definition: io_poller.h:18
bool io_poller_curlm_del(struct io_poller *io, CURLM *multi)
remove curl multi from watch list
bool io_poller_curlm_add(struct io_poller *io, CURLM *multi, io_poller_curl_cb cb, void *user_data)
add or modifies a curl multi to watch list