~ubuntu-branches/ubuntu/hardy/transmission/hardy-updates

« back to all changes in this revision

Viewing changes to third-party/libevent/event.3

  • Committer: Bazaar Package Importer
  • Author(s): Philipp Benner
  • Date: 2007-10-26 16:02:39 UTC
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20071026160239-2c0agn7q1ken0xsp
Tags: upstream-0.90.dfsg
ImportĀ upstreamĀ versionĀ 0.90.dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.\"     $OpenBSD: event.3,v 1.4 2002/07/12 18:50:48 provos Exp $
 
2
.\"
 
3
.\" Copyright (c) 2000 Artur Grabowski <art@openbsd.org>
 
4
.\" All rights reserved.
 
5
.\"
 
6
.\" Redistribution and use in source and binary forms, with or without
 
7
.\" modification, are permitted provided that the following conditions
 
8
.\" are met:
 
9
.\"
 
10
.\" 1. Redistributions of source code must retain the above copyright
 
11
.\"    notice, this list of conditions and the following disclaimer.
 
12
.\" 2. Redistributions in binary form must reproduce the above copyright
 
13
.\"    notice, this list of conditions and the following disclaimer in the
 
14
.\"    documentation and/or other materials provided with the distribution.
 
15
.\" 3. The name of the author may not be used to endorse or promote products
 
16
.\"    derived from this software without specific prior written permission.
 
17
.\"
 
18
.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
 
19
.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
 
20
.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
 
21
.\" THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 
22
.\" EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 
23
.\" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 
24
.\" OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 
25
.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 
26
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 
27
.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
28
.\"
 
29
.Dd August 8, 2000
 
30
.Dt EVENT 3
 
31
.Os
 
32
.Sh NAME
 
33
.Nm event_init ,
 
34
.Nm event_dispatch ,
 
35
.Nm event_loop ,
 
36
.Nm event_loopexit ,
 
37
.Nm event_set ,
 
38
.Nm event_base_dispatch ,
 
39
.Nm event_base_loop ,
 
40
.Nm event_base_loopexit ,
 
41
.Nm event_base_set ,
 
42
.Nm event_base_free ,
 
43
.Nm event_add ,
 
44
.Nm event_del ,
 
45
.Nm event_once ,
 
46
.Nm event_base_once ,
 
47
.Nm event_pending ,
 
48
.Nm event_initialized ,
 
49
.Nm event_priority_init ,
 
50
.Nm event_priority_set ,
 
51
.Nm evtimer_set ,
 
52
.Nm evtimer_add ,
 
53
.Nm evtimer_del ,
 
54
.Nm evtimer_pending ,
 
55
.Nm evtimer_initialized ,
 
56
.Nm signal_set ,
 
57
.Nm signal_add ,
 
58
.Nm signal_del ,
 
59
.Nm signal_pending ,
 
60
.Nm signal_initialized ,
 
61
.Nm bufferevent_new ,
 
62
.Nm bufferevent_free ,
 
63
.Nm bufferevent_write ,
 
64
.Nm bufferevent_write_buffer ,
 
65
.Nm bufferevent_read ,
 
66
.Nm bufferevent_enable ,
 
67
.Nm bufferevent_disable ,
 
68
.Nm bufferevent_settimeout ,
 
69
.Nm bufferevent_base_set ,
 
70
.Nm evbuffer_new ,
 
71
.Nm evbuffer_free ,
 
72
.Nm evbuffer_add ,
 
73
.Nm evbuffer_add_buffer ,
 
74
.Nm evbuffer_add_printf ,
 
75
.Nm evbuffer_add_vprintf ,
 
76
.Nm evbuffer_drain ,
 
77
.Nm evbuffer_write ,
 
78
.Nm evbuffer_read ,
 
79
.Nm evbuffer_find ,
 
80
.Nm evbuffer_readline ,
 
81
.Nm evhttp_new ,
 
82
.Nm evhttp_bind_socket ,
 
83
.Nm evhttp_free
 
84
.Nd execute a function when a specific event occurs
 
85
.Sh SYNOPSIS
 
86
.Fd #include <sys/time.h>
 
87
.Fd #include <event.h>
 
