-
Notifications
You must be signed in to change notification settings - Fork 4
/
event__compat_8h.html
440 lines (410 loc) · 34.8 KB
/
event__compat_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
<!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_compat.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="#define-members">Macros</a> |
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">event_compat.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Potentially non-threadsafe versions of the functions in <a class="el" href="event_8h.html" title="Core functions for waiting for and receiving events, and using event bases.">event.h</a>: provided only for backwards compatibility.
<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 <<a class="el" href="util_8h_source.html">event2/util.h</a>></code><br />
</div>
<p><a href="event__compat_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="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a2b1c2a40ad619b9c3ca2cb82a126e2e4"><td class="memItemLeft" align="right" valign="top"><a id="a2b1c2a40ad619b9c3ca2cb82a126e2e4"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVENT_FD</b>(ev)   ((int)<a class="el" href="event_8h.html#a4f63589ebe3e0d4c9e20447f96d343b2">event_get_fd</a>(ev))</td></tr>
<tr class="separator:a2b1c2a40ad619b9c3ca2cb82a126e2e4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a899cb8dd0c2bf1289c0069e4649326ad"><td class="memItemLeft" align="right" valign="top"><a id="a899cb8dd0c2bf1289c0069e4649326ad"></a>
#define </td><td class="memItemRight" valign="bottom"><b>EVENT_SIGNAL</b>(ev)   <a class="el" href="event_8h.html#a69cc368a9137187726ef371a06f9cc9f">event_get_signal</a>(ev)</td></tr>
<tr class="separator:a899cb8dd0c2bf1289c0069e4649326ad"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0c943992e3125ac5a28cde48216d334c"><td class="memItemLeft" align="right" valign="top"><a id="a0c943992e3125ac5a28cde48216d334c"></a>
#define </td><td class="memItemRight" valign="bottom"><b>evsignal_set</b>(ev, x, cb, arg)   <a class="el" href="event__compat_8h.html#af06653a20ca79b6229adf89630d20916">event_set</a>((ev), (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:a0c943992e3125ac5a28cde48216d334c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afa5d72155d72931332ed0656fc8fb0a1"><td class="memItemLeft" align="right" valign="top"><a id="afa5d72155d72931332ed0656fc8fb0a1"></a>
#define </td><td class="memItemRight" valign="bottom"><b>evtimer_set</b>(ev, cb, arg)   <a class="el" href="event__compat_8h.html#af06653a20ca79b6229adf89630d20916">event_set</a>((ev), -1, 0, (cb), (arg))</td></tr>
<tr class="separator:afa5d72155d72931332ed0656fc8fb0a1"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">timeout_* macros</div></td></tr>
<tr><td colspan="2"><div class="groupText"><dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000036">Deprecated:</a></b></dt><dd>These macros are deprecated because their naming is inconsistent with the rest of Libevent.</dd></dl>
<p>Use the evtimer_* macros instead. </p>
</div></td></tr>
<tr class="memitem:afaf6ea49aab66ec47acd9f5b629bfe5e"><td class="memItemLeft" align="right" valign="top"><a id="afaf6ea49aab66ec47acd9f5b629bfe5e"></a>
#define </td><td class="memItemRight" valign="bottom"><b>timeout_add</b>(ev, tv)   <a class="el" href="event_8h.html#ab0c85ebe9cf057be1aa17724c701b0c8">event_add</a>((ev), (tv))</td></tr>
<tr class="separator:afaf6ea49aab66ec47acd9f5b629bfe5e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8febdc39e7def3c49deb1e9faa7fc537"><td class="memItemLeft" align="right" valign="top"><a id="a8febdc39e7def3c49deb1e9faa7fc537"></a>
#define </td><td class="memItemRight" valign="bottom"><b>timeout_del</b>(ev)   <a class="el" href="event_8h.html#a2ffc10a652c67bea16b0a71f7d5a44dc">event_del</a>(ev)</td></tr>
<tr class="separator:a8febdc39e7def3c49deb1e9faa7fc537"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a960c63760b26a73350a2bd3618fe4d66"><td class="memItemLeft" align="right" valign="top"><a id="a960c63760b26a73350a2bd3618fe4d66"></a>
#define </td><td class="memItemRight" valign="bottom"><b>timeout_initialized</b>(ev)   <a class="el" href="event_8h.html#a85b94b111b8aa7fb480fc2f9da7f8e18">event_initialized</a>(ev)</td></tr>
<tr class="separator:a960c63760b26a73350a2bd3618fe4d66"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a221671efe98942558743d1a66669b494"><td class="memItemLeft" align="right" valign="top"><a id="a221671efe98942558743d1a66669b494"></a>
#define </td><td class="memItemRight" valign="bottom"><b>timeout_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:a221671efe98942558743d1a66669b494"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a85e9253a4d75703692dd912be4a87aab"><td class="memItemLeft" align="right" valign="top"><a id="a85e9253a4d75703692dd912be4a87aab"></a>
#define </td><td class="memItemRight" valign="bottom"><b>timeout_set</b>(ev, cb, arg)   <a class="el" href="event__compat_8h.html#af06653a20ca79b6229adf89630d20916">event_set</a>((ev), -1, 0, (cb), (arg))</td></tr>
<tr class="separator:a85e9253a4d75703692dd912be4a87aab"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">signal_* macros</div></td></tr>
<tr><td colspan="2"><div class="groupText"><dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000037">Deprecated:</a></b></dt><dd>These macros are deprecated because their naming is inconsistent with the rest of Libevent.</dd></dl>
<p>Use the evsignal_* macros instead. </p>
</div></td></tr>
<tr class="memitem:ac26a36d05805ed2fadc7b2dcbf881020"><td class="memItemLeft" align="right" valign="top"><a id="ac26a36d05805ed2fadc7b2dcbf881020"></a>
#define </td><td class="memItemRight" valign="bottom"><b>signal_add</b>(ev, tv)   <a class="el" href="event_8h.html#ab0c85ebe9cf057be1aa17724c701b0c8">event_add</a>((ev), (tv))</td></tr>
<tr class="separator:ac26a36d05805ed2fadc7b2dcbf881020"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a77fc0b01f4acf885075e9720faf91906"><td class="memItemLeft" align="right" valign="top"><a id="a77fc0b01f4acf885075e9720faf91906"></a>
#define </td><td class="memItemRight" valign="bottom"><b>signal_del</b>(ev)   <a class="el" href="event_8h.html#a2ffc10a652c67bea16b0a71f7d5a44dc">event_del</a>(ev)</td></tr>
<tr class="separator:a77fc0b01f4acf885075e9720faf91906"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a049ba1588cd2d372b2617f1ff336282b"><td class="memItemLeft" align="right" valign="top"><a id="a049ba1588cd2d372b2617f1ff336282b"></a>
#define </td><td class="memItemRight" valign="bottom"><b>signal_initialized</b>(ev)   <a class="el" href="event_8h.html#a85b94b111b8aa7fb480fc2f9da7f8e18">event_initialized</a>(ev)</td></tr>
<tr class="separator:a049ba1588cd2d372b2617f1ff336282b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a07458695d3403c8c0bcec356a9d243c7"><td class="memItemLeft" align="right" valign="top"><a id="a07458695d3403c8c0bcec356a9d243c7"></a>
#define </td><td class="memItemRight" valign="bottom"><b>signal_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:a07458695d3403c8c0bcec356a9d243c7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1e620dc98462b393821cf84cb02c7e5c"><td class="memItemLeft" align="right" valign="top"><a id="a1e620dc98462b393821cf84cb02c7e5c"></a>
#define </td><td class="memItemRight" valign="bottom"><b>signal_set</b>(ev, x, cb, arg)   <a class="el" href="event__compat_8h.html#af06653a20ca79b6229adf89630d20916">event_set</a>((ev), (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:a1e620dc98462b393821cf84cb02c7e5c"><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:af4db42ebbe9e6ee92128e99523e5987f"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event__compat_8h.html#af4db42ebbe9e6ee92128e99523e5987f">event_dispatch</a> (void)</td></tr>
<tr class="memdesc:af4db42ebbe9e6ee92128e99523e5987f"><td class="mdescLeft"> </td><td class="mdescRight">Loop to process events. <a href="event__compat_8h.html#af4db42ebbe9e6ee92128e99523e5987f">More...</a><br /></td></tr>
<tr class="separator:af4db42ebbe9e6ee92128e99523e5987f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a756cb3d9a3671a5a03387a2f18ff83e8"><td class="memItemLeft" align="right" valign="top">const EVENT2_EXPORT_SYMBOL char * </td><td class="memItemRight" valign="bottom"><a class="el" href="event__compat_8h.html#a756cb3d9a3671a5a03387a2f18ff83e8">event_get_method</a> (void)</td></tr>
<tr class="memdesc:a756cb3d9a3671a5a03387a2f18ff83e8"><td class="mdescLeft"> </td><td class="mdescRight">Get the kernel event notification mechanism used by Libevent. <a href="event__compat_8h.html#a756cb3d9a3671a5a03387a2f18ff83e8">More...</a><br /></td></tr>
<tr class="separator:a756cb3d9a3671a5a03387a2f18ff83e8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa72d84e78eb6f08dc580e6245c087cb6"><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__compat_8h.html#aa72d84e78eb6f08dc580e6245c087cb6">event_init</a> (void)</td></tr>
<tr class="memdesc:aa72d84e78eb6f08dc580e6245c087cb6"><td class="mdescLeft"> </td><td class="mdescRight">Initialize the event API. <a href="event__compat_8h.html#aa72d84e78eb6f08dc580e6245c087cb6">More...</a><br /></td></tr>
<tr class="separator:aa72d84e78eb6f08dc580e6245c087cb6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3d6542d4518f6873ef9d308e3ee525e1"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event__compat_8h.html#a3d6542d4518f6873ef9d308e3ee525e1">event_loop</a> (int)</td></tr>
<tr class="memdesc:a3d6542d4518f6873ef9d308e3ee525e1"><td class="mdescLeft"> </td><td class="mdescRight">Handle events. <a href="event__compat_8h.html#a3d6542d4518f6873ef9d308e3ee525e1">More...</a><br /></td></tr>
<tr class="separator:a3d6542d4518f6873ef9d308e3ee525e1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a497e5e360112dcbdc8409ecb45c2c565"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event__compat_8h.html#a497e5e360112dcbdc8409ecb45c2c565">event_loopbreak</a> (void)</td></tr>
<tr class="memdesc:a497e5e360112dcbdc8409ecb45c2c565"><td class="mdescLeft"> </td><td class="mdescRight">Abort the active <a class="el" href="event__compat_8h.html#a3d6542d4518f6873ef9d308e3ee525e1" title="Handle events.">event_loop()</a> immediately. <a href="event__compat_8h.html#a497e5e360112dcbdc8409ecb45c2c565">More...</a><br /></td></tr>
<tr class="separator:a497e5e360112dcbdc8409ecb45c2c565"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a88b7e5bb1e7bd5e617167ed6192fdd66"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event__compat_8h.html#a88b7e5bb1e7bd5e617167ed6192fdd66">event_loopexit</a> (const struct timeval *)</td></tr>
<tr class="memdesc:a88b7e5bb1e7bd5e617167ed6192fdd66"><td class="mdescLeft"> </td><td class="mdescRight">Exit the event loop after the specified time. <a href="event__compat_8h.html#a88b7e5bb1e7bd5e617167ed6192fdd66">More...</a><br /></td></tr>
<tr class="separator:a88b7e5bb1e7bd5e617167ed6192fdd66"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa7139d18495e80b2e31961c1c553d45e"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event__compat_8h.html#aa7139d18495e80b2e31961c1c553d45e">event_once</a> (<a class="el" href="util_8h.html#a7ef0023565082a65020f6e56be59fd0b">evutil_socket_t</a>, short, void(*)(<a class="el" href="util_8h.html#a7ef0023565082a65020f6e56be59fd0b">evutil_socket_t</a>, short, void *), void *, const struct timeval *)</td></tr>
<tr class="memdesc:aa7139d18495e80b2e31961c1c553d45e"><td class="mdescLeft"> </td><td class="mdescRight">Schedule a one-time event to occur. <a href="event__compat_8h.html#aa7139d18495e80b2e31961c1c553d45e">More...</a><br /></td></tr>
<tr class="separator:aa7139d18495e80b2e31961c1c553d45e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ade115d1b3302c33a6308c50964b6304e"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="event__compat_8h.html#ade115d1b3302c33a6308c50964b6304e">event_priority_init</a> (int)</td></tr>
<tr class="memdesc:ade115d1b3302c33a6308c50964b6304e"><td class="mdescLeft"> </td><td class="mdescRight">Set the number of different event priorities. <a href="event__compat_8h.html#ade115d1b3302c33a6308c50964b6304e">More...</a><br /></td></tr>
<tr class="separator:ade115d1b3302c33a6308c50964b6304e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af06653a20ca79b6229adf89630d20916"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="event__compat_8h.html#af06653a20ca79b6229adf89630d20916">event_set</a> (struct <a class="el" href="structevent.html">event</a> *, <a class="el" href="util_8h.html#a7ef0023565082a65020f6e56be59fd0b">evutil_socket_t</a>, short, void(*)(<a class="el" href="util_8h.html#a7ef0023565082a65020f6e56be59fd0b">evutil_socket_t</a>, short, void *), void *)</td></tr>
<tr class="memdesc:af06653a20ca79b6229adf89630d20916"><td class="mdescLeft"> </td><td class="mdescRight">Prepare an event structure to be added. <a href="event__compat_8h.html#af06653a20ca79b6229adf89630d20916">More...</a><br /></td></tr>
<tr class="separator:af06653a20ca79b6229adf89630d20916"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Potentially non-threadsafe versions of the functions in <a class="el" href="event_8h.html" title="Core functions for waiting for and receiving events, and using event bases.">event.h</a>: provided only for backwards compatibility. </p>
<p>In the oldest versions of Libevent, <a class="el" href="structevent__base.html" title="Structure to hold information and state for a Libevent dispatch loop.">event_base</a> was not a first-class structure. Instead, there was a single event base that every function manipulated. Later, when separate event bases were added, the old functions that didn't take an <a class="el" href="structevent__base.html" title="Structure to hold information and state for a Libevent dispatch loop.">event_base</a> argument needed to work by manipulating the "current" event base. This could lead to thread-safety issues, and obscure, hard-to-diagnose bugs.</p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000026">Deprecated:</a></b></dt><dd>All functions in this file are by definition deprecated. </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="af4db42ebbe9e6ee92128e99523e5987f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af4db42ebbe9e6ee92128e99523e5987f">◆ </a></span>event_dispatch()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL int event_dispatch </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Loop to process events. </p>
<p>Like <a class="el" href="event_8h.html#a19d60cb72a1af398247f40e92cf07056" title="Event dispatching loop.">event_base_dispatch()</a>, but uses the "current" base.</p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000028">Deprecated:</a></b></dt><dd>This function is deprecated because it is easily confused by multiple calls to <a class="el" href="event__compat_8h.html#aa72d84e78eb6f08dc580e6245c087cb6" title="Initialize the event API.">event_init()</a>, and because it is not safe for multithreaded use. The replacement is <a class="el" href="event_8h.html#a19d60cb72a1af398247f40e92cf07056" title="Event dispatching loop.">event_base_dispatch()</a>.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="event_8h.html#a19d60cb72a1af398247f40e92cf07056" title="Event dispatching loop.">event_base_dispatch()</a>, <a class="el" href="event__compat_8h.html#aa72d84e78eb6f08dc580e6245c087cb6" title="Initialize the event API.">event_init()</a> </dd></dl>
</div>
</div>
<a id="a756cb3d9a3671a5a03387a2f18ff83e8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a756cb3d9a3671a5a03387a2f18ff83e8">◆ </a></span>event_get_method()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const EVENT2_EXPORT_SYMBOL char* event_get_method </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the kernel event notification mechanism used by Libevent. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000033">Deprecated:</a></b></dt><dd>This function is obsolete, and has been replaced by <a class="el" href="event_8h.html#ae0910900c306cef32e2623272c7b7cb0" title="Get the kernel event notification mechanism used by Libevent.">event_base_get_method()</a>. Its use is deprecated because it relies on the "current" base configured by <a class="el" href="event__compat_8h.html#aa72d84e78eb6f08dc580e6245c087cb6" title="Initialize the event API.">event_init()</a>.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="event_8h.html#ae0910900c306cef32e2623272c7b7cb0" title="Get the kernel event notification mechanism used by Libevent.">event_base_get_method()</a> </dd></dl>
</div>
</div>
<a id="aa72d84e78eb6f08dc580e6245c087cb6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa72d84e78eb6f08dc580e6245c087cb6">◆ </a></span>event_init()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL struct <a class="el" href="structevent__base.html">event_base</a>* event_init </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initialize the event API. </p>
<p>The event API needs to be initialized with <a class="el" href="event__compat_8h.html#aa72d84e78eb6f08dc580e6245c087cb6" title="Initialize the event API.">event_init()</a> before it can be used. Sets the global current base that gets used for events that have no base associated with them.</p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000027">Deprecated:</a></b></dt><dd>This function is deprecated because it replaces the "current" <a class="el" href="structevent__base.html" title="Structure to hold information and state for a Libevent dispatch loop.">event_base</a>, and is totally unsafe for multithreaded use. The replacement is <a class="el" href="event_8h.html#af34c025430d445427a2a5661082405c3" title="Create and return a new event_base to use with the rest of Libevent.">event_base_new()</a>.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="event_8h.html#a20fb823ec65b17519ec07aee1a0a22ba" title="Associate a different event base with an event.">event_base_set()</a>, <a class="el" href="event_8h.html#af34c025430d445427a2a5661082405c3" title="Create and return a new event_base to use with the rest of Libevent.">event_base_new()</a> </dd></dl>
</div>
</div>
<a id="a3d6542d4518f6873ef9d308e3ee525e1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3d6542d4518f6873ef9d308e3ee525e1">◆ </a></span>event_loop()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL int event_loop </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Handle events. </p>
<p>This function behaves like <a class="el" href="event_8h.html#acd7da32086d1e37008e7c76c9ea54fc4" title="Wait for events to become active, and run their callbacks.">event_base_loop()</a>, but uses the "current" base</p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000029">Deprecated:</a></b></dt><dd>This function is deprecated because it uses the event base from the last call to event_init, and is therefore not safe for multithreaded use. The replacement is <a class="el" href="event_8h.html#acd7da32086d1e37008e7c76c9ea54fc4" title="Wait for events to become active, and run their callbacks.">event_base_loop()</a>.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="event_8h.html#acd7da32086d1e37008e7c76c9ea54fc4" title="Wait for events to become active, and run their callbacks.">event_base_loop()</a>, <a class="el" href="event__compat_8h.html#aa72d84e78eb6f08dc580e6245c087cb6" title="Initialize the event API.">event_init()</a> </dd></dl>
</div>
</div>
<a id="a497e5e360112dcbdc8409ecb45c2c565"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a497e5e360112dcbdc8409ecb45c2c565">◆ </a></span>event_loopbreak()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL int event_loopbreak </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Abort the active <a class="el" href="event__compat_8h.html#a3d6542d4518f6873ef9d308e3ee525e1" title="Handle events.">event_loop()</a> immediately. </p>
<p>This function behaves like event_base_loopbreakt(), except that it uses the "current" base.</p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000031">Deprecated:</a></b></dt><dd>This function is deprecated because it uses the event base from the last call to event_init, and is therefore not safe for multithreaded use. The replacement is <a class="el" href="event_8h.html#a28e0be91488e8a0ed57a582f3343eaf6" title="Abort the active event_base_loop() immediately.">event_base_loopbreak()</a>.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="event_8h.html#a28e0be91488e8a0ed57a582f3343eaf6" title="Abort the active event_base_loop() immediately.">event_base_loopbreak()</a>, <a class="el" href="event__compat_8h.html#aa72d84e78eb6f08dc580e6245c087cb6" title="Initialize the event API.">event_init()</a> </dd></dl>
</div>
</div>
<a id="a88b7e5bb1e7bd5e617167ed6192fdd66"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a88b7e5bb1e7bd5e617167ed6192fdd66">◆ </a></span>event_loopexit()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL int event_loopexit </td>
<td>(</td>
<td class="paramtype">const struct timeval * </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Exit the event loop after the specified time. </p>
<p>This function behaves like <a class="el" href="event_8h.html#a67ba4db4b6e7467b3412219530603e60" title="Exit the event loop after the specified time.">event_base_loopexit()</a>, except that it uses the "current" base.</p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000030">Deprecated:</a></b></dt><dd>This function is deprecated because it uses the event base from the last call to event_init, and is therefore not safe for multithreaded use. The replacement is <a class="el" href="event_8h.html#a67ba4db4b6e7467b3412219530603e60" title="Exit the event loop after the specified time.">event_base_loopexit()</a>.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="event__compat_8h.html#aa72d84e78eb6f08dc580e6245c087cb6" title="Initialize the event API.">event_init</a>, <a class="el" href="event_8h.html#a67ba4db4b6e7467b3412219530603e60" title="Exit the event loop after the specified time.">event_base_loopexit()</a> </dd></dl>
</div>
</div>
<a id="aa7139d18495e80b2e31961c1c553d45e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa7139d18495e80b2e31961c1c553d45e">◆ </a></span>event_once()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL int event_once </td>
<td>(</td>
<td class="paramtype"><a class="el" href="util_8h.html#a7ef0023565082a65020f6e56be59fd0b">evutil_socket_t</a> </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">short </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void(*)(<a class="el" href="util_8h.html#a7ef0023565082a65020f6e56be59fd0b">evutil_socket_t</a>, short, void *) </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const struct timeval * </td>
<td class="paramname"> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Schedule a one-time event to occur. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000032">Deprecated:</a></b></dt><dd>This function is obsolete, and has been replaced by <a class="el" href="event_8h.html#ae4d40e572ad8310897ce06f9fe0f9062" title="Schedule a one-time event.">event_base_once()</a>. Its use is deprecated because it relies on the "current" base configured by <a class="el" href="event__compat_8h.html#aa72d84e78eb6f08dc580e6245c087cb6" title="Initialize the event API.">event_init()</a>.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="event_8h.html#ae4d40e572ad8310897ce06f9fe0f9062" title="Schedule a one-time event.">event_base_once()</a> </dd></dl>
</div>
</div>
<a id="ade115d1b3302c33a6308c50964b6304e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ade115d1b3302c33a6308c50964b6304e">◆ </a></span>event_priority_init()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL int event_priority_init </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the number of different event priorities. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000034">Deprecated:</a></b></dt><dd>This function is deprecated because it is easily confused by multiple calls to <a class="el" href="event__compat_8h.html#aa72d84e78eb6f08dc580e6245c087cb6" title="Initialize the event API.">event_init()</a>, and because it is not safe for multithreaded use. The replacement is <a class="el" href="event_8h.html#a289e44ce22c816060bf7b7bfe38720b9" title="Set the number of different event priorities.">event_base_priority_init()</a>.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="event_8h.html#a289e44ce22c816060bf7b7bfe38720b9" title="Set the number of different event priorities.">event_base_priority_init()</a> </dd></dl>
</div>
</div>
<a id="af06653a20ca79b6229adf89630d20916"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af06653a20ca79b6229adf89630d20916">◆ </a></span>event_set()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL void event_set </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="structevent.html">event</a> * </td>
<td class="paramname">, </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">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">short </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void(*)(<a class="el" href="util_8h.html#a7ef0023565082a65020f6e56be59fd0b">evutil_socket_t</a>, short, void *) </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Prepare an event structure to be added. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000035">Deprecated:</a></b></dt><dd><a class="el" href="event__compat_8h.html#af06653a20ca79b6229adf89630d20916" title="Prepare an event structure to be added.">event_set()</a> is not recommended for new code, because it requires a subsequent call to <a class="el" href="event_8h.html#a20fb823ec65b17519ec07aee1a0a22ba" title="Associate a different event base with an event.">event_base_set()</a> to be safe under most circumstances. Use <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> instead. </dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>