Lines Matching full:an
35 Libevent is an event notification library for developing scalable network
42 servers. An application just needs to call event_base_dispatch() and then add or
51 the most scalable event notification mechanism available on an operating
75 @section base Creating an event base
77 Next, you need to create an event_base structure, using event_base_new()
85 For each file descriptor that you wish to monitor, you must create an
86 event structure with event_new(). (You may also declare an event
128 an event struct to use as a timer. To activate the timer, call
135 Libevent provides an asynchronous DNS resolver that should be used instead
173 An embedded libevent-based HTTP server
211 * This is an opaque structure; you can allocate one using
228 * An event can have some underlying condition it represents: a socket
230 * (An event that represents no underlying condition is still useful: you
235 * callbacks of an events whose conditions are triggered. When you no
240 * An event may be "pending" (one whose condition we are watching),
245 * To make an event pending, pass it to event_add(). When doing so, you
248 * Events become active during an event_base_loop() call when either their
250 * also activate an event manually using event_active(). The even_base
254 * You can make an event non-pending by passing it to event_del(). This
265 * This should be treated as an opaque structure; you should never read or
283 * Configuration for an event_base.
286 * implementation of an event_base. To avoid having to pass them all in a
287 * complex many-argument constructor, we provide an abstract data type
304 * would otherwise crash mysteriously to fail earlier with an assertion
309 * An event is re-assigned while it is added
325 * When debugging mode is enabled, informs Libevent that an event should no
368 @return 0 if successful, -1 if an error occurred, or 1 if we exited because
392 @return an array with pointers to the names of support methods.
393 The end of the array is indicated by a NULL pointer. If an
414 /** count the number of virtual events, which is used to represent an internal
429 If you pass EVENT_BASE_COUNT_ACTIVE and EVENT_BASE_COUNT_ADDED together, an
431 future libevent versions. The return value is an indication of the work
460 an event base.
462 @return an event_config object that can be used to store configuration, or
463 NULL if an error is encountered.
470 Deallocates all memory associated with an event configuration object
478 Enters an event method that should be avoided into the configuration.
482 mechanisms. An application can make use of multiple event bases to
493 A flag used to describe which features an event_base (must) provide.
502 /** Require an event method that allows edge-triggered events with EV_ET. */
504 /** Require an event method where having one event triggered among
505 * many is [approximately] an O(1) operation. This excludes (for
509 /** Require an event method that allows file descriptors as well as
512 /** Require an event method that allows you to use EV_CLOSED to detect
524 These flags change the behavior of an allocated event_base.
538 an event_base */
577 Return a bitmask of the features implemented by an event base. This
633 * Record an interval and/or a number of callbacks after which the event base
648 * @param max_interval An interval after which Libevent should stop running
673 @return an initialized event_base that can be used to registering events,
681 Deallocate all memory associated with an event_base, and free the base.
689 @param eb an event_base to be freed
725 @param cb a function taking two arguments: an integer severity between
751 Libevent will (almost) always log an EVENT_LOG_ERR message before calling
764 before any calls that create an event-base. You must call it before any
778 Associate a different event base with an event.
794 /** Block until we have an active event, then exit once all active events
820 @return 0 if successful, -1 if an error occurred, or 1 if we exited because
840 @return 0 if successful, or -1 if an error occurred
856 @return 0 if successful, or -1 if an error occurred
876 @return 0 if successful, or -1 if an error occurred
885 This function will return true for an event_base at every point after
900 This function will return true for an event_base at every point after
916 * anything else with an argument of the form "short events"
942 * event_free_finalize() in order to safely tear down an event in a
1004 A callback function for an event.
1008 @param fd An fd or signal
1074 that a timeout occurred, and EV_ET indicates that an edge-triggered
1083 @param callback_arg an argument to be passed to the callback function
1086 event_free() or NULL if an error occurred.
1107 event_get_struct_event_size() to determine the required size of an event
1110 Note that it is NOT safe to call this function on an event that is
1113 event_assign to change an existing event, but only if it is not active
1119 @param ev an event struct to be modified
1124 @param callback_arg an argument to be passed to the callback function
1150 These functions are used to safely tear down an event in a multithreaded
1152 deadlocks, you will need a way to remove an event in the certainty that
1189 caller to prepare an event structure.
1197 @param base an event_base
1202 @param arg an argument to be passed to the callback function
1204 makes an EV_READ/EV_WRITE event make forever; NULL makes an
1206 @return 0 if successful, or -1 if an error occurred
1212 Add an event to the set of pending events.
1226 @param ev an event struct initialized via event_assign() or event_new()
1229 @return 0 if successful, or -1 if an error occurred
1241 @param ev an event struct initialized via event_assign() or event_new()
1242 @return 0 on success, or -1 if an error occurred.
1248 Remove an event from the set of monitored events.
1254 @param ev an event struct to be removed from the working set
1255 @return 0 if successful, or -1 if an error occurred
1277 Make an event active.
1286 @param ev an event to make active.
1288 @param ncalls an obsolete argument: this is ignored.
1296 @param ev an event struct previously passed to event_add()
1310 If called from within the callback for an event, returns that event.
1313 callback function for an event.
1319 Test if an event structure might be initialized.
1321 The event_initialized() function can be used to check if an event has been
1325 piece of memory from an initialized event, it can easily be confused by
1326 uninitialized memory. Thus, it should ONLY be used to distinguish an
1329 @param ev an event structure to be tested
1342 Get the socket or signal assigned to an event, or -1 if the event has
1349 Get the event_base associated with an event.
1355 Return the events (EV_READ, EV_WRITE, etc) assigned to an event.
1361 Return the callback assigned to an event.
1367 Return the callback argument assigned to an event.
1373 Return the priority of an event.
1453 event_priority_set() function can be used to assign a priority to an
1465 @return 0 if successful, or -1 if an error occurred
1482 Assign a priority to an event.
1484 @param ev an event struct
1486 @return 0 if successful, or -1 if an error occurred
1493 Prepare an event_base to use a large number of timeouts with the same
1555 @param base An event_base on which to scan the events.
1569 @param fd An fd to active events on.
1588 * Callback for iterating events in an event base via event_base_foreach_event
1593 Iterate over all added or active events events in an event loop, and invoke
1611 @param base An event_base on which to scan the events.
1613 @param arg An argument passed to the callback function.