88
.Ft "struct event_base *"
 
89
.Fn "event_init" "void"
 
90
.Ft int
 
91
.Fn "event_dispatch" "void"
 
92
.Ft int
 
93
.Fn "event_loop" "int flags"
 
94
.Ft int
 
95
.Fn "event_loopexit" "struct timeval *tv"
 
96
.Ft void
 
97
.Fn "event_set" "struct event *ev" "int fd" "short event" "void (*fn)(int, short, void *)" "void *arg"
 
98
.Ft int
 
99
.Fn "event_base_dispatch" "struct event_base *base"
 
100
.Ft int
 
101
.Fn "event_base_loop" "struct event_base *base" "int flags"
 
102
.Ft int
 
103
.Fn "event_base_loopexit" "struct event_base *base" "struct timeval *tv"
 
104
.Ft int
 
105
.Fn "event_base_set" "struct event_base *base" "struct event *"
 
106
.Ft void
 
107
.Fn "event_base_free" "struct event_base *base"
 
108
.Ft int
 
109
.Fn "event_add" "struct event *ev" "struct timeval *tv"
 
110
.Ft int
 
111
.Fn "event_del" "struct event *ev"
 
112
.Ft int
 
113
.Fn "event_once" "int fd" "short event" "void (*fn)(int, short, void *)" "void *arg" "struct timeval *tv"
 
114
.Ft int
 
115
.Fn "event_base_once" "struct event_base *base" "int fd" "short event" "void (*fn)(int, short, void *)" "void *arg" "struct timeval *tv"
 
116
.Ft int
 
117
.Fn "event_pending" "struct event *ev" "short event" "struct timeval *tv"
 
118
.Ft int
 
119
.Fn "event_initialized" "struct event *ev"
 
120
.Ft int
 
121
.Fn "event_priority_init" "int npriorities"
 
122
.Ft int
 
123
.Fn "event_priority_set" "struct event *ev" "int priority"
 
124
.Ft void
 
125
.Fn "evtimer_set" "struct event *ev" "void (*fn)(int, short, void *)" "void *arg"
 
126
.Ft void
 
127
.Fn "evtimer_add" "struct event *ev" "struct timeval *"
 
128
.Ft void
 
129
.Fn "evtimer_del" "struct event *ev"
 
130
.Ft int
 
131
.Fn "evtimer_pending" "struct event *ev" "struct timeval *tv"
 
132
.Ft int
 
133
.Fn "evtimer_initialized" "struct event *ev"
 
134
.Ft void
 
135
.Fn "signal_set" "struct event *ev" "int signal" "void (*fn)(int, short, void *)" "void *arg"
 
136
.Ft void
 
137
.Fn "signal_add" "struct event *ev" "struct timeval *"
 
138
.Ft void
 
139
.Fn "signal_del" "struct event *ev"
 
140
.Ft int
 
141
.Fn "signal_pending" "struct event *ev" "struct timeval *tv"
 
142
.Ft int
 
143
.Fn "signal_initialized" "struct event *ev"
 
144
.Ft "struct bufferevent *"
 
145
.Fn "bufferevent_new" "int fd" "evbuffercb readcb" "evbuffercb writecb" "everrorcb" "void *cbarg"
 
146
.Ft void
 
147
.Fn "bufferevent_free" "struct bufferevent *bufev"
 
148
.Ft int
 
149
.Fn "bufferevent_write" "struct bufferevent *bufev" "void *data" "size_t size"
 
150
.Ft int
 
151
.Fn "bufferevent_write_buffer" "struct bufferevent *bufev" "struct evbuffer *buf"
 
152
.Ft size_t
 
153
.Fn "bufferevent_read" "struct bufferevent *bufev" "void *data" "size_t size"
 
154
.Ft int
 
155
.Fn "bufferevent_enable" "struct bufferevent *bufev" "short event"
 
156
.Ft int
 
157
.Fn "bufferevent_disable" "struct bufferevent *bufev" "short event"
 
158
.Ft void
 
159
.Fn "bufferevent_settimeout" "struct bufferevent *bufev" "int timeout_read" "int timeout_write"
 
160
.Ft int
 
