-
Notifications
You must be signed in to change notification settings - Fork 4
/
event_8h.html
2811 lines (2600 loc) · 221 KB
/
event_8h.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libevent: event2/event.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libevent
 <span id="projectnumber">2.2.1</span>
</div>
<div id="projectbrief">Event notification library</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_db160b4728e6067cf5f9cc14ec42c79d.html">event2</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> |
<a href="#define-members">Macros</a> |
<a href="#typedef-members">Typedefs</a> |
<a href="#enum-members">Enumerations</a> |
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">event.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Core functions for waiting for and receiving events, and using event bases.
<a href="#details">More...</a></p>
<div class="textblock"><code>#include <event2/visibility.h></code><br />
<code>#include <event2/event-config.h></code><br />
<code>#include <stdio.h></code><br />
<code>#include <<a class="el" href="util_8h_source.html">event2/util.h</a>></code><br />
</div>
<p><a href="event_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structevent.html">event</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Structure to represent a single event. <a href="structevent.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structevent__base.html">event_base</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Structure to hold information and state for a Libevent dispatch loop. <a href="structevent__base.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structevent__config.html">event_config</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Configuration for an <a class="el" href="structevent__base.html" title="Structure to hold information and state for a Libevent dispatch loop.">event_base</a>. <a href="structevent__config.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a964443418439acdd775129ae260b21bb"><td class="memItemLeft" align="right" valign="top"><a id="a964443418439acdd775129ae260b21bb"></a>
#define </td><td class="memItemRight" valign="bottom"><b>_EVENT_LOG_DEBUG</b>   EVENT_LOG_DEBUG</td></tr>
<tr class="separator:a964443418439acdd775129ae260b21bb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a829eede32e73952922a35e42b510bfe9"><td class="memItemLeft" align="right" valign="top"><a id="a829eede32e73952922a35e42b510bfe9"></a>
#define </td><td class="memItemRight" valign="bottom"><b>_EVENT_LOG_ERR</b>   EVENT_LOG_ERR</td></tr>
<tr class="separator:a829eede32e73952922a35e42b510bfe9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6d898badc07a518c29ecb0129cc77188"><td class="memItemLeft" align="right" valign="top"><a id="a6d898badc07a518c29ecb0129cc77188"></a>
#define </td><td class="memItemRight" valign="bottom"><b>_EVENT_LOG_MSG</b>   EVENT_LOG_MSG</td></tr>
<tr class="separator:a6d898badc07a518c29ecb0129cc77188"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa8ba4ffdc827c139311654c41cfddd1d"><td class="memItemLeft" align="right" valign="top"><a id="aa8ba4ffdc827c139311654c41cfddd1d"></a>
#define </td><td class="memItemRight" valign="bottom"><b>_EVENT_LOG_WARN</b>   EVENT_LOG_WARN</td></tr>
<tr class="separator:aa8ba4ffdc827c139311654c41cfddd1d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2ba29ef7ed0ed9e0f55737f636f8cde7"><td class="memItemLeft" align="right" valign="top"><a id="a2ba29ef7ed0ed9e0f55737f636f8cde7"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVENT_DBG_ALL</b>   0xffffffffu</td></tr>
<tr class="separator:a2ba29ef7ed0ed9e0f55737f636f8cde7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0c72c789b7c7905ea19592cf878b0744"><td class="memItemLeft" align="right" valign="top"><a id="a0c72c789b7c7905ea19592cf878b0744"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVENT_DBG_NONE</b>   0</td></tr>
<tr class="separator:a0c72c789b7c7905ea19592cf878b0744"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a69cc368a9137187726ef371a06f9cc9f"><td class="memItemLeft" align="right" valign="top"><a id="a69cc368a9137187726ef371a06f9cc9f"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a69cc368a9137187726ef371a06f9cc9f">event_get_signal</a>(ev)   ((int)<a class="el" href="event_8h.html#a4f63589ebe3e0d4c9e20447f96d343b2">event_get_fd</a>(ev))</td></tr>
<tr class="memdesc:a69cc368a9137187726ef371a06f9cc9f"><td class="mdescLeft"> </td><td class="mdescRight">Get the signal number assigned to a signal event. <br /></td></tr>
<tr class="separator:a69cc368a9137187726ef371a06f9cc9f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad74f7bf73ff985bfaf61c462cbba022f"><td class="memItemLeft" align="right" valign="top"><a id="ad74f7bf73ff985bfaf61c462cbba022f"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#ad74f7bf73ff985bfaf61c462cbba022f">EVENT_MAX_PRIORITIES</a>   256</td></tr>
<tr class="memdesc:ad74f7bf73ff985bfaf61c462cbba022f"><td class="mdescLeft"> </td><td class="mdescRight">Largest number of priorities that Libevent can support. <br /></td></tr>
<tr class="separator:ad74f7bf73ff985bfaf61c462cbba022f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ade387a9a39bbbdf40ff20b4d977ec6ae"><td class="memItemLeft" align="right" valign="top"><a id="ade387a9a39bbbdf40ff20b4d977ec6ae"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#ade387a9a39bbbdf40ff20b4d977ec6ae">EVENT_SET_MEM_FUNCTIONS_IMPLEMENTED</a></td></tr>
<tr class="memdesc:ade387a9a39bbbdf40ff20b4d977ec6ae"><td class="mdescLeft"> </td><td class="mdescRight">This definition is present if Libevent was built with support for <a class="el" href="event_8h.html#a9bb71feea97288bc15d2fba3dccd46bf" title="Override the functions that Libevent uses for memory management.">event_set_mem_functions()</a> <br /></td></tr>
<tr class="separator:ade387a9a39bbbdf40ff20b4d977ec6ae"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aad00c7d4ddbd6b590c15861a2e767182"><td class="memItemLeft" align="right" valign="top"><a id="aad00c7d4ddbd6b590c15861a2e767182"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#aad00c7d4ddbd6b590c15861a2e767182">LIBEVENT_VERSION</a>   EVENT__VERSION</td></tr>
<tr class="memdesc:aad00c7d4ddbd6b590c15861a2e767182"><td class="mdescLeft"> </td><td class="mdescRight">As event_get_version, but gives the version of Libevent's headers. <br /></td></tr>
<tr class="separator:aad00c7d4ddbd6b590c15861a2e767182"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8a9c8021651a2d8d7946083281279586"><td class="memItemLeft" align="right" valign="top"><a id="a8a9c8021651a2d8d7946083281279586"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a8a9c8021651a2d8d7946083281279586">LIBEVENT_VERSION_NUMBER</a>   EVENT__NUMERIC_VERSION</td></tr>
<tr class="memdesc:a8a9c8021651a2d8d7946083281279586"><td class="mdescLeft"> </td><td class="mdescRight">As event_get_version_number, but gives the version number of Libevent's headers. <br /></td></tr>
<tr class="separator:a8a9c8021651a2d8d7946083281279586"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">event type flag</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p>Flags to pass to <a class="el" href="event_8h.html#a3dd8aaea50a18e1b300ae6a138132743" title="Gets the number of events in event_base, as specified in the flags.">event_base_get_num_events()</a> to specify the kinds of events we want to aggregate counts for </p>
</div></td></tr>
<tr class="memitem:aa3786406bc592990f0583ac211110fa3"><td class="memItemLeft" align="right" valign="top"><a id="aa3786406bc592990f0583ac211110fa3"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#aa3786406bc592990f0583ac211110fa3">EVENT_BASE_COUNT_ACTIVE</a>   1U</td></tr>
<tr class="memdesc:aa3786406bc592990f0583ac211110fa3"><td class="mdescLeft"> </td><td class="mdescRight">count the number of active events, which have been triggered. <br /></td></tr>
<tr class="separator:aa3786406bc592990f0583ac211110fa3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a36205e544778da7d91ec8555b962851a"><td class="memItemLeft" align="right" valign="top"><a id="a36205e544778da7d91ec8555b962851a"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a36205e544778da7d91ec8555b962851a">EVENT_BASE_COUNT_ADDED</a>   4U</td></tr>
<tr class="memdesc:a36205e544778da7d91ec8555b962851a"><td class="mdescLeft"> </td><td class="mdescRight">count the number of events which have been added to event base, including internal events. <br /></td></tr>
<tr class="separator:a36205e544778da7d91ec8555b962851a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aac4e49b51ffe924451c9048c5061a224"><td class="memItemLeft" align="right" valign="top"><a id="aac4e49b51ffe924451c9048c5061a224"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#aac4e49b51ffe924451c9048c5061a224">EVENT_BASE_COUNT_VIRTUAL</a>   2U</td></tr>
<tr class="memdesc:aac4e49b51ffe924451c9048c5061a224"><td class="mdescLeft"> </td><td class="mdescRight">count the number of virtual events, which is used to represent an internal condition, other than a pending event, that keeps the loop from exiting. <br /></td></tr>
<tr class="separator:aac4e49b51ffe924451c9048c5061a224"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">Log severities</div></td></tr>
<tr class="memitem:a6904203c125cd86cdd4f3cd90ef1c18f"><td class="memItemLeft" align="right" valign="top"><a id="a6904203c125cd86cdd4f3cd90ef1c18f"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVENT_LOG_DEBUG</b>   0</td></tr>
<tr class="separator:a6904203c125cd86cdd4f3cd90ef1c18f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab51b4412fec9223efc5e5fa862b57a11"><td class="memItemLeft" align="right" valign="top"><a id="ab51b4412fec9223efc5e5fa862b57a11"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVENT_LOG_ERR</b>   3</td></tr>
<tr class="separator:ab51b4412fec9223efc5e5fa862b57a11"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae18003965fc4df307a68d4f5bde2ec45"><td class="memItemLeft" align="right" valign="top"><a id="ae18003965fc4df307a68d4f5bde2ec45"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVENT_LOG_MSG</b>   1</td></tr>
<tr class="separator:ae18003965fc4df307a68d4f5bde2ec45"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a795675e9eb8d63782e86260f101ae72d"><td class="memItemLeft" align="right" valign="top"><a id="a795675e9eb8d63782e86260f101ae72d"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVENT_LOG_WARN</b>   2</td></tr>
<tr class="separator:a795675e9eb8d63782e86260f101ae72d"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">Loop flags</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p>These flags control the behavior of <a class="el" href="event_8h.html#acd7da32086d1e37008e7c76c9ea54fc4" title="Wait for events to become active, and run their callbacks.">event_base_loop()</a>. </p>
</div></td></tr>
<tr class="memitem:a6751a7d5867ff8e7807400a93ffd5b08"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a6751a7d5867ff8e7807400a93ffd5b08">EVLOOP_NO_EXIT_ON_EMPTY</a>   0x04</td></tr>
<tr class="memdesc:a6751a7d5867ff8e7807400a93ffd5b08"><td class="mdescLeft"> </td><td class="mdescRight">Do not exit the loop because we have no pending events. <a href="event_8h.html#a6751a7d5867ff8e7807400a93ffd5b08">More...</a><br /></td></tr>
<tr class="separator:a6751a7d5867ff8e7807400a93ffd5b08"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a10b9c102337d0ece8607c9c01bc4f7c8"><td class="memItemLeft" align="right" valign="top"><a id="a10b9c102337d0ece8607c9c01bc4f7c8"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a10b9c102337d0ece8607c9c01bc4f7c8">EVLOOP_NONBLOCK</a>   0x02</td></tr>
<tr class="memdesc:a10b9c102337d0ece8607c9c01bc4f7c8"><td class="mdescLeft"> </td><td class="mdescRight">Do not block: see which events are ready now, run the callbacks of the highest-priority ones, then exit. <br /></td></tr>
<tr class="separator:a10b9c102337d0ece8607c9c01bc4f7c8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afab575b1e867dde13a2c7f2f967e0e4e"><td class="memItemLeft" align="right" valign="top"><a id="afab575b1e867dde13a2c7f2f967e0e4e"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#afab575b1e867dde13a2c7f2f967e0e4e">EVLOOP_ONCE</a>   0x01</td></tr>
<tr class="memdesc:afab575b1e867dde13a2c7f2f967e0e4e"><td class="mdescLeft"> </td><td class="mdescRight">Block until we have an active event, then exit once all active events have had their callbacks run. <br /></td></tr>
<tr class="separator:afab575b1e867dde13a2c7f2f967e0e4e"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">event flags</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p>Flags to pass to <a class="el" href="event_8h.html#a6cd300e5cd15601c5e4570b221b20397" title="Allocate and assign a new event structure, ready to be added.">event_new()</a>, <a class="el" href="event_8h.html#a3e49a8172e00ae82959dfe64684eda11" title="Prepare a new, already-allocated event structure to be added.">event_assign()</a>, <a class="el" href="event_8h.html#a9b1687396305898af018c74e63486eb5" title="Checks if a specific event is pending or scheduled.">event_pending()</a>, and anything else with an argument of the form "short events" </p>
</div></td></tr>
<tr class="memitem:a98f643f9c9063a4cbf410f519eb61e55"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a98f643f9c9063a4cbf410f519eb61e55">EV_CLOSED</a>   0x80</td></tr>
<tr class="memdesc:a98f643f9c9063a4cbf410f519eb61e55"><td class="mdescLeft"> </td><td class="mdescRight">Detects connection close events. <a href="event_8h.html#a98f643f9c9063a4cbf410f519eb61e55">More...</a><br /></td></tr>
<tr class="separator:a98f643f9c9063a4cbf410f519eb61e55"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a01084abbcdd3a58b4068359548a3ea71"><td class="memItemLeft" align="right" valign="top"><a id="a01084abbcdd3a58b4068359548a3ea71"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a01084abbcdd3a58b4068359548a3ea71">EV_ET</a>   0x20</td></tr>
<tr class="memdesc:a01084abbcdd3a58b4068359548a3ea71"><td class="mdescLeft"> </td><td class="mdescRight">Select edge-triggered behavior, if supported by the backend. <br /></td></tr>
<tr class="separator:a01084abbcdd3a58b4068359548a3ea71"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac062d75b2bf9a961d893e3a71726bdff"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#ac062d75b2bf9a961d893e3a71726bdff">EV_FINALIZE</a>   0x40</td></tr>
<tr class="memdesc:ac062d75b2bf9a961d893e3a71726bdff"><td class="mdescLeft"> </td><td class="mdescRight">If this option is provided, then <a class="el" href="event_8h.html#a2ffc10a652c67bea16b0a71f7d5a44dc" title="Remove an event from the set of monitored events.">event_del()</a> will not block in one thread while waiting for the event callback to complete in another thread. <a href="event_8h.html#ac062d75b2bf9a961d893e3a71726bdff">More...</a><br /></td></tr>
<tr class="separator:ac062d75b2bf9a961d893e3a71726bdff"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3c4947a60eb6d09327c61f89135f9f37"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a3c4947a60eb6d09327c61f89135f9f37">EV_PERSIST</a>   0x10</td></tr>
<tr class="memdesc:a3c4947a60eb6d09327c61f89135f9f37"><td class="mdescLeft"> </td><td class="mdescRight">Persistent event: won't get removed automatically when activated. <a href="event_8h.html#a3c4947a60eb6d09327c61f89135f9f37">More...</a><br /></td></tr>
<tr class="separator:a3c4947a60eb6d09327c61f89135f9f37"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a74bbaf2d529670cc0ab793497b41700f"><td class="memItemLeft" align="right" valign="top"><a id="a74bbaf2d529670cc0ab793497b41700f"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a74bbaf2d529670cc0ab793497b41700f">EV_READ</a>   0x02</td></tr>
<tr class="memdesc:a74bbaf2d529670cc0ab793497b41700f"><td class="mdescLeft"> </td><td class="mdescRight">Wait for a socket or FD to become readable. <br /></td></tr>
<tr class="separator:a74bbaf2d529670cc0ab793497b41700f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a59b7e95284ac1a197969d42ee9441ece"><td class="memItemLeft" align="right" valign="top"><a id="a59b7e95284ac1a197969d42ee9441ece"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a59b7e95284ac1a197969d42ee9441ece">EV_SIGNAL</a>   0x08</td></tr>
<tr class="memdesc:a59b7e95284ac1a197969d42ee9441ece"><td class="mdescLeft"> </td><td class="mdescRight">Wait for a POSIX signal to be raised. <br /></td></tr>
<tr class="separator:a59b7e95284ac1a197969d42ee9441ece"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a37ef4b6056484f5580f7d72fcf46fccf"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a37ef4b6056484f5580f7d72fcf46fccf">EV_TIMEOUT</a>   0x01</td></tr>
<tr class="memdesc:a37ef4b6056484f5580f7d72fcf46fccf"><td class="mdescLeft"> </td><td class="mdescRight">Indicates that a timeout has occurred. <a href="event_8h.html#a37ef4b6056484f5580f7d72fcf46fccf">More...</a><br /></td></tr>
<tr class="separator:a37ef4b6056484f5580f7d72fcf46fccf"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2a31813fa3b26bf2d150512cbbf893f7"><td class="memItemLeft" align="right" valign="top"><a id="a2a31813fa3b26bf2d150512cbbf893f7"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a2a31813fa3b26bf2d150512cbbf893f7">EV_WRITE</a>   0x04</td></tr>
<tr class="memdesc:a2a31813fa3b26bf2d150512cbbf893f7"><td class="mdescLeft"> </td><td class="mdescRight">Wait for a socket or FD to become writeable. <br /></td></tr>
<tr class="separator:a2a31813fa3b26bf2d150512cbbf893f7"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">evtimer_* macros</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p>Aliases for working with one-shot timer events If you need EV_PERSIST timer use event_*() functions. </p>
</div></td></tr>
<tr class="memitem:a6ea3ca87057c66fd9f5a9fda9b911f8b"><td class="memItemLeft" align="right" valign="top"><a id="a6ea3ca87057c66fd9f5a9fda9b911f8b"></a>
#define </td><td class="memItemRight" valign="bottom"><b>evtimer_add</b>(ev, tv)   <a class="el" href="event_8h.html#ab0c85ebe9cf057be1aa17724c701b0c8">event_add</a>((ev), (tv))</td></tr>
<tr class="separator:a6ea3ca87057c66fd9f5a9fda9b911f8b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a356b4550edd470440efa7a74da413939"><td class="memItemLeft" align="right" valign="top"><a id="a356b4550edd470440efa7a74da413939"></a>
#define </td><td class="memItemRight" valign="bottom"><b>evtimer_assign</b>(ev, b, cb, arg)   <a class="el" href="event_8h.html#a3e49a8172e00ae82959dfe64684eda11">event_assign</a>((ev), (b), -1, 0, (cb), (arg))</td></tr>
<tr class="separator:a356b4550edd470440efa7a74da413939"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a22f7e7b422e9098d9362626d47b77525"><td class="memItemLeft" align="right" valign="top"><a id="a22f7e7b422e9098d9362626d47b77525"></a>
#define </td><td class="memItemRight" valign="bottom"><b>evtimer_del</b>(ev)   <a class="el" href="event_8h.html#a2ffc10a652c67bea16b0a71f7d5a44dc">event_del</a>(ev)</td></tr>
<tr class="separator:a22f7e7b422e9098d9362626d47b77525"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a765c62ada275b4114ca0494e9d1f0047"><td class="memItemLeft" align="right" valign="top"><a id="a765c62ada275b4114ca0494e9d1f0047"></a>
#define </td><td class="memItemRight" valign="bottom"><b>evtimer_initialized</b>(ev)   <a class="el" href="event_8h.html#a85b94b111b8aa7fb480fc2f9da7f8e18">event_initialized</a>(ev)</td></tr>
<tr class="separator:a765c62ada275b4114ca0494e9d1f0047"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a76b701417f1cd29208019283d1fd1691"><td class="memItemLeft" align="right" valign="top"><a id="a76b701417f1cd29208019283d1fd1691"></a>
#define </td><td class="memItemRight" valign="bottom"><b>evtimer_new</b>(b, cb, arg)   <a class="el" href="event_8h.html#a6cd300e5cd15601c5e4570b221b20397">event_new</a>((b), -1, 0, (cb), (arg))</td></tr>
<tr class="separator:a76b701417f1cd29208019283d1fd1691"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7037bae3f2fb09eb2752e8252b63a5a6"><td class="memItemLeft" align="right" valign="top"><a id="a7037bae3f2fb09eb2752e8252b63a5a6"></a>
#define </td><td class="memItemRight" valign="bottom"><b>evtimer_pending</b>(ev, tv)   <a class="el" href="event_8h.html#a9b1687396305898af018c74e63486eb5">event_pending</a>((ev), <a class="el" href="event_8h.html#a37ef4b6056484f5580f7d72fcf46fccf">EV_TIMEOUT</a>, (tv))</td></tr>
<tr class="separator:a7037bae3f2fb09eb2752e8252b63a5a6"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">evsignal_* macros</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p>Aliases for working with signal events </p>
</div></td></tr>
<tr class="memitem:a043e61907ad2ae55d61f5c5e109729dd"><td class="memItemLeft" align="right" valign="top"><a id="a043e61907ad2ae55d61f5c5e109729dd"></a>
#define </td><td class="memItemRight" valign="bottom"><b>evsignal_add</b>(ev, tv)   <a class="el" href="event_8h.html#ab0c85ebe9cf057be1aa17724c701b0c8">event_add</a>((ev), (tv))</td></tr>
<tr class="separator:a043e61907ad2ae55d61f5c5e109729dd"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a08eae4d05e8e104b1d72bb73eaf95da4"><td class="memItemLeft" align="right" valign="top"><a id="a08eae4d05e8e104b1d72bb73eaf95da4"></a>
#define </td><td class="memItemRight" valign="bottom"><b>evsignal_assign</b>(ev, b, x, cb, arg)   <a class="el" href="event_8h.html#a3e49a8172e00ae82959dfe64684eda11">event_assign</a>((ev), (b), (x), <a class="el" href="event_8h.html#a59b7e95284ac1a197969d42ee9441ece">EV_SIGNAL</a>|<a class="el" href="event_8h.html#a3c4947a60eb6d09327c61f89135f9f37">EV_PERSIST</a>, cb, (arg))</td></tr>
<tr class="separator:a08eae4d05e8e104b1d72bb73eaf95da4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af2cca0259e62d40d8470e9b574568f74"><td class="memItemLeft" align="right" valign="top"><a id="af2cca0259e62d40d8470e9b574568f74"></a>
#define </td><td class="memItemRight" valign="bottom"><b>evsignal_del</b>(ev)   <a class="el" href="event_8h.html#a2ffc10a652c67bea16b0a71f7d5a44dc">event_del</a>(ev)</td></tr>
<tr class="separator:af2cca0259e62d40d8470e9b574568f74"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa39848850017245c2e946c49c5a51a9d"><td class="memItemLeft" align="right" valign="top"><a id="aa39848850017245c2e946c49c5a51a9d"></a>
#define </td><td class="memItemRight" valign="bottom"><b>evsignal_initialized</b>(ev)   <a class="el" href="event_8h.html#a85b94b111b8aa7fb480fc2f9da7f8e18">event_initialized</a>(ev)</td></tr>
<tr class="separator:aa39848850017245c2e946c49c5a51a9d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a990ce36ac02fb1033a0cc56df968b4c4"><td class="memItemLeft" align="right" valign="top"><a id="a990ce36ac02fb1033a0cc56df968b4c4"></a>
#define </td><td class="memItemRight" valign="bottom"><b>evsignal_new</b>(b, x, cb, arg)   <a class="el" href="event_8h.html#a6cd300e5cd15601c5e4570b221b20397">event_new</a>((b), (x), <a class="el" href="event_8h.html#a59b7e95284ac1a197969d42ee9441ece">EV_SIGNAL</a>|<a class="el" href="event_8h.html#a3c4947a60eb6d09327c61f89135f9f37">EV_PERSIST</a>, (cb), (arg))</td></tr>
<tr class="separator:a990ce36ac02fb1033a0cc56df968b4c4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aee9bcb501fce2f2b7d5bc19e5d53b611"><td class="memItemLeft" align="right" valign="top"><a id="aee9bcb501fce2f2b7d5bc19e5d53b611"></a>
#define </td><td class="memItemRight" valign="bottom"><b>evsignal_pending</b>(ev, tv)   <a class="el" href="event_8h.html#a9b1687396305898af018c74e63486eb5">event_pending</a>((ev), <a class="el" href="event_8h.html#a59b7e95284ac1a197969d42ee9441ece">EV_SIGNAL</a>, (tv))</td></tr>
<tr class="separator:aee9bcb501fce2f2b7d5bc19e5d53b611"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">evuser_* macros</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p>Aliases for working with user-triggered events If you need EV_PERSIST event use event_*() functions. </p>
</div></td></tr>
<tr class="memitem:a39b0d7af364067366eb8c9d193b752cd"><td class="memItemLeft" align="right" valign="top"><a id="a39b0d7af364067366eb8c9d193b752cd"></a>
#define </td><td class="memItemRight" valign="bottom"><b>evuser_del</b>(ev)   <a class="el" href="event_8h.html#a2ffc10a652c67bea16b0a71f7d5a44dc">event_del</a>(ev)</td></tr>
<tr class="separator:a39b0d7af364067366eb8c9d193b752cd"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5298763263275887cfa6cb9f2bd2c9ba"><td class="memItemLeft" align="right" valign="top"><a id="a5298763263275887cfa6cb9f2bd2c9ba"></a>
#define </td><td class="memItemRight" valign="bottom"><b>evuser_initialized</b>(ev)   <a class="el" href="event_8h.html#a85b94b111b8aa7fb480fc2f9da7f8e18">event_initialized</a>(ev)</td></tr>
<tr class="separator:a5298763263275887cfa6cb9f2bd2c9ba"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab8dcf9caae6e1f9d3dc2ddea45f1bfe8"><td class="memItemLeft" align="right" valign="top"><a id="ab8dcf9caae6e1f9d3dc2ddea45f1bfe8"></a>
#define </td><td class="memItemRight" valign="bottom"><b>evuser_new</b>(b, cb, arg)   <a class="el" href="event_8h.html#a6cd300e5cd15601c5e4570b221b20397">event_new</a>((b), -1, 0, (cb), (arg))</td></tr>
<tr class="separator:ab8dcf9caae6e1f9d3dc2ddea45f1bfe8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3c99455628ca64bb0b87f5af8bdf952e"><td class="memItemLeft" align="right" valign="top"><a id="a3c99455628ca64bb0b87f5af8bdf952e"></a>
#define </td><td class="memItemRight" valign="bottom"><b>evuser_pending</b>(ev, tv)   <a class="el" href="event_8h.html#a9b1687396305898af018c74e63486eb5">event_pending</a>((ev), 0, (tv))</td></tr>
<tr class="separator:a3c99455628ca64bb0b87f5af8bdf952e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7ccbe94b015a8292dbee6edde291ccc8"><td class="memItemLeft" align="right" valign="top"><a id="a7ccbe94b015a8292dbee6edde291ccc8"></a>
#define </td><td class="memItemRight" valign="bottom"><b>evuser_trigger</b>(ev)   <a class="el" href="event_8h.html#a31d9440cf2b7010e32a05a2142a91525">event_active</a>((ev), 0, 0)</td></tr>
<tr class="separator:a7ccbe94b015a8292dbee6edde291ccc8"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a61f656b17425f17ed857b96d45fc6268"><td class="memItemLeft" align="right" valign="top"><a id="a61f656b17425f17ed857b96d45fc6268"></a>
typedef int(* </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a61f656b17425f17ed857b96d45fc6268">event_base_foreach_event_cb</a>) (const struct <a class="el" href="structevent__base.html">event_base</a> *, const struct <a class="el" href="structevent.html">event</a> *, void *)</td></tr>
<tr class="memdesc:a61f656b17425f17ed857b96d45fc6268"><td class="mdescLeft"> </td><td class="mdescRight">Callback for iterating events in an event base via event_base_foreach_event. <br /></td></tr>
<tr class="separator:a61f656b17425f17ed857b96d45fc6268"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aed2307f3d9b38e07cc10c2607322d758"><td class="memItemLeft" align="right" valign="top">typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#aed2307f3d9b38e07cc10c2607322d758">event_callback_fn</a>) (<a class="el" href="util_8h.html#a7ef0023565082a65020f6e56be59fd0b">evutil_socket_t</a>, short, void *)</td></tr>
<tr class="memdesc:aed2307f3d9b38e07cc10c2607322d758"><td class="mdescLeft"> </td><td class="mdescRight">A callback function for an event. <a href="event_8h.html#aed2307f3d9b38e07cc10c2607322d758">More...</a><br /></td></tr>
<tr class="separator:aed2307f3d9b38e07cc10c2607322d758"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abb799b636f0d3aab6ca17426d88473cf"><td class="memItemLeft" align="right" valign="top">typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#abb799b636f0d3aab6ca17426d88473cf">event_fatal_cb</a>) (int err)</td></tr>
<tr class="memdesc:abb799b636f0d3aab6ca17426d88473cf"><td class="mdescLeft"> </td><td class="mdescRight">A function to be called if Libevent encounters a fatal internal error. <a href="event_8h.html#abb799b636f0d3aab6ca17426d88473cf">More...</a><br /></td></tr>
<tr class="separator:abb799b636f0d3aab6ca17426d88473cf"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6f62afb6e295ee487ad947e4eec18332"><td class="memItemLeft" align="right" valign="top"><a id="a6f62afb6e295ee487ad947e4eec18332"></a>
typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a6f62afb6e295ee487ad947e4eec18332">event_finalize_callback_fn</a>) (struct <a class="el" href="structevent.html">event</a> *, void *)</td></tr>
<tr class="memdesc:a6f62afb6e295ee487ad947e4eec18332"><td class="mdescLeft"> </td><td class="mdescRight">Callback type for event_finalize and event_free_finalize(). <br /></td></tr>
<tr class="separator:a6f62afb6e295ee487ad947e4eec18332"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a185f44c610d7ee21ecba720561b2e09c"><td class="memItemLeft" align="right" valign="top">typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a185f44c610d7ee21ecba720561b2e09c">event_log_cb</a>) (int severity, const char *msg)</td></tr>
<tr class="memdesc:a185f44c610d7ee21ecba720561b2e09c"><td class="mdescLeft"> </td><td class="mdescRight">A callback function used to intercept Libevent's log messages. <a href="event_8h.html#a185f44c610d7ee21ecba720561b2e09c">More...</a><br /></td></tr>
<tr class="separator:a185f44c610d7ee21ecba720561b2e09c"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:acfef69af45abee54725f40f7f29986c5"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#acfef69af45abee54725f40f7f29986c5">event_base_config_flag</a> { <br />
  <a class="el" href="event_8h.html#acfef69af45abee54725f40f7f29986c5ac1302f72251168137258335e945e2ae5">EVENT_BASE_FLAG_NOLOCK</a> = 0x01,
<a class="el" href="event_8h.html#acfef69af45abee54725f40f7f29986c5a230574947412d83f2dd19fe8c7d286e7">EVENT_BASE_FLAG_IGNORE_ENV</a> = 0x02,
<a class="el" href="event_8h.html#acfef69af45abee54725f40f7f29986c5a4ffb2510ab533d7156f412ee4f0c08ea">EVENT_BASE_FLAG_STARTUP_IOCP</a> = 0x04,
<a class="el" href="event_8h.html#acfef69af45abee54725f40f7f29986c5a057dff1977c48174f0a0f0c43ef92ec5">EVENT_BASE_FLAG_NO_CACHE_TIME</a> = 0x08,
<br />
  <a class="el" href="event_8h.html#acfef69af45abee54725f40f7f29986c5acceb45f3098787247044929f92f4296e">EVENT_BASE_FLAG_EPOLL_USE_CHANGELIST</a> = 0x10,
<a class="el" href="event_8h.html#acfef69af45abee54725f40f7f29986c5af6080f1d7c5067868cbc749d1cfe56e9">EVENT_BASE_FLAG_PRECISE_TIMER</a> = 0x20,
<a class="el" href="event_8h.html#acfef69af45abee54725f40f7f29986c5a9eaa69643a73f5fb5959db017c9050a5">EVENT_BASE_FLAG_EPOLL_DISALLOW_TIMERFD</a> = 0x40,
<a class="el" href="event_8h.html#acfef69af45abee54725f40f7f29986c5a86d9f5574e29964187bafe245b211447">EVENT_BASE_FLAG_USE_SIGNALFD</a> = 0x80
<br />
}</td></tr>
<tr class="memdesc:acfef69af45abee54725f40f7f29986c5"><td class="mdescLeft"> </td><td class="mdescRight">A flag passed to <a class="el" href="event_8h.html#ae9e42b61a7e8465b7c897432c4ddcabd" title="Sets one or more flags to configure what parts of the eventual event_base will be initialized,...">event_config_set_flag()</a>. <a href="event_8h.html#acfef69af45abee54725f40f7f29986c5">More...</a><br /></td></tr>
<tr class="separator:acfef69af45abee54725f40f7f29986c5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae7da61aef13e27a3047151b696b44c80"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#ae7da61aef13e27a3047151b696b44c80">event_method_feature</a> { <a class="el" href="event_8h.html#ae7da61aef13e27a3047151b696b44c80ab407cae60af925dba44bd66e56e5f897">EV_FEATURE_ET</a> = 0x01,
<a class="el" href="event_8h.html#ae7da61aef13e27a3047151b696b44c80a7a6f2de86c09b92aa175f950190bf706">EV_FEATURE_O1</a> = 0x02,
<a class="el" href="event_8h.html#ae7da61aef13e27a3047151b696b44c80a2e964e8a8f3033d26d52831fb8eec199">EV_FEATURE_FDS</a> = 0x04,
<a class="el" href="event_8h.html#ae7da61aef13e27a3047151b696b44c80af28b206cf4665dacc2c6bf09446e29b7">EV_FEATURE_EARLY_CLOSE</a> = 0x08
}</td></tr>
<tr class="memdesc:ae7da61aef13e27a3047151b696b44c80"><td class="mdescLeft"> </td><td class="mdescRight">A flag used to describe which features an <a class="el" href="structevent__base.html" title="Structure to hold information and state for a Libevent dispatch loop.">event_base</a> (must) provide. <a href="event_8h.html#ae7da61aef13e27a3047151b696b44c80">More...</a><br /></td></tr>
<tr class="separator:ae7da61aef13e27a3047151b696b44c80"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a31d9440cf2b7010e32a05a2142a91525"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a31d9440cf2b7010e32a05a2142a91525">event_active</a> (struct <a class="el" href="structevent.html">event</a> *ev, int res, short ncalls)</td></tr>
<tr class="memdesc:a31d9440cf2b7010e32a05a2142a91525"><td class="mdescLeft"> </td><td class="mdescRight">Make an event active. <a href="event_8h.html#a31d9440cf2b7010e32a05a2142a91525">More...</a><br /></td></tr>
<tr class="separator:a31d9440cf2b7010e32a05a2142a91525"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab0c85ebe9cf057be1aa17724c701b0c8"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#ab0c85ebe9cf057be1aa17724c701b0c8">event_add</a> (struct <a class="el" href="structevent.html">event</a> *ev, const struct timeval *timeout)</td></tr>
<tr class="memdesc:ab0c85ebe9cf057be1aa17724c701b0c8"><td class="mdescLeft"> </td><td class="mdescRight">Add an event to the set of pending events. <a href="event_8h.html#ab0c85ebe9cf057be1aa17724c701b0c8">More...</a><br /></td></tr>
<tr class="separator:ab0c85ebe9cf057be1aa17724c701b0c8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3e49a8172e00ae82959dfe64684eda11"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a3e49a8172e00ae82959dfe64684eda11">event_assign</a> (struct <a class="el" href="structevent.html">event</a> *ev, struct <a class="el" href="structevent__base.html">event_base</a> *base, <a class="el" href="util_8h.html#a7ef0023565082a65020f6e56be59fd0b">evutil_socket_t</a> fd, short events, <a class="el" href="event_8h.html#aed2307f3d9b38e07cc10c2607322d758">event_callback_fn</a> callback, void *callback_arg)</td></tr>
<tr class="memdesc:a3e49a8172e00ae82959dfe64684eda11"><td class="mdescLeft"> </td><td class="mdescRight">Prepare a new, already-allocated event structure to be added. <a href="event_8h.html#a3e49a8172e00ae82959dfe64684eda11">More...</a><br /></td></tr>
<tr class="separator:a3e49a8172e00ae82959dfe64684eda11"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a092013616b4636c74e889b0b015cb75e"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a092013616b4636c74e889b0b015cb75e">event_base_active_by_fd</a> (struct <a class="el" href="structevent__base.html">event_base</a> *base, <a class="el" href="util_8h.html#a7ef0023565082a65020f6e56be59fd0b">evutil_socket_t</a> fd, short events)</td></tr>
<tr class="memdesc:a092013616b4636c74e889b0b015cb75e"><td class="mdescLeft"> </td><td class="mdescRight">Activates all pending events for the given fd and event mask. <a href="event_8h.html#a092013616b4636c74e889b0b015cb75e">More...</a><br /></td></tr>
<tr class="separator:a092013616b4636c74e889b0b015cb75e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4bca4d24a15bef084bf066faca8a43d2"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a4bca4d24a15bef084bf066faca8a43d2">event_base_active_by_signal</a> (struct <a class="el" href="structevent__base.html">event_base</a> *base, int sig)</td></tr>
<tr class="memdesc:a4bca4d24a15bef084bf066faca8a43d2"><td class="mdescLeft"> </td><td class="mdescRight">Activates all pending signals with a given signal number. <a href="event_8h.html#a4bca4d24a15bef084bf066faca8a43d2">More...</a><br /></td></tr>
<tr class="separator:a4bca4d24a15bef084bf066faca8a43d2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a19d60cb72a1af398247f40e92cf07056"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a19d60cb72a1af398247f40e92cf07056">event_base_dispatch</a> (struct <a class="el" href="structevent__base.html">event_base</a> *base)</td></tr>
<tr class="memdesc:a19d60cb72a1af398247f40e92cf07056"><td class="mdescLeft"> </td><td class="mdescRight">Event dispatching loop. <a href="event_8h.html#a19d60cb72a1af398247f40e92cf07056">More...</a><br /></td></tr>
<tr class="separator:a19d60cb72a1af398247f40e92cf07056"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae3ed8b33f9e0d797615c2f86ff30f5fb"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#ae3ed8b33f9e0d797615c2f86ff30f5fb">event_base_dump_events</a> (struct <a class="el" href="structevent__base.html">event_base</a> *base, FILE *output)</td></tr>
<tr class="memdesc:ae3ed8b33f9e0d797615c2f86ff30f5fb"><td class="mdescLeft"> </td><td class="mdescRight">Writes a human-readable description of all inserted and/or active events to a provided stdio stream. <a href="event_8h.html#ae3ed8b33f9e0d797615c2f86ff30f5fb">More...</a><br /></td></tr>
<tr class="separator:ae3ed8b33f9e0d797615c2f86ff30f5fb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7d5c38711c6a72545b939cc375468f79"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a7d5c38711c6a72545b939cc375468f79">event_base_foreach_event</a> (struct <a class="el" href="structevent__base.html">event_base</a> *base, <a class="el" href="event_8h.html#a61f656b17425f17ed857b96d45fc6268">event_base_foreach_event_cb</a> fn, void *arg)</td></tr>
<tr class="memdesc:a7d5c38711c6a72545b939cc375468f79"><td class="mdescLeft"> </td><td class="mdescRight">Iterate over all added or active events events in an event loop, and invoke a given callback on each one. <a href="event_8h.html#a7d5c38711c6a72545b939cc375468f79">More...</a><br /></td></tr>
<tr class="separator:a7d5c38711c6a72545b939cc375468f79"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a91f9deb12c37f2ff586e65e8b9a46641"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a91f9deb12c37f2ff586e65e8b9a46641">event_base_free</a> (struct <a class="el" href="structevent__base.html">event_base</a> *eb)</td></tr>
<tr class="memdesc:a91f9deb12c37f2ff586e65e8b9a46641"><td class="mdescLeft"> </td><td class="mdescRight">Deallocate all memory associated with an <a class="el" href="structevent__base.html" title="Structure to hold information and state for a Libevent dispatch loop.">event_base</a>, and free the base. <a href="event_8h.html#a91f9deb12c37f2ff586e65e8b9a46641">More...</a><br /></td></tr>
<tr class="separator:a91f9deb12c37f2ff586e65e8b9a46641"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a385fb6f81ab73f9c95d77b7179f780e0"><td class="memItemLeft" align="right" valign="top"><a id="a385fb6f81ab73f9c95d77b7179f780e0"></a>
EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a385fb6f81ab73f9c95d77b7179f780e0">event_base_free_nofinalize</a> (struct <a class="el" href="structevent__base.html">event_base</a> *)</td></tr>
<tr class="memdesc:a385fb6f81ab73f9c95d77b7179f780e0"><td class="mdescLeft"> </td><td class="mdescRight">As event_base_free, but do not run finalizers. <br /></td></tr>
<tr class="separator:a385fb6f81ab73f9c95d77b7179f780e0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aced890aa77dac1669325f74a27584f03"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#aced890aa77dac1669325f74a27584f03">event_base_get_features</a> (const struct <a class="el" href="structevent__base.html">event_base</a> *base)</td></tr>
<tr class="memdesc:aced890aa77dac1669325f74a27584f03"><td class="mdescLeft"> </td><td class="mdescRight">Return a bitmask of the features implemented by an event base. <a href="event_8h.html#aced890aa77dac1669325f74a27584f03">More...</a><br /></td></tr>
<tr class="separator:aced890aa77dac1669325f74a27584f03"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9cf1a991dcad465adf4330a79576b148"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a9cf1a991dcad465adf4330a79576b148">event_base_get_max_events</a> (struct <a class="el" href="structevent__base.html">event_base</a> *eb, unsigned int flags, int clear)</td></tr>
<tr class="memdesc:a9cf1a991dcad465adf4330a79576b148"><td class="mdescLeft"> </td><td class="mdescRight">Get the maximum number of events in a given <a class="el" href="structevent__base.html" title="Structure to hold information and state for a Libevent dispatch loop.">event_base</a> as specified in the flags. <a href="event_8h.html#a9cf1a991dcad465adf4330a79576b148">More...</a><br /></td></tr>
<tr class="separator:a9cf1a991dcad465adf4330a79576b148"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae0910900c306cef32e2623272c7b7cb0"><td class="memItemLeft" align="right" valign="top">const EVENT2_EXPORT_SYMBOL char * </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#ae0910900c306cef32e2623272c7b7cb0">event_base_get_method</a> (const struct <a class="el" href="structevent__base.html">event_base</a> *eb)</td></tr>
<tr class="memdesc:ae0910900c306cef32e2623272c7b7cb0"><td class="mdescLeft"> </td><td class="mdescRight">Get the kernel event notification mechanism used by Libevent. <a href="event_8h.html#ae0910900c306cef32e2623272c7b7cb0">More...</a><br /></td></tr>
<tr class="separator:ae0910900c306cef32e2623272c7b7cb0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3c91bec6e27bf2e26e8ecbb286787cc5"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a3c91bec6e27bf2e26e8ecbb286787cc5">event_base_get_npriorities</a> (struct <a class="el" href="structevent__base.html">event_base</a> *eb)</td></tr>
<tr class="memdesc:a3c91bec6e27bf2e26e8ecbb286787cc5"><td class="mdescLeft"> </td><td class="mdescRight">Get the number of different event priorities. <a href="event_8h.html#a3c91bec6e27bf2e26e8ecbb286787cc5">More...</a><br /></td></tr>
<tr class="separator:a3c91bec6e27bf2e26e8ecbb286787cc5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3dd8aaea50a18e1b300ae6a138132743"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a3dd8aaea50a18e1b300ae6a138132743">event_base_get_num_events</a> (struct <a class="el" href="structevent__base.html">event_base</a> *eb, unsigned int flags)</td></tr>
<tr class="memdesc:a3dd8aaea50a18e1b300ae6a138132743"><td class="mdescLeft"> </td><td class="mdescRight">Gets the number of events in <a class="el" href="structevent__base.html" title="Structure to hold information and state for a Libevent dispatch loop.">event_base</a>, as specified in the flags. <a href="event_8h.html#a3dd8aaea50a18e1b300ae6a138132743">More...</a><br /></td></tr>
<tr class="separator:a3dd8aaea50a18e1b300ae6a138132743"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a23276914af0b2527951cc7c47b46f00b"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL struct <a class="el" href="structevent.html">event</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a23276914af0b2527951cc7c47b46f00b">event_base_get_running_event</a> (struct <a class="el" href="structevent__base.html">event_base</a> *base)</td></tr>
<tr class="memdesc:a23276914af0b2527951cc7c47b46f00b"><td class="mdescLeft"> </td><td class="mdescRight">If called from within the callback for an event, returns that event. <a href="event_8h.html#a23276914af0b2527951cc7c47b46f00b">More...</a><br /></td></tr>
<tr class="separator:a23276914af0b2527951cc7c47b46f00b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a138b72aa85ec5c344714867204ed3d3d"><td class="memItemLeft" align="right" valign="top">const EVENT2_EXPORT_SYMBOL char * </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a138b72aa85ec5c344714867204ed3d3d">event_base_get_signal_method</a> (const struct <a class="el" href="structevent__base.html">event_base</a> *eb)</td></tr>
<tr class="memdesc:a138b72aa85ec5c344714867204ed3d3d"><td class="mdescLeft"> </td><td class="mdescRight">Get the kernel signal handling mechanism used by Libevent. <a href="event_8h.html#a138b72aa85ec5c344714867204ed3d3d">More...</a><br /></td></tr>
<tr class="separator:a138b72aa85ec5c344714867204ed3d3d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0fbd35d624f1c865329a2a388afba3fd"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a0fbd35d624f1c865329a2a388afba3fd">event_base_gettimeofday_cached</a> (struct <a class="el" href="structevent__base.html">event_base</a> *base, struct timeval *tv)</td></tr>
<tr class="memdesc:a0fbd35d624f1c865329a2a388afba3fd"><td class="mdescLeft"> </td><td class="mdescRight">Sets 'tv' to the current time (as returned by gettimeofday()), looking at the cached value in 'base' if possible, and calling gettimeofday() or clock_gettime() as appropriate if there is no cached time. <a href="event_8h.html#a0fbd35d624f1c865329a2a388afba3fd">More...</a><br /></td></tr>
<tr class="separator:a0fbd35d624f1c865329a2a388afba3fd"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae3853087c016ff8e877d914b1bda8f90"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#ae3853087c016ff8e877d914b1bda8f90">event_base_got_break</a> (struct <a class="el" href="structevent__base.html">event_base</a> *eb)</td></tr>
<tr class="memdesc:ae3853087c016ff8e877d914b1bda8f90"><td class="mdescLeft"> </td><td class="mdescRight">Checks if the event loop was told to abort immediately by <a class="el" href="event_8h.html#a28e0be91488e8a0ed57a582f3343eaf6" title="Abort the active event_base_loop() immediately.">event_base_loopbreak()</a>. <a href="event_8h.html#ae3853087c016ff8e877d914b1bda8f90">More...</a><br /></td></tr>
<tr class="separator:ae3853087c016ff8e877d914b1bda8f90"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a654b3b2c5923a9c0620907701383f6dd"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a654b3b2c5923a9c0620907701383f6dd">event_base_got_exit</a> (struct <a class="el" href="structevent__base.html">event_base</a> *eb)</td></tr>
<tr class="memdesc:a654b3b2c5923a9c0620907701383f6dd"><td class="mdescLeft"> </td><td class="mdescRight">Checks if the event loop was told to exit by <a class="el" href="event_8h.html#a67ba4db4b6e7467b3412219530603e60" title="Exit the event loop after the specified time.">event_base_loopexit()</a>. <a href="event_8h.html#a654b3b2c5923a9c0620907701383f6dd">More...</a><br /></td></tr>
<tr class="separator:a654b3b2c5923a9c0620907701383f6dd"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a46b388babfda66dcb897c9e4dbd233b1"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL const struct timeval * </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a46b388babfda66dcb897c9e4dbd233b1">event_base_init_common_timeout</a> (struct <a class="el" href="structevent__base.html">event_base</a> *base, const struct timeval *duration)</td></tr>
<tr class="memdesc:a46b388babfda66dcb897c9e4dbd233b1"><td class="mdescLeft"> </td><td class="mdescRight">Prepare an <a class="el" href="structevent__base.html" title="Structure to hold information and state for a Libevent dispatch loop.">event_base</a> to use a large number of timeouts with the same duration. <a href="event_8h.html#a46b388babfda66dcb897c9e4dbd233b1">More...</a><br /></td></tr>
<tr class="separator:a46b388babfda66dcb897c9e4dbd233b1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:acd7da32086d1e37008e7c76c9ea54fc4"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#acd7da32086d1e37008e7c76c9ea54fc4">event_base_loop</a> (struct <a class="el" href="structevent__base.html">event_base</a> *eb, int flags)</td></tr>
<tr class="memdesc:acd7da32086d1e37008e7c76c9ea54fc4"><td class="mdescLeft"> </td><td class="mdescRight">Wait for events to become active, and run their callbacks. <a href="event_8h.html#acd7da32086d1e37008e7c76c9ea54fc4">More...</a><br /></td></tr>
<tr class="separator:acd7da32086d1e37008e7c76c9ea54fc4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a28e0be91488e8a0ed57a582f3343eaf6"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a28e0be91488e8a0ed57a582f3343eaf6">event_base_loopbreak</a> (struct <a class="el" href="structevent__base.html">event_base</a> *eb)</td></tr>
<tr class="memdesc:a28e0be91488e8a0ed57a582f3343eaf6"><td class="mdescLeft"> </td><td class="mdescRight">Abort the active <a class="el" href="event_8h.html#acd7da32086d1e37008e7c76c9ea54fc4" title="Wait for events to become active, and run their callbacks.">event_base_loop()</a> immediately. <a href="event_8h.html#a28e0be91488e8a0ed57a582f3343eaf6">More...</a><br /></td></tr>
<tr class="separator:a28e0be91488e8a0ed57a582f3343eaf6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a34ce349afe4a37119e1ac50710642ccb"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a34ce349afe4a37119e1ac50710642ccb">event_base_loopcontinue</a> (struct <a class="el" href="structevent__base.html">event_base</a> *eb)</td></tr>
<tr class="memdesc:a34ce349afe4a37119e1ac50710642ccb"><td class="mdescLeft"> </td><td class="mdescRight">Tell the active <a class="el" href="event_8h.html#acd7da32086d1e37008e7c76c9ea54fc4" title="Wait for events to become active, and run their callbacks.">event_base_loop()</a> to scan for new events immediately. <a href="event_8h.html#a34ce349afe4a37119e1ac50710642ccb">More...</a><br /></td></tr>
<tr class="separator:a34ce349afe4a37119e1ac50710642ccb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a67ba4db4b6e7467b3412219530603e60"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a67ba4db4b6e7467b3412219530603e60">event_base_loopexit</a> (struct <a class="el" href="structevent__base.html">event_base</a> *eb, const struct timeval *tv)</td></tr>
<tr class="memdesc:a67ba4db4b6e7467b3412219530603e60"><td class="mdescLeft"> </td><td class="mdescRight">Exit the event loop after the specified time. <a href="event_8h.html#a67ba4db4b6e7467b3412219530603e60">More...</a><br /></td></tr>
<tr class="separator:a67ba4db4b6e7467b3412219530603e60"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af34c025430d445427a2a5661082405c3"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL struct <a class="el" href="structevent__base.html">event_base</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#af34c025430d445427a2a5661082405c3">event_base_new</a> (void)</td></tr>
<tr class="memdesc:af34c025430d445427a2a5661082405c3"><td class="mdescLeft"> </td><td class="mdescRight">Create and return a new <a class="el" href="structevent__base.html" title="Structure to hold information and state for a Libevent dispatch loop.">event_base</a> to use with the rest of Libevent. <a href="event_8h.html#af34c025430d445427a2a5661082405c3">More...</a><br /></td></tr>
<tr class="separator:af34c025430d445427a2a5661082405c3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a864798e5b3c6aa8d2f9e9c5035a3e6da"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL struct <a class="el" href="structevent__base.html">event_base</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a864798e5b3c6aa8d2f9e9c5035a3e6da">event_base_new_with_config</a> (const struct <a class="el" href="structevent__config.html">event_config</a> *cfg)</td></tr>
<tr class="memdesc:a864798e5b3c6aa8d2f9e9c5035a3e6da"><td class="mdescLeft"> </td><td class="mdescRight">Initialize the event API. <a href="event_8h.html#a864798e5b3c6aa8d2f9e9c5035a3e6da">More...</a><br /></td></tr>
<tr class="separator:a864798e5b3c6aa8d2f9e9c5035a3e6da"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae4d40e572ad8310897ce06f9fe0f9062"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#ae4d40e572ad8310897ce06f9fe0f9062">event_base_once</a> (struct <a class="el" href="structevent__base.html">event_base</a> *base, <a class="el" href="util_8h.html#a7ef0023565082a65020f6e56be59fd0b">evutil_socket_t</a> fd, short events, <a class="el" href="event_8h.html#aed2307f3d9b38e07cc10c2607322d758">event_callback_fn</a> callback, void *arg, const struct timeval *timeout)</td></tr>
<tr class="memdesc:ae4d40e572ad8310897ce06f9fe0f9062"><td class="mdescLeft"> </td><td class="mdescRight">Schedule a one-time event. <a href="event_8h.html#ae4d40e572ad8310897ce06f9fe0f9062">More...</a><br /></td></tr>
<tr class="separator:ae4d40e572ad8310897ce06f9fe0f9062"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a289e44ce22c816060bf7b7bfe38720b9"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a289e44ce22c816060bf7b7bfe38720b9">event_base_priority_init</a> (struct <a class="el" href="structevent__base.html">event_base</a> *eb, int npriorities)</td></tr>
<tr class="memdesc:a289e44ce22c816060bf7b7bfe38720b9"><td class="mdescLeft"> </td><td class="mdescRight">Set the number of different event priorities. <a href="event_8h.html#a289e44ce22c816060bf7b7bfe38720b9">More...</a><br /></td></tr>
<tr class="separator:a289e44ce22c816060bf7b7bfe38720b9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a20fb823ec65b17519ec07aee1a0a22ba"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a20fb823ec65b17519ec07aee1a0a22ba">event_base_set</a> (struct <a class="el" href="structevent__base.html">event_base</a> *eb, struct <a class="el" href="structevent.html">event</a> *ev)</td></tr>
<tr class="memdesc:a20fb823ec65b17519ec07aee1a0a22ba"><td class="mdescLeft"> </td><td class="mdescRight">Associate a different event base with an event. <a href="event_8h.html#a20fb823ec65b17519ec07aee1a0a22ba">More...</a><br /></td></tr>
<tr class="separator:a20fb823ec65b17519ec07aee1a0a22ba"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae920425b48421c3cb7cb5e0802e4af9d"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#ae920425b48421c3cb7cb5e0802e4af9d">event_base_update_cache_time</a> (struct <a class="el" href="structevent__base.html">event_base</a> *base)</td></tr>
<tr class="memdesc:ae920425b48421c3cb7cb5e0802e4af9d"><td class="mdescLeft"> </td><td class="mdescRight">Update cached_tv in the 'base' to the current time. <a href="event_8h.html#ae920425b48421c3cb7cb5e0802e4af9d">More...</a><br /></td></tr>
<tr class="separator:ae920425b48421c3cb7cb5e0802e4af9d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac5328011d251a7af085fdc19deb748bc"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#ac5328011d251a7af085fdc19deb748bc">event_config_avoid_method</a> (struct <a class="el" href="structevent__config.html">event_config</a> *cfg, const char *method)</td></tr>
<tr class="memdesc:ac5328011d251a7af085fdc19deb748bc"><td class="mdescLeft"> </td><td class="mdescRight">Enters an event method that should be avoided into the configuration. <a href="event_8h.html#ac5328011d251a7af085fdc19deb748bc">More...</a><br /></td></tr>
<tr class="separator:ac5328011d251a7af085fdc19deb748bc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad7917192d1f78884de03a8777013fd1c"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#ad7917192d1f78884de03a8777013fd1c">event_config_free</a> (struct <a class="el" href="structevent__config.html">event_config</a> *cfg)</td></tr>
<tr class="memdesc:ad7917192d1f78884de03a8777013fd1c"><td class="mdescLeft"> </td><td class="mdescRight">Deallocates all memory associated with an event configuration object. <a href="event_8h.html#ad7917192d1f78884de03a8777013fd1c">More...</a><br /></td></tr>
<tr class="separator:ad7917192d1f78884de03a8777013fd1c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a76f3b4191e43c8b4758b99da761c858e"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL struct <a class="el" href="structevent__config.html">event_config</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a76f3b4191e43c8b4758b99da761c858e">event_config_new</a> (void)</td></tr>
<tr class="memdesc:a76f3b4191e43c8b4758b99da761c858e"><td class="mdescLeft"> </td><td class="mdescRight">Allocates a new event configuration object. <a href="event_8h.html#a76f3b4191e43c8b4758b99da761c858e">More...</a><br /></td></tr>
<tr class="separator:a76f3b4191e43c8b4758b99da761c858e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab76526f5bcd7b05d63f38fca439d7492"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#ab76526f5bcd7b05d63f38fca439d7492">event_config_require_features</a> (struct <a class="el" href="structevent__config.html">event_config</a> *cfg, int feature)</td></tr>
<tr class="memdesc:ab76526f5bcd7b05d63f38fca439d7492"><td class="mdescLeft"> </td><td class="mdescRight">Enters a required event method feature that the application demands. <a href="event_8h.html#ab76526f5bcd7b05d63f38fca439d7492">More...</a><br /></td></tr>
<tr class="separator:ab76526f5bcd7b05d63f38fca439d7492"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae9e42b61a7e8465b7c897432c4ddcabd"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#ae9e42b61a7e8465b7c897432c4ddcabd">event_config_set_flag</a> (struct <a class="el" href="structevent__config.html">event_config</a> *cfg, int flag)</td></tr>
<tr class="memdesc:ae9e42b61a7e8465b7c897432c4ddcabd"><td class="mdescLeft"> </td><td class="mdescRight">Sets one or more flags to configure what parts of the eventual <a class="el" href="structevent__base.html" title="Structure to hold information and state for a Libevent dispatch loop.">event_base</a> will be initialized, and how they'll work. <a href="event_8h.html#ae9e42b61a7e8465b7c897432c4ddcabd">More...</a><br /></td></tr>
<tr class="separator:ae9e42b61a7e8465b7c897432c4ddcabd"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aeb08f9ff880ff8a07eb623124f48f979"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#aeb08f9ff880ff8a07eb623124f48f979">event_config_set_max_dispatch_interval</a> (struct <a class="el" href="structevent__config.html">event_config</a> *cfg, const struct timeval *max_interval, int max_callbacks, int min_priority)</td></tr>
<tr class="memdesc:aeb08f9ff880ff8a07eb623124f48f979"><td class="mdescLeft"> </td><td class="mdescRight">Record an interval and/or a number of callbacks after which the event base should check for new events. <a href="event_8h.html#aeb08f9ff880ff8a07eb623124f48f979">More...</a><br /></td></tr>
<tr class="separator:aeb08f9ff880ff8a07eb623124f48f979"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a472425045a342e48429e408eaeb81d18"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a472425045a342e48429e408eaeb81d18">event_config_set_num_cpus_hint</a> (struct <a class="el" href="structevent__config.html">event_config</a> *cfg, int cpus)</td></tr>
<tr class="memdesc:a472425045a342e48429e408eaeb81d18"><td class="mdescLeft"> </td><td class="mdescRight">Records a hint for the number of CPUs in the system. <a href="event_8h.html#a472425045a342e48429e408eaeb81d18">More...</a><br /></td></tr>
<tr class="separator:a472425045a342e48429e408eaeb81d18"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1347923dccea548c036ccc7614c5b595"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a1347923dccea548c036ccc7614c5b595">event_debug_unassign</a> (struct <a class="el" href="structevent.html">event</a> *)</td></tr>
<tr class="memdesc:a1347923dccea548c036ccc7614c5b595"><td class="mdescLeft"> </td><td class="mdescRight">When debugging mode is enabled, informs Libevent that an event should no longer be considered as assigned. <a href="event_8h.html#a1347923dccea548c036ccc7614c5b595">More...</a><br /></td></tr>
<tr class="separator:a1347923dccea548c036ccc7614c5b595"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2ffc10a652c67bea16b0a71f7d5a44dc"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a2ffc10a652c67bea16b0a71f7d5a44dc">event_del</a> (struct <a class="el" href="structevent.html">event</a> *ev)</td></tr>
<tr class="memdesc:a2ffc10a652c67bea16b0a71f7d5a44dc"><td class="mdescLeft"> </td><td class="mdescRight">Remove an event from the set of monitored events. <a href="event_8h.html#a2ffc10a652c67bea16b0a71f7d5a44dc">More...</a><br /></td></tr>
<tr class="separator:a2ffc10a652c67bea16b0a71f7d5a44dc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8236f5e7e9d845cd127e768b2747df9c"><td class="memItemLeft" align="right" valign="top"><a id="a8236f5e7e9d845cd127e768b2747df9c"></a>
EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a8236f5e7e9d845cd127e768b2747df9c">event_del_block</a> (struct <a class="el" href="structevent.html">event</a> *ev)</td></tr>
<tr class="memdesc:a8236f5e7e9d845cd127e768b2747df9c"><td class="mdescLeft"> </td><td class="mdescRight">As <a class="el" href="event_8h.html#a2ffc10a652c67bea16b0a71f7d5a44dc" title="Remove an event from the set of monitored events.">event_del()</a>, but always blocks while the event's callback is running in another thread, even if the event was constructed with the EV_FINALIZE flag. <br /></td></tr>
<tr class="separator:a8236f5e7e9d845cd127e768b2747df9c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a54ae25b313b15e6038b5dd87c740e39e"><td class="memItemLeft" align="right" valign="top"><a id="a54ae25b313b15e6038b5dd87c740e39e"></a>
EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a54ae25b313b15e6038b5dd87c740e39e">event_del_noblock</a> (struct <a class="el" href="structevent.html">event</a> *ev)</td></tr>
<tr class="memdesc:a54ae25b313b15e6038b5dd87c740e39e"><td class="mdescLeft"> </td><td class="mdescRight">As <a class="el" href="event_8h.html#a2ffc10a652c67bea16b0a71f7d5a44dc" title="Remove an event from the set of monitored events.">event_del()</a>, but never blocks while the event's callback is running in another thread, even if the event was constructed without the EV_FINALIZE flag. <br /></td></tr>
<tr class="separator:a54ae25b313b15e6038b5dd87c740e39e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abce01eafdfef974a80fdf9a507f5eca9"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#abce01eafdfef974a80fdf9a507f5eca9">event_enable_debug_logging</a> (ev_uint32_t which)</td></tr>
<tr class="memdesc:abce01eafdfef974a80fdf9a507f5eca9"><td class="mdescLeft"> </td><td class="mdescRight">Turn on debugging logs and have them sent to the default log handler. <a href="event_8h.html#abce01eafdfef974a80fdf9a507f5eca9">More...</a><br /></td></tr>
<tr class="separator:abce01eafdfef974a80fdf9a507f5eca9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a37441a3defac55b5d2513521964b2af5"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a37441a3defac55b5d2513521964b2af5">event_enable_debug_mode</a> (void)</td></tr>
<tr class="memdesc:a37441a3defac55b5d2513521964b2af5"><td class="mdescLeft"> </td><td class="mdescRight">Enable some relatively expensive debugging checks in Libevent that would normally be turned off. <a href="event_8h.html#a37441a3defac55b5d2513521964b2af5">More...</a><br /></td></tr>
<tr class="separator:a37441a3defac55b5d2513521964b2af5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1f326019b65d319b2221b7e57d56c273"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a1f326019b65d319b2221b7e57d56c273">event_free</a> (struct <a class="el" href="structevent.html">event</a> *)</td></tr>
<tr class="memdesc:a1f326019b65d319b2221b7e57d56c273"><td class="mdescLeft"> </td><td class="mdescRight">Deallocate a struct event * returned by <a class="el" href="event_8h.html#a6cd300e5cd15601c5e4570b221b20397" title="Allocate and assign a new event structure, ready to be added.">event_new()</a>. <a href="event_8h.html#a1f326019b65d319b2221b7e57d56c273">More...</a><br /></td></tr>
<tr class="separator:a1f326019b65d319b2221b7e57d56c273"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6ddcda6db7bd3fc1e0f635d60e145a03"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a6ddcda6db7bd3fc1e0f635d60e145a03">event_get_assignment</a> (const struct <a class="el" href="structevent.html">event</a> *<a class="el" href="structevent.html">event</a>, struct <a class="el" href="structevent__base.html">event_base</a> **base_out, <a class="el" href="util_8h.html#a7ef0023565082a65020f6e56be59fd0b">evutil_socket_t</a> *fd_out, short *events_out, <a class="el" href="event_8h.html#aed2307f3d9b38e07cc10c2607322d758">event_callback_fn</a> *callback_out, void **arg_out)</td></tr>
<tr class="memdesc:a6ddcda6db7bd3fc1e0f635d60e145a03"><td class="mdescLeft"> </td><td class="mdescRight">Extract <em>all</em> of arguments given to construct a given event. <a href="event_8h.html#a6ddcda6db7bd3fc1e0f635d60e145a03">More...</a><br /></td></tr>
<tr class="separator:a6ddcda6db7bd3fc1e0f635d60e145a03"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab90af034dd2638511f483bd25effdc77"><td class="memItemLeft" align="right" valign="top"><a id="ab90af034dd2638511f483bd25effdc77"></a>
EVENT2_EXPORT_SYMBOL struct <a class="el" href="structevent__base.html">event_base</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#ab90af034dd2638511f483bd25effdc77">event_get_base</a> (const struct <a class="el" href="structevent.html">event</a> *ev)</td></tr>
<tr class="memdesc:ab90af034dd2638511f483bd25effdc77"><td class="mdescLeft"> </td><td class="mdescRight">Get the <a class="el" href="structevent__base.html" title="Structure to hold information and state for a Libevent dispatch loop.">event_base</a> associated with an event. <br /></td></tr>
<tr class="separator:ab90af034dd2638511f483bd25effdc77"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6e325a315660638135385dc3b608bf85"><td class="memItemLeft" align="right" valign="top"><a id="a6e325a315660638135385dc3b608bf85"></a>
EVENT2_EXPORT_SYMBOL <a class="el" href="event_8h.html#aed2307f3d9b38e07cc10c2607322d758">event_callback_fn</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a6e325a315660638135385dc3b608bf85">event_get_callback</a> (const struct <a class="el" href="structevent.html">event</a> *ev)</td></tr>
<tr class="memdesc:a6e325a315660638135385dc3b608bf85"><td class="mdescLeft"> </td><td class="mdescRight">Return the callback assigned to an event. <br /></td></tr>
<tr class="separator:a6e325a315660638135385dc3b608bf85"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad868b16c4dc7450e49ba277b9ee7b467"><td class="memItemLeft" align="right" valign="top"><a id="ad868b16c4dc7450e49ba277b9ee7b467"></a>
EVENT2_EXPORT_SYMBOL void * </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#ad868b16c4dc7450e49ba277b9ee7b467">event_get_callback_arg</a> (const struct <a class="el" href="structevent.html">event</a> *ev)</td></tr>
<tr class="memdesc:ad868b16c4dc7450e49ba277b9ee7b467"><td class="mdescLeft"> </td><td class="mdescRight">Return the callback argument assigned to an event. <br /></td></tr>
<tr class="separator:ad868b16c4dc7450e49ba277b9ee7b467"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a70989121937ecb71358a2d76be772d51"><td class="memItemLeft" align="right" valign="top"><a id="a70989121937ecb71358a2d76be772d51"></a>
EVENT2_EXPORT_SYMBOL short </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a70989121937ecb71358a2d76be772d51">event_get_events</a> (const struct <a class="el" href="structevent.html">event</a> *ev)</td></tr>
<tr class="memdesc:a70989121937ecb71358a2d76be772d51"><td class="mdescLeft"> </td><td class="mdescRight">Return the events (EV_READ, EV_WRITE, etc) assigned to an event. <br /></td></tr>
<tr class="separator:a70989121937ecb71358a2d76be772d51"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4f63589ebe3e0d4c9e20447f96d343b2"><td class="memItemLeft" align="right" valign="top"><a id="a4f63589ebe3e0d4c9e20447f96d343b2"></a>
EVENT2_EXPORT_SYMBOL <a class="el" href="util_8h.html#a7ef0023565082a65020f6e56be59fd0b">evutil_socket_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a4f63589ebe3e0d4c9e20447f96d343b2">event_get_fd</a> (const struct <a class="el" href="structevent.html">event</a> *ev)</td></tr>
<tr class="memdesc:a4f63589ebe3e0d4c9e20447f96d343b2"><td class="mdescLeft"> </td><td class="mdescRight">Get the socket or signal assigned to an event, or -1 if the event has no socket. <br /></td></tr>
<tr class="separator:a4f63589ebe3e0d4c9e20447f96d343b2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abbc9ca70c2b59b3c1b5767b7675920c3"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#abbc9ca70c2b59b3c1b5767b7675920c3">event_get_priority</a> (const struct <a class="el" href="structevent.html">event</a> *ev)</td></tr>
<tr class="memdesc:abbc9ca70c2b59b3c1b5767b7675920c3"><td class="mdescLeft"> </td><td class="mdescRight">Return the priority of an event. <a href="event_8h.html#abbc9ca70c2b59b3c1b5767b7675920c3">More...</a><br /></td></tr>
<tr class="separator:abbc9ca70c2b59b3c1b5767b7675920c3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0f93db0db7e74f9ae173e1766415dd56"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a0f93db0db7e74f9ae173e1766415dd56">event_get_struct_event_size</a> (void)</td></tr>
<tr class="memdesc:a0f93db0db7e74f9ae173e1766415dd56"><td class="mdescLeft"> </td><td class="mdescRight">Return the size of struct event that the Libevent library was compiled with. <a href="event_8h.html#a0f93db0db7e74f9ae173e1766415dd56">More...</a><br /></td></tr>
<tr class="separator:a0f93db0db7e74f9ae173e1766415dd56"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7abb8da4e334086319949997fd51c799"><td class="memItemLeft" align="right" valign="top">const EVENT2_EXPORT_SYMBOL char ** </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a7abb8da4e334086319949997fd51c799">event_get_supported_methods</a> (void)</td></tr>
<tr class="memdesc:a7abb8da4e334086319949997fd51c799"><td class="mdescLeft"> </td><td class="mdescRight">Gets all event notification mechanisms supported by Libevent. <a href="event_8h.html#a7abb8da4e334086319949997fd51c799">More...</a><br /></td></tr>
<tr class="separator:a7abb8da4e334086319949997fd51c799"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a328e99de6281ce1645935835e44341b6"><td class="memItemLeft" align="right" valign="top">const EVENT2_EXPORT_SYMBOL char * </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a328e99de6281ce1645935835e44341b6">event_get_version</a> (void)</td></tr>
<tr class="memdesc:a328e99de6281ce1645935835e44341b6"><td class="mdescLeft"> </td><td class="mdescRight">Get the Libevent version. <a href="event_8h.html#a328e99de6281ce1645935835e44341b6">More...</a><br /></td></tr>
<tr class="separator:a328e99de6281ce1645935835e44341b6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a578ddddcc39d197630e7909b7da443e3"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL ev_uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a578ddddcc39d197630e7909b7da443e3">event_get_version_number</a> (void)</td></tr>
<tr class="memdesc:a578ddddcc39d197630e7909b7da443e3"><td class="mdescLeft"> </td><td class="mdescRight">Return a numeric representation of Libevent's version. <a href="event_8h.html#a578ddddcc39d197630e7909b7da443e3">More...</a><br /></td></tr>
<tr class="separator:a578ddddcc39d197630e7909b7da443e3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0c624a8830f69b32ee11faabc8ebb99a"><td class="memItemLeft" align="right" valign="top"><a id="a0c624a8830f69b32ee11faabc8ebb99a"></a>
EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a0c624a8830f69b32ee11faabc8ebb99a">event_gettime_monotonic</a> (struct <a class="el" href="structevent__base.html">event_base</a> *base, struct timeval *tp)</td></tr>
<tr class="memdesc:a0c624a8830f69b32ee11faabc8ebb99a"><td class="mdescLeft"> </td><td class="mdescRight">Query the current monotonic time from the timer for a struct <a class="el" href="structevent__base.html" title="Structure to hold information and state for a Libevent dispatch loop.">event_base</a>. <br /></td></tr>
<tr class="separator:a0c624a8830f69b32ee11faabc8ebb99a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a85b94b111b8aa7fb480fc2f9da7f8e18"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a85b94b111b8aa7fb480fc2f9da7f8e18">event_initialized</a> (const struct <a class="el" href="structevent.html">event</a> *ev)</td></tr>
<tr class="memdesc:a85b94b111b8aa7fb480fc2f9da7f8e18"><td class="mdescLeft"> </td><td class="mdescRight">Test if an event structure might be initialized. <a href="event_8h.html#a85b94b111b8aa7fb480fc2f9da7f8e18">More...</a><br /></td></tr>
<tr class="separator:a85b94b111b8aa7fb480fc2f9da7f8e18"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6cd300e5cd15601c5e4570b221b20397"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL struct <a class="el" href="structevent.html">event</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a6cd300e5cd15601c5e4570b221b20397">event_new</a> (struct <a class="el" href="structevent__base.html">event_base</a> *base, <a class="el" href="util_8h.html#a7ef0023565082a65020f6e56be59fd0b">evutil_socket_t</a> fd, short events, <a class="el" href="event_8h.html#aed2307f3d9b38e07cc10c2607322d758">event_callback_fn</a> callback, void *callback_arg)</td></tr>
<tr class="memdesc:a6cd300e5cd15601c5e4570b221b20397"><td class="mdescLeft"> </td><td class="mdescRight">Allocate and assign a new event structure, ready to be added. <a href="event_8h.html#a6cd300e5cd15601c5e4570b221b20397">More...</a><br /></td></tr>
<tr class="separator:a6cd300e5cd15601c5e4570b221b20397"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9b1687396305898af018c74e63486eb5"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a9b1687396305898af018c74e63486eb5">event_pending</a> (const struct <a class="el" href="structevent.html">event</a> *ev, short events, struct timeval *tv)</td></tr>
<tr class="memdesc:a9b1687396305898af018c74e63486eb5"><td class="mdescLeft"> </td><td class="mdescRight">Checks if a specific event is pending or scheduled. <a href="event_8h.html#a9b1687396305898af018c74e63486eb5">More...</a><br /></td></tr>
<tr class="separator:a9b1687396305898af018c74e63486eb5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a11a800dce1fe61de5e2506aaf603c47f"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a11a800dce1fe61de5e2506aaf603c47f">event_priority_set</a> (struct <a class="el" href="structevent.html">event</a> *ev, int priority)</td></tr>
<tr class="memdesc:a11a800dce1fe61de5e2506aaf603c47f"><td class="mdescLeft"> </td><td class="mdescRight">Assign a priority to an event. <a href="event_8h.html#a11a800dce1fe61de5e2506aaf603c47f">More...</a><br /></td></tr>
<tr class="separator:a11a800dce1fe61de5e2506aaf603c47f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7f05aabb4fbcd2ba676bb6ba92f21630"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a7f05aabb4fbcd2ba676bb6ba92f21630">event_reinit</a> (struct <a class="el" href="structevent__base.html">event_base</a> *base)</td></tr>
<tr class="memdesc:a7f05aabb4fbcd2ba676bb6ba92f21630"><td class="mdescLeft"> </td><td class="mdescRight">Reinitialize the event base after a fork. <a href="event_8h.html#a7f05aabb4fbcd2ba676bb6ba92f21630">More...</a><br /></td></tr>
<tr class="separator:a7f05aabb4fbcd2ba676bb6ba92f21630"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6d3aae1a8b2c0002e5744fb54ba4fe64"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a6d3aae1a8b2c0002e5744fb54ba4fe64">event_remove_timer</a> (struct <a class="el" href="structevent.html">event</a> *ev)</td></tr>
<tr class="memdesc:a6d3aae1a8b2c0002e5744fb54ba4fe64"><td class="mdescLeft"> </td><td class="mdescRight">Remove a timer from a pending event without removing the event itself. <a href="event_8h.html#a6d3aae1a8b2c0002e5744fb54ba4fe64">More...</a><br /></td></tr>
<tr class="separator:a6d3aae1a8b2c0002e5744fb54ba4fe64"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aaf0b6ecbbc95137d7a6621f46670acad"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void * </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#aaf0b6ecbbc95137d7a6621f46670acad">event_self_cbarg</a> (void)</td></tr>
<tr class="memdesc:aaf0b6ecbbc95137d7a6621f46670acad"><td class="mdescLeft"> </td><td class="mdescRight">Return a value used to specify that the event itself must be used as the callback argument. <a href="event_8h.html#aaf0b6ecbbc95137d7a6621f46670acad">More...</a><br /></td></tr>
<tr class="separator:aaf0b6ecbbc95137d7a6621f46670acad"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1d0efefe738406049a7bd71e2e59ccfb"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a1d0efefe738406049a7bd71e2e59ccfb">event_set_fatal_callback</a> (<a class="el" href="event_8h.html#abb799b636f0d3aab6ca17426d88473cf">event_fatal_cb</a> cb)</td></tr>
<tr class="memdesc:a1d0efefe738406049a7bd71e2e59ccfb"><td class="mdescLeft"> </td><td class="mdescRight">Override Libevent's behavior in the event of a fatal internal error. <a href="event_8h.html#a1d0efefe738406049a7bd71e2e59ccfb">More...</a><br /></td></tr>
<tr class="separator:a1d0efefe738406049a7bd71e2e59ccfb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2ec6be5aff4af06b22da20d5ad747ff2"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a2ec6be5aff4af06b22da20d5ad747ff2">event_set_log_callback</a> (<a class="el" href="event_8h.html#a185f44c610d7ee21ecba720561b2e09c">event_log_cb</a> cb)</td></tr>
<tr class="memdesc:a2ec6be5aff4af06b22da20d5ad747ff2"><td class="mdescLeft"> </td><td class="mdescRight">Redirect Libevent's log messages. <a href="event_8h.html#a2ec6be5aff4af06b22da20d5ad747ff2">More...</a><br /></td></tr>
<tr class="separator:a2ec6be5aff4af06b22da20d5ad747ff2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9bb71feea97288bc15d2fba3dccd46bf"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#a9bb71feea97288bc15d2fba3dccd46bf">event_set_mem_functions</a> (void *(*malloc_fn)(size_t sz), void *(*realloc_fn)(void *ptr, size_t sz), void(*free_fn)(void *ptr))</td></tr>
<tr class="memdesc:a9bb71feea97288bc15d2fba3dccd46bf"><td class="mdescLeft"> </td><td class="mdescRight">Override the functions that Libevent uses for memory management. <a href="event_8h.html#a9bb71feea97288bc15d2fba3dccd46bf">More...</a><br /></td></tr>
<tr class="separator:a9bb71feea97288bc15d2fba3dccd46bf"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aaed24b9ff1f5b137ea2e2cc6a2bf8d1f"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="event_8h.html#aaed24b9ff1f5b137ea2e2cc6a2bf8d1f">libevent_global_shutdown</a> (void)</td></tr>
<tr class="memdesc:aaed24b9ff1f5b137ea2e2cc6a2bf8d1f"><td class="mdescLeft"> </td><td class="mdescRight">Release up all globally-allocated resources allocated by Libevent. <a href="event_8h.html#aaed24b9ff1f5b137ea2e2cc6a2bf8d1f">More...</a><br /></td></tr>
<tr class="separator:aaed24b9ff1f5b137ea2e2cc6a2bf8d1f"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">Finalization functions</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p>These functions are used to safely tear down an event in a multithreaded application.</p>
<p>If you construct your events with EV_FINALIZE to avoid deadlocks, you will need a way to remove an event in the certainty that it will definitely not be running its callback when you deallocate it and its callback argument.</p>
<p>To do this, call one of event_finalize() or event_free_finalize with 0 for its first argument, the event to tear down as its second argument, and a callback function as its third argument. The callback will be invoked as part of the event loop, with the event's priority.</p>
<p>After you call a finalizer function, <a class="el" href="event_8h.html#ab0c85ebe9cf057be1aa17724c701b0c8" title="Add an event to the set of pending events.">event_add()</a> and <a class="el" href="event_8h.html#a31d9440cf2b7010e32a05a2142a91525" title="Make an event active.">event_active()</a> will no longer work on the event, and <a class="el" href="event_8h.html#a2ffc10a652c67bea16b0a71f7d5a44dc" title="Remove an event from the set of monitored events.">event_del()</a> will produce a no-op. You must not try to change the event's fields with <a class="el" href="event_8h.html#a3e49a8172e00ae82959dfe64684eda11" title="Prepare a new, already-allocated event structure to be added.">event_assign()</a> or <a class="el" href="event__compat_8h.html#af06653a20ca79b6229adf89630d20916" title="Prepare an event structure to be added.">event_set()</a> while the finalize callback is in progress. Once the callback has been invoked, you should treat the event structure as containing uninitialized memory.</p>
<p>The event_free_finalize() function frees the event after it's finalized; event_finalize() does not.</p>
<p>A finalizer callback must not make events pending or active. It must not add events, activate events, or attempt to "resuscitate" the event being finalized in any way.</p>
<dl class="section return"><dt>Returns</dt><dd>0 on success, -1 on failure. </dd></dl>
</div></td></tr>
<tr class="memitem:a61afe502421991651981de42bd6bccc7"><td class="memItemLeft" align="right" valign="top"><a id="a61afe502421991651981de42bd6bccc7"></a>
EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><b>event_finalize</b> (unsigned, struct <a class="el" href="structevent.html">event</a> *, <a class="el" href="event_8h.html#a6f62afb6e295ee487ad947e4eec18332">event_finalize_callback_fn</a>)</td></tr>
<tr class="separator:a61afe502421991651981de42bd6bccc7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a70e49fd7fed22932900b8827e26e10fb"><td class="memItemLeft" align="right" valign="top"><a id="a70e49fd7fed22932900b8827e26e10fb"></a>
EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><b>event_free_finalize</b> (unsigned, struct <a class="el" href="structevent.html">event</a> *, <a class="el" href="event_8h.html#a6f62afb6e295ee487ad947e4eec18332">event_finalize_callback_fn</a>)</td></tr>
<tr class="separator:a70e49fd7fed22932900b8827e26e10fb"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Core functions for waiting for and receiving events, and using event bases. </p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a98f643f9c9063a4cbf410f519eb61e55"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a98f643f9c9063a4cbf410f519eb61e55">◆ </a></span>EV_CLOSED</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define EV_CLOSED   0x80</td>
</tr>
</table>
</div><div class="memdoc">
<p>Detects connection close events. </p>
<p>You can use this to detect when a connection has been closed, without having to read all the pending data from a connection.</p>
<p>Not all backends support EV_CLOSED. To detect or require it, use the feature flag EV_FEATURE_EARLY_CLOSE. </p>
</div>
</div>
<a id="ac062d75b2bf9a961d893e3a71726bdff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac062d75b2bf9a961d893e3a71726bdff">◆ </a></span>EV_FINALIZE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define EV_FINALIZE   0x40</td>
</tr>
</table>
</div><div class="memdoc">
<p>If this option is provided, then <a class="el" href="event_8h.html#a2ffc10a652c67bea16b0a71f7d5a44dc" title="Remove an event from the set of monitored events.">event_del()</a> will not block in one thread while waiting for the event callback to complete in another thread. </p>
<p>To use this option safely, you may need to use event_finalize() or event_free_finalize() in order to safely tear down an event in a multithreaded application. See those functions for more information. </p>
</div>
</div>
<a id="a3c4947a60eb6d09327c61f89135f9f37"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3c4947a60eb6d09327c61f89135f9f37">◆ </a></span>EV_PERSIST</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define EV_PERSIST   0x10</td>
</tr>
</table>
</div><div class="memdoc">
<p>Persistent event: won't get removed automatically when activated. </p>
<p>When a persistent event with a timeout becomes activated, its timeout is reset to 0. </p>
</div>
</div>
<a id="a37ef4b6056484f5580f7d72fcf46fccf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a37ef4b6056484f5580f7d72fcf46fccf">◆ </a></span>EV_TIMEOUT</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define EV_TIMEOUT   0x01</td>
</tr>
</table>
</div><div class="memdoc">
<p>Indicates that a timeout has occurred. </p>
<p>It's not necessary to pass this flag to event_for new()/event_assign() to get a timeout. </p>
</div>
</div>
<a id="a6751a7d5867ff8e7807400a93ffd5b08"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6751a7d5867ff8e7807400a93ffd5b08">◆ </a></span>EVLOOP_NO_EXIT_ON_EMPTY</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define EVLOOP_NO_EXIT_ON_EMPTY   0x04</td>
</tr>
</table>
</div><div class="memdoc">
<p>Do not exit the loop because we have no pending events. </p>
<p>Instead, keep running until <a class="el" href="event_8h.html#a67ba4db4b6e7467b3412219530603e60" title="Exit the event loop after the specified time.">event_base_loopexit()</a> or <a class="el" href="event_8h.html#a28e0be91488e8a0ed57a582f3343eaf6" title="Abort the active event_base_loop() immediately.">event_base_loopbreak()</a> makes us stop. </p>
</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="aed2307f3d9b38e07cc10c2607322d758"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aed2307f3d9b38e07cc10c2607322d758">◆ </a></span>event_callback_fn</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void(* event_callback_fn) (<a class="el" href="util_8h.html#a7ef0023565082a65020f6e56be59fd0b">evutil_socket_t</a>, short, void *)</td>
</tr>
</table>
</div><div class="memdoc">
<p>A callback function for an event. </p>
<p>It receives three arguments:</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">fd</td><td>An fd or signal </td></tr>
<tr><td class="paramname">events</td><td>One or more EV_* flags </td></tr>
<tr><td class="paramname">arg</td><td>A user-supplied argument.</td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="event_8h.html#a6cd300e5cd15601c5e4570b221b20397" title="Allocate and assign a new event structure, ready to be added.">event_new()</a> </dd></dl>
</div>
</div>
<a id="abb799b636f0d3aab6ca17426d88473cf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abb799b636f0d3aab6ca17426d88473cf">◆ </a></span>event_fatal_cb</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void(* event_fatal_cb) (int err)</td>
</tr>
</table>
</div><div class="memdoc">
<p>A function to be called if Libevent encounters a fatal internal error. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="event_8h.html#a1d0efefe738406049a7bd71e2e59ccfb" title="Override Libevent's behavior in the event of a fatal internal error.">event_set_fatal_callback</a> </dd></dl>
</div>
</div>
<a id="a185f44c610d7ee21ecba720561b2e09c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a185f44c610d7ee21ecba720561b2e09c">◆ </a></span>event_log_cb</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void(* event_log_cb) (int severity, const char *msg)</td>
</tr>
</table>
</div><div class="memdoc">
<p>A callback function used to intercept Libevent's log messages. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="event_8h.html#a2ec6be5aff4af06b22da20d5ad747ff2" title="Redirect Libevent's log messages.">event_set_log_callback</a> </dd></dl>
</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="acfef69af45abee54725f40f7f29986c5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acfef69af45abee54725f40f7f29986c5">◆ </a></span>event_base_config_flag</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="event_8h.html#acfef69af45abee54725f40f7f29986c5">event_base_config_flag</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>A flag passed to <a class="el" href="event_8h.html#ae9e42b61a7e8465b7c897432c4ddcabd" title="Sets one or more flags to configure what parts of the eventual event_base will be initialized,...">event_config_set_flag()</a>. </p>
<p>These flags change the behavior of an allocated <a class="el" href="structevent__base.html" title="Structure to hold information and state for a Libevent dispatch loop.">event_base</a>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="event_8h.html#ae9e42b61a7e8465b7c897432c4ddcabd" title="Sets one or more flags to configure what parts of the eventual event_base will be initialized,...">event_config_set_flag()</a>, <a class="el" href="event_8h.html#a864798e5b3c6aa8d2f9e9c5035a3e6da" title="Initialize the event API.">event_base_new_with_config()</a>, <a class="el" href="event_8h.html#ae7da61aef13e27a3047151b696b44c80" title="A flag used to describe which features an event_base (must) provide.">event_method_feature</a> </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="acfef69af45abee54725f40f7f29986c5ac1302f72251168137258335e945e2ae5"></a>EVENT_BASE_FLAG_NOLOCK </td><td class="fielddoc"><p>Do not allocate a lock for the event base, even if we have locking set up. </p>
<p>Setting this option will make it unsafe and nonfunctional to call functions on the base concurrently from multiple threads. </p>
</td></tr>
<tr><td class="fieldname"><a id="acfef69af45abee54725f40f7f29986c5a230574947412d83f2dd19fe8c7d286e7"></a>EVENT_BASE_FLAG_IGNORE_ENV </td><td class="fielddoc"><p>Do not check the EVENT_* environment variables when configuring an <a class="el" href="structevent__base.html" title="Structure to hold information and state for a Libevent dispatch loop.">event_base</a> <br />
</p>
</td></tr>
<tr><td class="fieldname"><a id="acfef69af45abee54725f40f7f29986c5a4ffb2510ab533d7156f412ee4f0c08ea"></a>EVENT_BASE_FLAG_STARTUP_IOCP </td><td class="fielddoc"><p>Windows only: enable the IOCP dispatcher at startup. </p>
<pre class="fragment">If this flag is set then bufferevent_socket_new() and
evconn_listener_new() will use IOCP-backed implementations
instead of the usual select-based one on Windows.
Note: it is experimental feature, and has some bugs.
</pre> </td></tr>
<tr><td class="fieldname"><a id="acfef69af45abee54725f40f7f29986c5a057dff1977c48174f0a0f0c43ef92ec5"></a>EVENT_BASE_FLAG_NO_CACHE_TIME </td><td class="fielddoc"><p>Instead of checking the current time every time the event loop is ready to run timeout callbacks, check after each timeout callback. </p>
</td></tr>
<tr><td class="fieldname"><a id="acfef69af45abee54725f40f7f29986c5acceb45f3098787247044929f92f4296e"></a>EVENT_BASE_FLAG_EPOLL_USE_CHANGELIST </td><td class="fielddoc"><p>If we are using the epoll backend, this flag says that it is safe to use Libevent's internal change-list code to batch up adds and deletes in order to try to do as few syscalls as possible. </p>
<p>Setting this flag can make your code run faster, but it may trigger a Linux bug: it is not safe to use this flag if you have any fds cloned by dup() or its variants. Doing so will produce strange and hard-to-diagnose bugs.</p>
<p>This flag can also be activated by setting the EVENT_EPOLL_USE_CHANGELIST environment variable.</p>
<p>This flag has no effect if you wind up using a backend other than epoll. </p>
</td></tr>
<tr><td class="fieldname"><a id="acfef69af45abee54725f40f7f29986c5af6080f1d7c5067868cbc749d1cfe56e9"></a>EVENT_BASE_FLAG_PRECISE_TIMER </td><td class="fielddoc"><p>Ordinarily, Libevent implements its time and timeout code using the fastest monotonic timer that we have. </p>
<p>If this flag is set, however, we use less efficient more precise timer, assuming one is present. </p>
</td></tr>
<tr><td class="fieldname"><a id="acfef69af45abee54725f40f7f29986c5a9eaa69643a73f5fb5959db017c9050a5"></a>EVENT_BASE_FLAG_EPOLL_DISALLOW_TIMERFD </td><td class="fielddoc"><p>With EVENT_BASE_FLAG_PRECISE_TIMER, epoll backend will use timerfd for more accurate timers, this will allows to disable this. </p>
<p>That said that this is something in between lack of (CLOCK_MONOTONIC_COARSE) and enabled EVENT_BASE_FLAG_PRECISE_TIMER (CLOCK_MONOTONIC + timerfd).</p>
<p>This flag has no effect if you wind up using a backend other than epoll and if you do not have EVENT_BASE_FLAG_PRECISE_TIMER enabled. </p>
</td></tr>
<tr><td class="fieldname"><a id="acfef69af45abee54725f40f7f29986c5a86d9f5574e29964187bafe245b211447"></a>EVENT_BASE_FLAG_USE_SIGNALFD </td><td class="fielddoc"><p>Use signalfd(2) to handle signals over sigaction/signal. </p>
<p>But note, that in some edge cases signalfd() may works differently. </p>
</td></tr>
</table>
</div>
</div>
<a id="ae7da61aef13e27a3047151b696b44c80"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae7da61aef13e27a3047151b696b44c80">◆ </a></span>event_method_feature</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="event_8h.html#ae7da61aef13e27a3047151b696b44c80">event_method_feature</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>A flag used to describe which features an <a class="el" href="structevent__base.html" title="Structure to hold information and state for a Libevent dispatch loop.">event_base</a> (must) provide. </p>
<p>Because of OS limitations, not every Libevent backend supports every possible feature. You can use this type with <a class="el" href="event_8h.html#ab76526f5bcd7b05d63f38fca439d7492" title="Enters a required event method feature that the application demands.">event_config_require_features()</a> to tell Libevent to only proceed if your <a class="el" href="structevent__base.html" title="Structure to hold information and state for a Libevent dispatch loop.">event_base</a> implements a given feature, and you can receive this type from <a class="el" href="event_8h.html#aced890aa77dac1669325f74a27584f03" title="Return a bitmask of the features implemented by an event base.">event_base_get_features()</a> to see which features are available. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ae7da61aef13e27a3047151b696b44c80ab407cae60af925dba44bd66e56e5f897"></a>EV_FEATURE_ET </td><td class="fielddoc"><p>Require an event method that allows edge-triggered events with EV_ET. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae7da61aef13e27a3047151b696b44c80a7a6f2de86c09b92aa175f950190bf706"></a>EV_FEATURE_O1 </td><td class="fielddoc"><p>Require an event method where having one event triggered among many is [approximately] an O(1) operation. </p>
<p>This excludes (for example) select and poll, which are approximately O(N) for N equal to the total number of possible events. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae7da61aef13e27a3047151b696b44c80a2e964e8a8f3033d26d52831fb8eec199"></a>EV_FEATURE_FDS </td><td class="fielddoc"><p>Require an event method that allows file descriptors as well as sockets. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae7da61aef13e27a3047151b696b44c80af28b206cf4665dacc2c6bf09446e29b7"></a>EV_FEATURE_EARLY_CLOSE </td><td class="fielddoc"><p>Require an event method that allows you to use EV_CLOSED to detect connection close without the necessity of reading all the pending data. </p>
<p>Methods that do support EV_CLOSED may not be able to provide support on all kernel versions. </p>
</td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a31d9440cf2b7010e32a05a2142a91525"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a31d9440cf2b7010e32a05a2142a91525">◆ </a></span>event_active()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL void event_active </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="structevent.html">event</a> * </td>
<td class="paramname"><em>ev</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>res</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">short </td>
<td class="paramname"><em>ncalls</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Make an event active. </p>
<p>You can use this function on a pending or a non-pending event to make it active, so that its callback will be run by <a class="el" href="event_8h.html#a19d60cb72a1af398247f40e92cf07056" title="Event dispatching loop.">event_base_dispatch()</a> or <a class="el" href="event_8h.html#acd7da32086d1e37008e7c76c9ea54fc4" title="Wait for events to become active, and run their callbacks.">event_base_loop()</a>.</p>
<p>One common use in multithreaded programs is to wake the thread running <a class="el" href="event_8h.html#acd7da32086d1e37008e7c76c9ea54fc4" title="Wait for events to become active, and run their callbacks.">event_base_loop()</a> from another thread.</p>
<p>If <a class="el" href="event_8h.html#a31d9440cf2b7010e32a05a2142a91525" title="Make an event active.">event_active()</a> is called on the same event more than once before the event is run, the flags are OR'd with the flags passed in previous calls.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ev</td><td>an event to make active. </td></tr>
<tr><td class="paramname">res</td><td>a set of flags to pass to the event's callback. </td></tr>
<tr><td class="paramname">ncalls</td><td>an obsolete argument: this is ignored. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ab0c85ebe9cf057be1aa17724c701b0c8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab0c85ebe9cf057be1aa17724c701b0c8">◆ </a></span>event_add()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL int event_add </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="structevent.html">event</a> * </td>
<td class="paramname"><em>ev</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const struct timeval * </td>
<td class="paramname"><em>timeout</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Add an event to the set of pending events. </p>
<p>The function <a class="el" href="event_8h.html#ab0c85ebe9cf057be1aa17724c701b0c8" title="Add an event to the set of pending events.">event_add()</a> schedules the execution of the event 'ev' when the condition specified by <a class="el" href="event_8h.html#a3e49a8172e00ae82959dfe64684eda11" title="Prepare a new, already-allocated event structure to be added.">event_assign()</a> or <a class="el" href="event_8h.html#a6cd300e5cd15601c5e4570b221b20397" title="Allocate and assign a new event structure, ready to be added.">event_new()</a> occurs, or when the time 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 <a class="el" href="event_8h.html#a3e49a8172e00ae82959dfe64684eda11" title="Prepare a new, already-allocated event structure to be added.">event_assign()</a> or <a class="el" href="event_8h.html#a6cd300e5cd15601c5e4570b221b20397" title="Allocate and assign a new event structure, ready to be added.">event_new()</a> and may not be used in calls to <a class="el" href="event_8h.html#a3e49a8172e00ae82959dfe64684eda11" title="Prepare a new, already-allocated event structure to be added.">event_assign()</a> until it is no longer pending.</p>
<p>If the event in the ev argument already has a scheduled timeout, calling <a class="el" href="event_8h.html#ab0c85ebe9cf057be1aa17724c701b0c8" title="Add an event to the set of pending events.">event_add()</a> replaces the old timeout with the new one if tv is non-NULL.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ev</td><td>an event struct initialized via <a class="el" href="event_8h.html#a3e49a8172e00ae82959dfe64684eda11" title="Prepare a new, already-allocated event structure to be added.">event_assign()</a> or <a class="el" href="event_8h.html#a6cd300e5cd15601c5e4570b221b20397" title="Allocate and assign a new event structure, ready to be added.">event_new()</a> </td></tr>
<tr><td class="paramname">timeout</td><td>the maximum amount of time to wait for the event, or NULL to wait forever </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 if successful, or -1 if an error occurred </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="event_8h.html#a2ffc10a652c67bea16b0a71f7d5a44dc" title="Remove an event from the set of monitored events.">event_del()</a>, <a class="el" href="event_8h.html#a3e49a8172e00ae82959dfe64684eda11" title="Prepare a new, already-allocated event structure to be added.">event_assign()</a>, <a class="el" href="event_8h.html#a6cd300e5cd15601c5e4570b221b20397" title="Allocate and assign a new event structure, ready to be added.">event_new()</a> </dd></dl>
</div>
</div>
<a id="a3e49a8172e00ae82959dfe64684eda11"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3e49a8172e00ae82959dfe64684eda11">◆ </a></span>event_assign()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL int event_assign </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="structevent.html">event</a> * </td>
<td class="paramname"><em>ev</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="structevent__base.html">event_base</a> * </td>
<td class="paramname"><em>base</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="util_8h.html#a7ef0023565082a65020f6e56be59fd0b">evutil_socket_t</a> </td>
<td class="paramname"><em>fd</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">short </td>
<td class="paramname"><em>events</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="event_8h.html#aed2307f3d9b38e07cc10c2607322d758">event_callback_fn</a> </td>
<td class="paramname"><em>callback</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>callback_arg</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Prepare a new, already-allocated event structure to be added. </p>
<p>The function <a class="el" href="event_8h.html#a3e49a8172e00ae82959dfe64684eda11" title="Prepare a new, already-allocated event structure to be added.">event_assign()</a> prepares the event structure ev to be used in future calls to <a class="el" href="event_8h.html#ab0c85ebe9cf057be1aa17724c701b0c8" title="Add an event to the set of pending events.">event_add()</a> and <a class="el" href="event_8h.html#a2ffc10a652c67bea16b0a71f7d5a44dc" title="Remove an event from the set of monitored events.">event_del()</a>. Unlike <a class="el" href="event_8h.html#a6cd300e5cd15601c5e4570b221b20397" title="Allocate and assign a new event structure, ready to be added.">event_new()</a>, it doesn't allocate memory itself: it requires that you have already allocated a struct event, probably on the heap. Doing this will typically make your code depend on the size of the event structure, and thereby create incompatibility with future versions of Libevent.</p>
<p>The easiest way to avoid this problem is just to use <a class="el" href="event_8h.html#a6cd300e5cd15601c5e4570b221b20397" title="Allocate and assign a new event structure, ready to be added.">event_new()</a> and <a class="el" href="event_8h.html#a1f326019b65d319b2221b7e57d56c273" title="Deallocate a struct event * returned by event_new().">event_free()</a> instead.</p>
<p>A slightly harder way to future-proof your code is to use <a class="el" href="event_8h.html#a0f93db0db7e74f9ae173e1766415dd56" title="Return the size of struct event that the Libevent library was compiled with.">event_get_struct_event_size()</a> to determine the required size of an event at runtime.</p>
<p>Note that it is NOT safe to call this function on an event that is active or pending. Doing so WILL corrupt internal data structures in Libevent, and lead to strange, hard-to-diagnose bugs. You <em>can</em> use event_assign to change an existing event, but only if it is not active or pending!</p>
<p>The arguments for this function, and the behavior of the events that it makes, are as for <a class="el" href="event_8h.html#a6cd300e5cd15601c5e4570b221b20397" title="Allocate and assign a new event structure, ready to be added.">event_new()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ev</td><td>an event struct to be modified </td></tr>
<tr><td class="paramname">base</td><td>the event base to which ev should be attached. </td></tr>
<tr><td class="paramname">fd</td><td>the file descriptor to be monitored </td></tr>
<tr><td class="paramname">events</td><td>desired events to monitor; can be EV_READ and/or EV_WRITE </td></tr>
<tr><td class="paramname">callback</td><td>callback function to be invoked when the event occurs </td></tr>
<tr><td class="paramname">callback_arg</td><td>an argument to be passed to the callback function</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 if success, or -1 on invalid arguments.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="event_8h.html#a6cd300e5cd15601c5e4570b221b20397" title="Allocate and assign a new event structure, ready to be added.">event_new()</a>, <a class="el" href="event_8h.html#ab0c85ebe9cf057be1aa17724c701b0c8" title="Add an event to the set of pending events.">event_add()</a>, <a class="el" href="event_8h.html#a2ffc10a652c67bea16b0a71f7d5a44dc" title="Remove an event from the set of monitored events.">event_del()</a>, <a class="el" href="event_8h.html#ae4d40e572ad8310897ce06f9fe0f9062" title="Schedule a one-time event.">event_base_once()</a>, <a class="el" href="event_8h.html#a0f93db0db7e74f9ae173e1766415dd56" title="Return the size of struct event that the Libevent library was compiled with.">event_get_struct_event_size()</a> </dd></dl>
</div>
</div>
<a id="a092013616b4636c74e889b0b015cb75e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a092013616b4636c74e889b0b015cb75e">◆ </a></span>event_base_active_by_fd()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL void event_base_active_by_fd </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="structevent__base.html">event_base</a> * </td>
<td class="paramname"><em>base</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="util_8h.html#a7ef0023565082a65020f6e56be59fd0b">evutil_socket_t</a> </td>
<td class="paramname"><em>fd</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">short </td>
<td class="paramname"><em>events</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Activates all pending events for the given fd and event mask. </p>
<p>This function activates pending events only. Events which have not been added will not become active.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">base</td><td>the <a class="el" href="structevent__base.html" title="Structure to hold information and state for a Libevent dispatch loop.">event_base</a> on which to activate the events. </td></tr>
<tr><td class="paramname">fd</td><td>An fd to active events on. </td></tr>
<tr><td class="paramname">events</td><td>One or more of EV_{READ,WRITE,TIMEOUT}. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a4bca4d24a15bef084bf066faca8a43d2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4bca4d24a15bef084bf066faca8a43d2">◆ </a></span>event_base_active_by_signal()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL void event_base_active_by_signal </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="structevent__base.html">event_base</a> * </td>
<td class="paramname"><em>base</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>