Lines Matching full:events

43   remove events dynamically without having to change the event loop.
79 keeping track of which events are "pending" (that is to say, being
80 watched to see if they become active) and which events are "active".
89 of monitored events by calling event_add(). The event structure must
93 @section loop Dispatching events.
95 Finally, you call event_base_dispatch() to loop and dispatch events.
99 time. If you want to run events in multiple threads at once, you can
100 either have a single event_base whose events add work to a work queue,
182 Core functions for waiting for and receiving events, and using event bases.
208 * have one. It keeps track of all pending and active events, and
233 * Generally, you can create events with event_new(), then make them
235 * callbacks of an events whose conditions are triggered. When you no
242 * to run), neither, or both. Events come into existence via
248 * Events become active during an event_base_loop() call when either their
251 * loop will run the callbacks of active events; after it has done so, it
257 * Events can be "persistent" or "non-persistent". A non-persistent event
263 * events to implement periodic timeouts.
305 * failure. Note that this method MUST be called before any events or
316 * to use event_debug_unassign to explicitly stop tracking events that
353 @return 0 if successful, or -1 if some events could not be re-added.
369 no events were pending or active.
408 Flags to pass to event_base_get_num_events() to specify the kinds of events
412 /** count the number of active events, which have been triggered.*/
414 /** count the number of virtual events, which is used to represent an internal
417 /** count the number of events which have been added to event base, including
418 * internal events. */
423 Gets the number of events in event_base, as specified in the flags.
425 Since event base has some internal events added to make some of its
427 number of events you added using event_add().
436 @param flags a bitwise combination of the kinds of events to aggregate
438 @return the number of events specified in the flags
444 Get the maximum number of events in a given event_base as specified in the
448 @param flags a bitwise combination of the kinds of events to aggregate
451 @return the number of events specified in the flags
502 /** Require an event method that allows edge-triggered events with EV_ET. */
507 * equal to the total number of possible events. */
634 * should check for new events. By default, the event base will run as many
635 * events are as activated at the highest activated priority before checking
636 * for new events. If you configure it by setting max_interval, it will check
638 * elapse before checking for new events. If you configure it by setting
640 * callbacks before checking for new events.
642 * This option can decrease the latency of high-priority events, and
643 * avoid priority inversions where multiple low-priority events keep us from
644 * polling for high-priority events, but at the expense of slightly decreasing
649 * callbacks and check for more events, or NULL if there should be
652 * stop running callbacks and check for more events, or -1 if there
656 * for events of every priority; if it's set to 1, they're enforced
657 * for events of priority 1 and above, and so on.
673 @return an initialized event_base that can be used to registering events,
794 /** Block until we have an active event, then exit once all active events
797 /** Do not block: see which events are ready now, run the callbacks
800 /** Do not exit the loop because we have no pending events. Instead, keep
808 Wait for events to become active, and run their callbacks.
813 pending or active events, or until something calls event_base_loopbreak() or
821 no events were pending or active.
832 complete normally (handling all queued events) then exit without
833 blocking for events again.
839 or NULL to exit after running all currently active events.
863 Tell the active event_base_loop() to scan for new events immediately.
866 start the loop over again (scanning for new events) after the current
916 * anything else with an argument of the form "short events"
947 * Detects connection close events. You can use this to detect when a
960 Aliases for working with one-shot timer events
976 Aliases for working with signal events
992 Aliases for working with user-triggered events
1009 @param events One or more EV_* flags
1027 struct event *ev = event_new(base, sock, events, callback, %event_self_cbarg());
1045 future calls to event_add() and event_del(). The fd and events
1050 If events contains one of EV_READ, EV_WRITE, or EV_READ|EV_WRITE, then
1053 (respectively). If events contains EV_SIGNAL, then fd is a signal
1054 number to wait for. If events contains none of those flags, then the
1058 The EV_PERSIST flag can also be passed in the events argument: it makes
1063 events.
1067 It is okay to have multiple events all listening on the same fds; but
1072 fd value. The second will be a bitfield of the events that triggered:
1080 @param events desired events to monitor: bitfield of EV_READ, EV_WRITE,
1116 The arguments for this function, and the behavior of the events that it
1122 @param events desired events to monitor; can be EV_READ and/or EV_WRITE
1151 application. If you construct your events with EV_FINALIZE to avoid
1171 A finalizer callback must not make events pending or active. It must not
1172 add events, activate events, or attempt to "resuscitate" the event being
1199 @param events event(s) to monitor; can be any of EV_READ |
1212 Add an event to the set of pending events.
1248 Remove an event from the set of monitored events.
1297 @param events the requested event type; any of EV_TIMEOUT|EV_READ|
1303 @return true if the event is pending on any of the events in 'what', (that
1307 int event_pending(const struct event *ev, short events, struct timeval *tv);
1355 Return the events (EV_READ, EV_WRITE, etc) assigned to an event.
1444 By default Libevent schedules all active events with the same priority.
1445 However, some time it is desirable to process some events with a higher
1447 queues. Active events with a lower priority are always processed before
1448 events with a higher priority.
1454 event. By default, Libevent assigns the middle priority to all events
1457 Note that urgent-priority events can starve less-urgent events: after
1459 events again, before running less-urgent events. Less-urgent events
1460 will not have their callbacks run until there are no events more urgent
1509 or tens of thousands of events with the same timeout.)
1550 events to a provided stdio stream.
1555 @param base An event_base on which to scan the events.
1563 Activates all pending events for the given fd and event mask.
1565 This function activates pending events only. Events which have not been
1568 @param base the event_base on which to activate the events.
1569 @param fd An fd to active events on.
1570 @param events One or more of EV_{READ,WRITE,TIMEOUT}.
1573 void event_base_active_by_fd(struct event_base *base, evutil_socket_t fd, short events);
1578 This function activates pending events only. Events which have not been
1581 @param base the event_base on which to activate the events.
1582 @param fd The signal 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
1604 Note that Libevent adds some events of its own to make pieces of its
1605 functionality work. You must not assume that the only events you'll
1611 @param base An event_base on which to scan the events.
1612 @param fn A callback function to receive the events.
1654 event_bases, events, bufferevents, listeners, and so on. It only releases