161
.Fn "bufferevent_base_set" "struct event_base *base" "struct bufferevent *bufev"
 
162
.Ft "struct evbuffer *"
 
163
.Fn "evbuffer_new" "void"
 
164
.Ft void
 
165
.Fn "evbuffer_free" "struct evbuffer *buf"
 
166
.Ft int
 
167
.Fn "evbuffer_add" "struct evbuffer *buf" "const void *data" "size_t size"
 
168
.Ft int
 
169
.Fn "evbuffer_add_buffer" "struct evbuffer *dst" "struct evbuffer *src"
 
170
.Ft int
 
171
.Fn "evbuffer_add_printf" "struct evbuffer *buf" "const char *fmt" "..."
 
172
.Ft int
 
173
.Fn "evbuffer_add_vprintf" "struct evbuffer *buf" "const char *fmt" "va_list ap"
 
174
.Ft void
 
175
.Fn "evbuffer_drain" "struct evbuffer *buf" "size_t size"
 
176
.Ft int
 
177
.Fn "evbuffer_write" "struct evbuffer *buf" "int fd"
 
178
.Ft int
 
179
.Fn "evbuffer_read" "struct evbuffer *buf" "int fd" "int size"
 
180
.Ft "u_char *"
 
181
.Fn "evbuffer_find" "struct evbuffer *buf" "const u_char *data" "size_t size"
 
182
.Ft "char *"
 
183
.Fn "evbuffer_readline" "struct evbuffer *buf"
 
184
.Ft "struct evhttp *"
 
185
.Fn "evhttp_new"
 
186
.Ft int
 
187
.Fn "evhttp_bind_socket" "struct evhttp *http" "const char *address" "u_short port"
 
188
.Ft "void"
 
189
.Fn "evhttp_free" "struct evhttp *http"
 
190
.Ft int
 
191
.Fa (*event_sigcb)(void) ;
 
192
.Ft volatile sig_atomic_t
 
193
.Fa event_gotsig ;
 
194
.Sh DESCRIPTION
 
195
The
 
196
.Nm event
 
197
API provides a mechanism to execute a function when a specific event
 
198
on a file descriptor occurs or after a given time has passed.
 
199
.Pp
 
200
The
 
201
.Nm event
 
202
API needs to be initialized with
 
203
.Fn event_init
 
204
before it can be used.
 
205
.Pp
 
206
In order to process events, an application needs to call
 
207
.Fn event_dispatch .
 
208
This function only returns on error, and should replace the event core
 
209
of the application program.
 
210
.Pp
 
211
The function
 
212
.Fn event_set
 
213
prepares the event structure
 
214
.Fa ev
 
215
to be used in future calls to
 
216
.Fn event_add
 
217
and
 
218
.Fn event_del .
 
219
The event will be prepared to call the function specified by the
 
220
.Fa fn
 
221
argument with an
 
222
.Fa int
 
223
argument indicating the file descriptor, a
 
224
.Fa short
 
225
argument indicating the type of event, and a
 
226
.Fa void *
 
227
argument given in the
 
228
.Fa arg
 
229
argument.
 
230
The
 
231
.Fa fd
 
232
indicates the file descriptor that should be monitored for events.
 
233
The events can be either
 
234
.Va EV_READ ,
 
235
.Va EV_WRITE ,
 
236
or both,
 
237
indicating that an application can read or write from the file descriptor
 
238
respectively without blocking.
 
239
.Pp
 
240
The function
 
241
.Fa fn
 
242
will be called with the file descriptor that triggered the event and
 
243
the type of event which will be either
 
244
.Va EV_TIMEOUT ,
 
245
.Va EV_SIGNAL ,
 
246
.Va EV_READ ,
 
247
or
 
248
.Va EV_WRITE .
 
249
Additionally, an event which has registered interest in more than one of the
 
250
preceeding events, via bitwise-OR to
 
251
.Fn event_set ,
 
252
can provide its callback function with a bitwise-OR of more than one triggered
 
253
event.
 
254
The additional flag
 
255
.Va EV_PERSIST
 
256
makes an
 
257
.Fn event_add
 
258
persistent until
 
259
.Fn event_del
 
260
has been called.
 
