summaryrefslogtreecommitdiff
path: root/static/netbsd/man3/event.3
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 19:55:15 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 19:55:15 -0400
commit253e67c8b3a72b3a4757fdbc5845297628db0a4a (patch)
treeadf53b66087aa30dfbf8bf391a1dadb044c3bf4d /static/netbsd/man3/event.3
parenta9157ce950dfe2fc30795d43b9d79b9d1bffc48b (diff)
docs: Added All NetBSD Manuals
Diffstat (limited to 'static/netbsd/man3/event.3')
-rw-r--r--static/netbsd/man3/event.343
1 files changed, 43 insertions, 0 deletions
diff --git a/static/netbsd/man3/event.3 b/static/netbsd/man3/event.3
new file mode 100644
index 00000000..d4fa3d65
--- /dev/null
+++ b/static/netbsd/man3/event.3
@@ -0,0 +1,43 @@
+.TH "event" 3 "Tue Jan 31 2017" "libevent" \" -*- nroff -*-
+.ad l
+.nh
+.SH NAME
+event \- Structure to represent a single event\&.
+
+.SH SYNOPSIS
+.br
+.PP
+.PP
+\fC#include <event\&.h>\fP
+.SH "Detailed Description"
+.PP
+Structure to represent a single event\&.
+
+An event can have some underlying condition it represents: a socket becoming readable or writeable (or both), or a signal becoming raised\&. (An event that represents no underlying condition is still useful: you can use one to implement a timer, or to communicate between threads\&.)
+.PP
+Generally, you can create events with \fBevent_new()\fP, then make them pending with \fBevent_add()\fP\&. As your \fBevent_base\fP runs, it will run the callbacks of an events whose conditions are triggered\&. When you longer want the event, free it with \fBevent_free()\fP\&.
+.PP
+In more depth:
+.PP
+An event may be 'pending' (one whose condition we are watching), 'active' (one whose condition has triggered and whose callback is about to run), neither, or both\&. Events come into existence via \fBevent_assign()\fP or \fBevent_new()\fP, and are then neither active nor pending\&.
+.PP
+To make an event pending, pass it to \fBevent_add()\fP\&. When doing so, you can also set a timeout for the event\&.
+.PP
+Events become active during an \fBevent_base_loop()\fP call when either their condition has triggered, or when their timeout has elapsed\&. You can also activate an event manually using \fBevent_active()\fP\&. The even_base loop will run the callbacks of active events; after it has done so, it marks them as no longer active\&.
+.PP
+You can make an event non-pending by passing it to \fBevent_del()\fP\&. This also makes the event non-active\&.
+.PP
+Events can be 'persistent' or 'non-persistent'\&. A non-persistent event becomes non-pending as soon as it is triggered: thus, it only runs at most once per call to \fBevent_add()\fP\&. A persistent event remains pending even when it becomes active: you'll need to \fBevent_del()\fP it manually in order to make it non-pending\&. When a persistent event with a timeout becomes active, its timeout is reset: this means you can use persistent events to implement periodic timeouts\&.
+.PP
+This should be treated as an opaque structure; you should never read or write any of its fields directly\&. For backward compatibility with old code, it is defined in the event2/event_struct\&.h header; including this header may make your code incompatible with other versions of Libevent\&.
+.PP
+\fBSee also:\fP
+.RS 4
+\fBevent_new()\fP, \fBevent_free()\fP, \fBevent_assign()\fP, \fBevent_get_assignment()\fP, \fBevent_add()\fP, \fBevent_del()\fP, \fBevent_active()\fP, \fBevent_pending()\fP, \fBevent_get_fd()\fP, \fBevent_get_base()\fP, \fBevent_get_events()\fP, \fBevent_get_callback()\fP, \fBevent_get_callback_arg()\fP, \fBevent_priority_set()\fP
+.RE
+.PP
+
+
+.SH "Author"
+.PP
+Generated automatically by Doxygen for libevent from the source code\&.