event_base_once

Schedule a one-time event

The function event_base_once() is similar to event_set(). However, it schedules a callback to be called exactly once, and does not require the caller to prepare an event structure.

Note that in Libevent 2.0 and earlier, if the event is never triggered, the internal memory used to hold it will never be freed. This may be fixed in a later version of Libevent.

@param base an event_base @param fd a file descriptor to monitor, or -1 for no fd. @param events event(s) to monitor; can be any of EV_READ | EV_WRITE, or EV_TIMEOUT @param callback callback function to be invoked when the event occurs @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. @return 0 if successful, or -1 if an error occurred

extern (C) nothrow
int
event_base_once
(,,
short
,,
void*
,
const(timeval)*
)

Meta