261
.Pp
 
262
Once initialized, the
 
263
.Fa ev
 
264
structure can be used repeatedly with
 
265
.Fn event_add
 
266
and
 
267
.Fn event_del
 
268
and does not need to be reinitialized unless the function called and/or
 
269
the argument to it are to be changed.
 
270
However, when an
 
271
.Fa ev
 
272
structure has been added to libevent using
 
273
.Fn event_add
 
274
the structure must persist until the event occurs (assuming
 
275
.Fa EV_PERSIST
 
276
is not set) or is removed
 
277
using
 
278
.Fn event_del .
 
279
You may not reuse the same
 
280
.Fa ev
 
281
structure for multiple monitored descriptors; each descriptor
 
282
needs its own
 
283
.Fa ev .
 
284
.Pp
 
285
The function
 
286
.Fn event_add
 
287
schedules the execution of the
 
288
.Fa ev
 
289
event when the event specified in
 
290
.Fn event_set
 
291
occurs or in at least the time specified in the
 
292
.Fa tv .
 
293
If
 
294
.Fa tv
 
295
is
 
296
.Dv NULL ,
 
297
no timeout occurs and the function will only be called
 
298
if a matching event occurs on the file descriptor.
 
299
The event in the
 
300
.Fa ev
 
301
argument must be already initialized by
 
302
.Fn event_set
 
303
and may not be used in calls to
 
304
.Fn event_set
 
305
until it has timed out or been removed with
 
306
.Fn event_del .
 
307
If the event in the
 
308
.Fa ev
 
309
argument already has a scheduled timeout, the old timeout will be
 
310
replaced by the new one.
 
311
.Pp
 
312
The function
 
313
.Fn event_del
 
314
will cancel the event in the argument
 
315
.Fa ev .
 
316
If the event has already executed or has never been added
 
317
the call will have no effect.
 
318
.Pp
 
319
The functions
 
320
.Fn evtimer_set ,
 
321
.Fn evtimer_add ,
 
322
.Fn evtimer_del ,
 
323
.Fn evtimer_initialized ,
 
324
and
 
325
.Fn evtimer_pending
 
326
are abbreviations for common situations where only a timeout is required.
 
327
The file descriptor passed will be \-1, and the event type will be
 
328
.Va EV_TIMEOUT .
 
329
.Pp
 
330
The functions
 
331
.Fn signal_set ,
 
332
.Fn signal_add ,
 
333
.Fn signal_del ,
 
334
.Fn signal_initialized ,
 
335
and
 
336
.Fn signal_pending
 
337
are abbreviations.
 
338
The event type will be a persistent
 
339
.Va EV_SIGNAL .
 
340
That means
 
341
.Fn signal_set
 
342
adds
 
343
.Va EV_PERSIST .
 
344
.Pp
 
345
In order to avoid races in signal handlers, the
 
346
.Nm event
 
347
API provides two variables:
 
348
.Va event_sigcb
 
349
and
 
350
.Va event_gotsig .
 
351
A signal handler
 
352
sets
 
353
.Va event_gotsig
 
354
to indicate that a signal has been received.
 
355
The application sets
 
356
.Va event_sigcb
 
357
to a callback function.
 
358
After the signal handler sets
 
359
.Va event_gotsig ,
 
360
.Nm event_dispatch
 
361
will execute the callback function to process received signals.
 
362
The callback returns 1 when no events are registered any more.
 
363
It can return \-1 to indicate an error to the
 
364
.Nm event
 
365
library, causing
 
366
.Fn event_dispatch
 
367
to terminate with
 
368
.Va errno
 
369
set to
 
370
.Er EINTR .
 
371
.Pp
 
372
The function
 
373
.Fn event_once
 
374
is similar to
 
375
.Fn event_set .
 
376
However, it schedules a callback to be called exactly once and does not
 
377
require the caller to prepare an
 
378
.Fa event
 
379
structure.
 
380
This function supports
 
381
.Fa EV_TIMEOUT ,
 
382
.Fa EV_READ ,
 
383
and
 
384
.Fa EV_WRITE .
 
385
.Pp
 
386
The
 
387
.Fn event_pending
 
388
function can be used to check if the event specified by
 
