Lines Matching +full:config +full:- +full:complete +full:- +full:timeout +full:- +full:us

2  * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
3 * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
38 timeout has been reached. Furthermore, Libevent also support callbacks due
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 --
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
154 To browse the complete documentation of the libevent API, click on any of
173 An embedded libevent-based HTTP server
191 #include <event2/event-config.h>
246 * can also set a timeout for the event.
249 * condition has triggered, or when their timeout has elapsed. You can
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
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.
368 @return 0 if successful, -1 if an error occurred, or 1 if we exited because
389 Libevent has compiled-in support for, and will not necessarily check
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.
548 ready to run timeout callbacks, check after each timeout callback.
553 safe to use Libevent's internal change-list code to batch up
558 will produce strange and hard-to-diagnose bugs.
568 /** Ordinarily, Libevent implements its time and timeout code using
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
784 @return 0 on success, -1 on failure.
798 * of the highest-priority ones, then exit. */
801 * running until event_base_loopexit() or event_base_loopbreak() makes us
820 @return 0 if successful, -1 if an error occurred, or 1 if we exited because
832 complete normally (handling all queued events) then exit without
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
919 /** Indicates that a timeout has occurred. It's not necessary to pass
920 * this flag to event_for new()/event_assign() to get a timeout. */
931 * When a persistent event with a timeout becomes activated, its timeout
935 /** Select edge-triggered behavior, if supported by the backend. */
939 * while waiting for the event callback to complete in another thread.
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.
1055 event can be triggered only by a timeout or by manual activation with
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.
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
1112 Libevent, and lead to strange, hard-to-diagnose bugs. You _can_ use
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
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.
1203 @param timeout the maximum amount of time to wait for the event. NULL
1206 @return 0 if successful, or -1 if an error occurred
1216 specified in timeout has elapsed. If a timeout is NULL, no timeout
1223 If the event in the ev argument already has a scheduled timeout, calling
1224 event_add() replaces the old timeout with the new one if tv is non-NULL.
1227 @param timeout the maximum amount of time to wait for the event, or NULL
1229 @return 0 if successful, or -1 if an error occurred
1233 int event_add(struct event *ev, const struct timeval *timeout);
1238 If the event has a scheduled timeout, this function unschedules it but
1242 @return 0 on success, or -1 if an error occurred.
1255 @return 0 if successful, or -1 if an error occurred
1279 You can use this function on a pending or a non-pending event to make it
1299 @param tv if this field is not NULL, and the event has a timeout,
1300 this field is set to hold the time at which the timeout will
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
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
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
1504 pointer to a different, opaque timeout value. (Don't depend on its actual
1505 contents!) When you use this timeout value in event_add(), Libevent will
1509 or tens of thousands of events with the same timeout.)
1549 Writes a human-readable description of all inserted and/or active
1570 @param events One or more of EV_{READ,WRITE,TIMEOUT}.
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.