Lines Matching +full:non +full:- +full:active

2  * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
3 * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
58 header, and pass the -levent flag to the linker. (You can instead link
59 -levent_core if you only want the main event and buffered IO-based code,
66 multithreaded application, you need to initialize thread support --
80 watched to see if they become active) and which events are "active".
90 remain allocated as long as it is active, so it should generally be
96 You can also use event_base_loop() for more fine-grained control.
139 @section evhttp Event-driven HTTP servers
141 Libevent provides a very simple event-driven HTTP server that can be
173 An embedded libevent-based HTTP server
191 #include <event2/event-config.h>
208 * have one. It keeps track of all pending and active events, and
209 * notifies your application of the active ones.
241 * "active" (one whose condition has triggered and whose callback is about
243 * event_assign() or event_new(), and are then neither active nor pending.
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
252 * marks them as no longer active.
254 * You can make an event non-pending by passing it to event_del(). This
255 * also makes the event non-active.
257 * Events can be "persistent" or "non-persistent". A non-persistent event
258 * becomes non-pending as soon as it is triggered: thus, it only runs at
260 * even when it becomes active: you'll need to event_del() it manually in
261 * order to make it non-pending. When a persistent event with a timeout
262 * becomes active, its timeout is reset: this means you can use persistent
287 * complex many-argument constructor, we provide an abstract data type
309 * An event is re-assigned while it is added
310 * Any function is called on a non-assigned event
317 * are no longer considered set-up.
329 * This function must only be called on a non-added event.
352 @param base the event base that needs to be re-initialized
353 @return 0 if successful, or -1 if some events could not be re-added.
363 active, or until something calls event_base_loopbreak() or
368 @return 0 if successful, -1 if an error occurred, or 1 if we exited because
369 no events were pending or active.
389 Libevent has compiled-in support for, and will not necessarily check
412 /** count the number of active events, which have been triggered.*/
430 active event will be counted twice. However, this might not be the case in
487 @return 0 on success, -1 on failure.
502 /** Require an event method that allows edge-triggered events with EV_ET. */
543 evconn_listener_new() will use IOCP-backed implementations
544 instead of the usual select-based one on Windows.
553 safe to use Libevent's internal change-list code to batch up
558 will produce strange and hard-to-diagnose bugs.
596 // We can't get edge-triggered behavior here.
605 @return 0 on success, -1 on failure.
627 * @return 0 on success, -1 on failure.
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
652 * stop running callbacks and check for more events, or -1 if there
658 * @return 0 on success, -1 on failure.
710 * They violate the reserved-identifier namespace. */
764 before any calls that create an event-base. You must call it before any
780 The event to be associated must not be currently active or pending.
784 @return 0 on success, -1 on failure.
794 /** Block until we have an active event, then exit once all active events
798 * of the highest-priority ones, then exit. */
808 Wait for events to become active, and run their callbacks.
813 pending or active events, or until something calls event_base_loopbreak() or
820 @return 0 if successful, -1 if an error occurred, or 1 if we exited because
821 no events were pending or active.
839 or NULL to exit after running all currently active events.
840 @return 0 if successful, or -1 if an error occurred
847 Abort the active event_base_loop() immediately.
856 @return 0 if successful, or -1 if an error occurred
863 Tell the active event_base_loop() to scan for new events immediately.
865 Calling this function makes the currently active event_base_loop()
876 @return 0 if successful, or -1 if an error occurred
935 /** Select edge-triggered behavior, if supported by the backend. */
960 Aliases for working with one-shot timer events
965 event_assign((ev), (b), -1, 0, (cb), (arg))
966 #define evtimer_new(b, cb, arg) event_new((b), -1, 0, (cb), (arg))
992 Aliases for working with user-triggered events
996 #define evuser_new(b, cb, arg) event_new((b), -1, 0, (cb), (arg))
1010 @param arg A user-supplied argument.
1048 event becomes active.
1056 event_active(): In this case, fd must be -1.
1062 only by certain backends. It tells Libevent to use edge-triggered
1068 they must either all be edge-triggered, or all not be edge triggered.
1070 When the event becomes active, the event loop will run the provided
1074 that a timeout occurred, and EV_ET indicates that an edge-triggered
1079 @param fd the file descriptor or signal to be monitored, or -1.
1094 Prepare a new, already-allocated event structure to be added.
1106 A slightly harder way to future-proof your code is to use
1111 active or pending. Doing so WILL corrupt internal data structures in
1112 Libevent, and lead to strange, hard-to-diagnose bugs. You _can_ use
1113 event_assign to change an existing event, but only if it is not active
1126 @return 0 if success, or -1 on invalid arguments.
1137 If the event is pending or active, this function makes it non-pending
1138 and non-active first.
1162 no longer work on the event, and event_del() will produce a no-op. You
1171 A finalizer callback must not make events pending or active. It must not
1175 @return 0 on success, -1 on failure.
1185 Schedule a one-time event
1195 case--you'll need to free that on your own if you want it to go away.
1198 @param fd a file descriptor to monitor, or -1 for no fd.
1206 @return 0 if successful, or -1 if an error occurred
1224 event_add() replaces the old timeout with the new one if tv is non-NULL.
1229 @return 0 if successful, or -1 if an error occurred
1242 @return 0 on success, or -1 if an error occurred.
1255 @return 0 if successful, or -1 if an error occurred
1277 Make an event active.
1279 You can use this function on a pending or a non-pending event to make it
1280 active, so that its callback will be run by event_base_dispatch() or
1286 @param ev an event to make active.
1324 Warning: This function is only useful for distinguishing a zeroed-out
1342 Get the socket or signal assigned to an event, or -1 if the event has
1401 We might do this to help ensure ABI-compatibility between different
1427 the version number. The low-order byte is unused. For example, version
1428 2.0.1-alpha has a numeric representation of 0x02000100
1444 By default Libevent schedules all active events with the same priority.
1447 queues. Active events with a lower priority are always processed before
1457 Note that urgent-priority events can starve less-urgent events: after
1458 running all urgent-priority callbacks, Libevent checks for more urgent
1459 events again, before running less-urgent events. Less-urgent events
1461 than them that want to be active.
1465 @return 0 if successful, or -1 if an error occurred
1486 @return 0 if successful, or -1 if an error occurred
1500 connections that all have a 10-second timeout), then you can improve
1549 Writes a human-readable description of all inserted and/or active
1566 added will not become active.
1569 @param fd An fd to active events on.
1579 added will not become active.
1582 @param fd The signal to active events on.
1593 Iterate over all added or active events events in an event loop, and invoke
1599 behavior -- likely, to crashes.
1646 * @return 0 on success, -1 on failure
1651 /** Release up all globally-allocated resources allocated by Libevent.
1653 This function does not free developer-controlled resources like
1659 so that resource-leak debugging tools don't see Libevent as holding
1663 be invoked -- e.g., when cleanly exiting a program.