389
.Fa event
 
390
is pending to run.
 
391
If
 
392
.Va EV_TIMEOUT
 
393
was specified and
 
394
.Fa tv
 
395
is not
 
396
.Dv NULL ,
 
397
the expiration time of the event will be returned in
 
398
.Fa tv .
 
399
.Pp
 
400
The
 
401
.Fn event_initialized
 
402
macro can be used to check if an event has been initialized.
 
403
.Pp
 
404
The
 
405
.Nm event_loop
 
406
function provides an interface for single pass execution of pending
 
407
events.
 
408
The flags
 
409
.Va EVLOOP_ONCE
 
410
and
 
411
.Va EVLOOP_NONBLOCK
 
412
are recognized.
 
413
The
 
414
.Nm event_loopexit
 
415
function allows the loop to be terminated after some amount of time
 
416
has passed.
 
417
The parameter indicates the time after which the loop should terminate.
 
418
.Pp
 
419
It is the responsibility of the caller to provide these functions with
 
420
pre-allocated event structures.
 
421
.Pp
 
422
.Sh EVENT PRIORITIES
 
423
By default
 
424
.Nm libevent
 
425
schedules all active events with the same priority.
 
426
However, sometimes it is desirable to process some events with a higher
 
427
priority than others.
 
428
For that reason,
 
429
.Nm libevent
 
430
supports strict priority queues.
 
431
Active events with a lower priority are always processed before events
 
432
with a higher priority.
 
433
.Pp
 
434
The number of different priorities can be set initially with the
 
435
.Fn event_priority_init
 
436
function.
 
437
This function should be called before the first call to
 
438
.Fn event_dispatch .
 
439
The
 
440
.Fn event_priority_set
 
441
function can be used to assign a priority to an event.
 
442
By default,
 
443
.Nm libevent
 
444
assigns the middle priority to all events unless their priority
 
445
is explicitly set.
 
446
.Sh THREAD SAFE EVENTS
 
447
.Nm Libevent
 
448
has experimental support for thread-safe events.
 
449
When initializing the library via
 
450
.Fn event_init ,
 
451
an event base is returned.
 
452
This event base can be used in conjunction with calls to
 
453
.Fn event_base_set ,
 
454
.Fn event_base_dispatch ,
 
455
.Fn event_base_loop ,
 
456
.Fn event_base_loopexit ,
 
457
.Fn bufferevent_base_set
 
458
and
 
459
.Fn event_base_free .
 
460
.Fn event_base_set
 
461
should be called after preparing an event with
 
462
.Fn event_set ,
 
463
as
 
464
.Fn event_set
 
465
assigns the provided event to the most recently created event base.
 
466
.Fn bufferevent_base_set
 
467
should be called after preparing a bufferevent with
 
468
.Fn bufferevent_new .
 
469
.Fn event_base_free
 
470
should be used to free memory associated with the event base
 
471
when it is no longer needed.
 
472
.Sh BUFFERED EVENTS
 
473
.Nm libevent
 
474
provides an abstraction on top of the regular event callbacks.
 
475
This abstraction is called a
 
476
.Va "buffered event" .
 
477
A buffered event provides input and output buffers that get filled
 
478
and drained automatically.
 
479
The user of a buffered event no longer deals directly with the IO,
 
480
but instead is reading from input and writing to output buffers.
 
481
.Pp
 
482
A new bufferevent is created by
 
483
.Fn bufferevent_new .
 
484
The parameter
 
485
.Fa fd
 
486
specifies the file descriptor from which data is read and written to.
 
487
This file descriptor is not allowed to be a
 
488
.Xr pipe 2 .
 
489
The next three parameters are callbacks.
 
490
The read and write callback have the following form:
 
491
.Ft void
 
492
.Fn "(*cb)" "struct bufferevent *bufev" "void *arg" .
 
493
The error callback has the following form:
 
494
.Ft void
 
495
.Fn "(*cb)" "struct bufferevent *bufev" "short what" "void *arg" .
 
496
The argument is specified by the fourth parameter
 
497
.Fa "cbarg" .
 
498
A
 
499
.Fa bufferevent struct
 
500
pointer is returned on success, NULL on error.
 
501
Both the read and the write callback may be NULL.
 
502
The error callback has to be always provided.
 
503
.Pp
 
504
Once initialized, the bufferevent structure can be used repeatedly with
 
505
bufferevent_enable() and bufferevent_disable().
 
506
The flags parameter can be a combination of
 
507
.Va EV_READ
 
508
and
 
509
.Va EV_WRITE .
 
510
When read enabled the bufferevent will try to read from the file
 
511
descriptor and call the read callback.
 
512
The write callback is executed
 
513
whenever the output buffer is drained below the write low watermark,
 
514
which is
 
515
.Va 0
 
516
by default.
 
517
.Pp
 
518
The
 
519
.Fn bufferevent_write
 
520
function can be used to write data to the file descriptor.
 
521
The data is appended to the output buffer and written to the descriptor
 
522
automatically as it becomes available for writing.
 
523
.Fn bufferevent_write
 
524
returns 0 on success or \-1 on failure.
 
525
The
 
526
.Fn bufferevent_read
 
527
function is used to read data from the input buffer,
 
528
returning the amount of data read.
 
529
.Pp
 
530
If multiple bases are in use, bufferevent_base_set() must be called before
 
531
enabling the bufferevent for the first time.
 
532
.Sh NON-BLOCKING HTTP SUPPORT
 
533
.Nm libevent
 
534
provides a very thin HTTP layer that can be used both to host an HTTP
 
535
server and also to make HTTP requests.
 
536
An HTTP server can be created by calling
 
537
.Fn evhttp_new .
 
538
It can be bound to any port and address with the
 
539
.Fn evhttp_bind_socket
 
540
function.
 
541
When the HTTP server is no longer used, it can be freed via
 
542
.Fn evhttp_free .
 
543
.Pp
 
544
To be notified of HTTP requests, a user needs to register callbacks with the
 
545
HTTP server.
 
546
This can be done by calling
 
547
.Fn evhttp_set_cb .
 
548
The second argument is the URI for which a callback is being registered.
 
549
The corresponding callback will receive an
 
550
.Va struct evhttp_request
 
551
object that contains all information about the request.
 
552
.Pp
 
553
This section does not document all the possible function calls; please
 
554
check
 
555
.Va event.h
 
556
for the public interfaces.
 
557
.Sh ADDITIONAL NOTES
 
558
It is possible to disable support for
 
559
.Va epoll , kqueue , devpoll , poll
 
560
or
 
561
.Va select
 
562
by setting the environment variable
 
563
.Va EVENT_NOEPOLL , EVENT_NOKQUEUE , EVENT_NODEVPOLL , EVENT_NOPOLL
 
564
or
 
565
.Va EVENT_NOSELECT ,
 
566
respectively.
 
567
By setting the environment variable
 
568
.Va EVENT_SHOW_METHOD ,
 
569
.Nm libevent
 
570
displays the kernel notification method that it uses.
 
571
.Sh RETURN VALUES
 
572
Upon successful completion
 
573
.Fn event_add
 
574
and
 
575
.Fn event_del
 
576
return 0.
 
577
Otherwise, \-1 is returned and the global variable errno is
 
578
set to indicate the error.
 
579
.Sh SEE ALSO
 
580
.Xr kqueue 2 ,
 
581
.Xr poll 2 ,
 
582
.Xr select 2 ,
 
583
.Xr evdns 3 ,
 
584
.Xr timeout 9
 
585
.Sh HISTORY
 
586
The
 
587
.Nm event
 
588
API manpage is based on the
 
589
.Xr timeout 9
 
590
manpage by Artur Grabowski.
 
591
The port of
 
592
.Nm libevent
 
593
to Windows is due to Michael A. Davis.
 
594
Support for real-time signals is due to Taral.
 
595
.Sh AUTHORS
 
596
The
 
597
.Nm event
 
598
library was written by Niels Provos.
 
599
.Sh BUGS
 
600
This documentation is neither complete nor authoritative.
 
601
If you are in doubt about the usage of this API then
 
602
check the source code to find out how it works, write
 
603
up the missing piece of documentation and send it to
 
604
me for inclusion in this man page.