libonion
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Member Functions | Data Fields

Manages the polling on a set of file descriptors. More...

#include <types.h>

Public Member Functions

onion_polleronion_poller_new (int n)
 Returns a poller object that helps polling on sockets and files.
void onion_poller_free (onion_poller *p)
int onion_poller_add (onion_poller *poller, onion_poller_slot *el)
 Adds a file descriptor to poll.
int onion_poller_remove (onion_poller *poller, int fd)
 Removes a file descriptor, and all related callbacks from the listening queue.
void onion_poller_poll (onion_poller *p)
 Do the event polling.
void onion_poller_stop (onion_poller *p)
 Marks the poller to stop ASAP.

Data Fields

int fd
int eventfd
 fd to signal internal changes on poller.
int timerfd
 fd to set up timeouts
time_t current_timeout_limit
 Currently set limit in seconds.
int n
char stop
onion_poller_slothead
struct ev_loop * loop
sem_t sem
volatile int stop
struct event_base * base

Detailed Description

Manages the polling on a set of file descriptors.

Member Function Documentation

void onion_poller_free ( onion_poller p)

Field Documentation

struct event_base* onion_poller_t::base
time_t onion_poller_t::current_timeout_limit

Currently set limit in seconds.

int onion_poller_t::eventfd

fd to signal internal changes on poller.

Referenced by onion_poller_free(), onion_poller_new(), and onion_poller_stop().

int onion_poller_t::fd
onion_poller_slot* onion_poller_t::head
struct ev_loop* onion_poller_t::loop
int onion_poller_t::n
sem_t onion_poller_t::sem
volatile int onion_poller_t::stop
volatile int onion_poller_t::stop
int onion_poller_t::timerfd

fd to set up timeouts

Referenced by onion_poller_free(), and onion_poller_new().


The documentation for this struct was generated from the following files: