void *event_self_cbarg(void);
/**
- Allocate and asssign a new event structure, ready to be added.
+ Allocate and assign a new event structure, ready to be added.
The function event_new() returns a new event that can be used in
future calls to event_add() and event_del(). The fd and events
The EV_TIMEOUT flag has no effect here.
It is okay to have multiple events all listening on the same fds; but
- they must either all be edge-triggered, or all not be edge triggerd.
+ they must either all be edge-triggered, or all not be edge triggered.
When the event becomes active, the event loop will run the provided
- callbuck function, with three arguments. The first will be the provided
+ callback function, with three arguments. The first will be the provided
fd value. The second will be a bitfield of the events that triggered:
EV_READ, EV_WRITE, or EV_SIGNAL. Here the EV_TIMEOUT flag indicates
that a timeout occurred, and EV_ET indicates that an edge-triggered
event_finalize() does not.
A finalizer callback must not make events pending or active. It must not
- add events, activate events, or attempt to "resucitate" the event being
+ add events, activate events, or attempt to "resuscitate" the event being
finalized in any way.
THIS IS AN EXPERIMENTAL API. IT MIGHT CHANGE BEFORE THE LIBEVENT 2.1 SERIES
BECOMES STABLE.
- @return 0 on succes, -1 on failure.
+ @return 0 on success, -1 on failure.
*/
/**@{*/
EVENT2_EXPORT_SYMBOL
@param arg an argument to be passed to the callback function
@param timeout the maximum amount of time to wait for the event. NULL
makes an EV_READ/EV_WRITE event make forever; NULL makes an
- EV_TIMEOUT event succees immediately.
+ EV_TIMEOUT event success immediately.
@return 0 if successful, or -1 if an error occurred
*/
EVENT2_EXPORT_SYMBOL
The function event_add() schedules the execution of the event 'ev' when the
condition specified by event_assign() or event_new() occurs, or when the time
- specified in timeout has elapesed. If atimeout is NULL, no timeout
+ specified in timeout has elapsed. If a timeout is NULL, no timeout
occurs and the function will only be
called if a matching event occurs. The event in the
ev argument must be already initialized by event_assign() or event_new()
leaves the event otherwise pending.
@param ev an event struct initialized via event_assign() or event_new()
- @return 0 on success, or -1 if an error occurrect.
+ @return 0 on success, or -1 if an error occurred.
*/
EVENT2_EXPORT_SYMBOL
int event_remove_timer(struct event *ev);
Note also that if you are going to call this function, you should do so
before any call to any Libevent function that does allocation.
- Otherwise, those funtions will allocate their memory using malloc(), but
+ Otherwise, those functions will allocate their memory using malloc(), but
then later free it using your provided free_fn.
@param malloc_fn A replacement for malloc.
cached time.
Generally, this value will only be cached while actually
- processing event callbacks, and may be very inaccuate if your
+ processing event callbacks, and may be very inaccurate if your
callbacks take a long time to execute.
Returns 0 on success, negative on failure.