-
Notifications
You must be signed in to change notification settings - Fork 4
/
bufferevent_8h.html
2431 lines (2263 loc) · 154 KB
/
bufferevent_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/bufferevent.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">bufferevent.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Functions for buffering data for network sending or receiving.
<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="bufferevent_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="structbufferevent.html">bufferevent</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">An opaque type for handling buffered IO. <a href="structbufferevent.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:a78fc86349f408552be0fdf249db673ec"><td class="memItemLeft" align="right" valign="top"><a id="a78fc86349f408552be0fdf249db673ec"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a78fc86349f408552be0fdf249db673ec">EV_RATE_LIMIT_MAX</a>   EV_SSIZE_MAX</td></tr>
<tr class="memdesc:a78fc86349f408552be0fdf249db673ec"><td class="mdescLeft"> </td><td class="mdescRight">Maximum configurable rate- or burst-limit. <br /></td></tr>
<tr class="separator:a78fc86349f408552be0fdf249db673ec"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">Bufferevent event codes</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p>These flags are passed as arguments to a bufferevent's event callback. </p>
</div></td></tr>
<tr class="memitem:affb7a7e5e21e1541ba6f43f950d92993"><td class="memItemLeft" align="right" valign="top"><a id="affb7a7e5e21e1541ba6f43f950d92993"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#affb7a7e5e21e1541ba6f43f950d92993">BEV_EVENT_CONNECTED</a>   0x80</td></tr>
<tr class="memdesc:affb7a7e5e21e1541ba6f43f950d92993"><td class="mdescLeft"> </td><td class="mdescRight">connect operation finished. <br /></td></tr>
<tr class="separator:affb7a7e5e21e1541ba6f43f950d92993"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4d7d8c93cf62e6f3d37c0cbac75aebcc"><td class="memItemLeft" align="right" valign="top"><a id="a4d7d8c93cf62e6f3d37c0cbac75aebcc"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a4d7d8c93cf62e6f3d37c0cbac75aebcc">BEV_EVENT_EOF</a>   0x10</td></tr>
<tr class="memdesc:a4d7d8c93cf62e6f3d37c0cbac75aebcc"><td class="mdescLeft"> </td><td class="mdescRight">eof file reached <br /></td></tr>
<tr class="separator:a4d7d8c93cf62e6f3d37c0cbac75aebcc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5f112d7a064258bdabf8d5182a3bf5e4"><td class="memItemLeft" align="right" valign="top"><a id="a5f112d7a064258bdabf8d5182a3bf5e4"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a5f112d7a064258bdabf8d5182a3bf5e4">BEV_EVENT_ERROR</a>   0x20</td></tr>
<tr class="memdesc:a5f112d7a064258bdabf8d5182a3bf5e4"><td class="mdescLeft"> </td><td class="mdescRight">unrecoverable error encountered <br /></td></tr>
<tr class="separator:a5f112d7a064258bdabf8d5182a3bf5e4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a504816ca8678e4f3d0bee2700fda524d"><td class="memItemLeft" align="right" valign="top"><a id="a504816ca8678e4f3d0bee2700fda524d"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a504816ca8678e4f3d0bee2700fda524d">BEV_EVENT_READING</a>   0x01</td></tr>
<tr class="memdesc:a504816ca8678e4f3d0bee2700fda524d"><td class="mdescLeft"> </td><td class="mdescRight">error encountered while reading <br /></td></tr>
<tr class="separator:a504816ca8678e4f3d0bee2700fda524d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa537428e3ac2c8d2dbb4ec041f09347f"><td class="memItemLeft" align="right" valign="top"><a id="aa537428e3ac2c8d2dbb4ec041f09347f"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#aa537428e3ac2c8d2dbb4ec041f09347f">BEV_EVENT_TIMEOUT</a>   0x40</td></tr>
<tr class="memdesc:aa537428e3ac2c8d2dbb4ec041f09347f"><td class="mdescLeft"> </td><td class="mdescRight">user-specified timeout reached <br /></td></tr>
<tr class="separator:aa537428e3ac2c8d2dbb4ec041f09347f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a557afaa0ce75e6bbb71fdcd68c35d077"><td class="memItemLeft" align="right" valign="top"><a id="a557afaa0ce75e6bbb71fdcd68c35d077"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a557afaa0ce75e6bbb71fdcd68c35d077">BEV_EVENT_WRITING</a>   0x02</td></tr>
<tr class="memdesc:a557afaa0ce75e6bbb71fdcd68c35d077"><td class="mdescLeft"> </td><td class="mdescRight">error encountered while writing <br /></td></tr>
<tr class="separator:a557afaa0ce75e6bbb71fdcd68c35d077"><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:ad0b9fa4a6c8f03b2fe5a9929a7f2cd59"><td class="memItemLeft" align="right" valign="top">typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#ad0b9fa4a6c8f03b2fe5a9929a7f2cd59">bufferevent_data_cb</a>) (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bev, void *ctx)</td></tr>
<tr class="memdesc:ad0b9fa4a6c8f03b2fe5a9929a7f2cd59"><td class="mdescLeft"> </td><td class="mdescRight">A read or write callback for a bufferevent. <a href="bufferevent_8h.html#ad0b9fa4a6c8f03b2fe5a9929a7f2cd59">More...</a><br /></td></tr>
<tr class="separator:ad0b9fa4a6c8f03b2fe5a9929a7f2cd59"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3b0191b460511796e5281474cd704ec4"><td class="memItemLeft" align="right" valign="top">typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a3b0191b460511796e5281474cd704ec4">bufferevent_event_cb</a>) (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bev, short what, void *ctx)</td></tr>
<tr class="memdesc:a3b0191b460511796e5281474cd704ec4"><td class="mdescLeft"> </td><td class="mdescRight">An event/error callback for a bufferevent. <a href="bufferevent_8h.html#a3b0191b460511796e5281474cd704ec4">More...</a><br /></td></tr>
<tr class="separator:a3b0191b460511796e5281474cd704ec4"><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:ac35edc760057a2e48b4e8ba9ecf2ad25"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#ac35edc760057a2e48b4e8ba9ecf2ad25">bufferevent_flush_mode</a> { <a class="el" href="bufferevent_8h.html#ac35edc760057a2e48b4e8ba9ecf2ad25a81903ce04ca68ac1680dd0b7a28a7fce">BEV_NORMAL</a> = 0,
<a class="el" href="bufferevent_8h.html#ac35edc760057a2e48b4e8ba9ecf2ad25a77e7f15a95815dcaaef27fdabb0e6164">BEV_FLUSH</a> = 1,
<a class="el" href="bufferevent_8h.html#ac35edc760057a2e48b4e8ba9ecf2ad25acb248a91854bbebd773061df7f4bbc94">BEV_FINISHED</a> = 2
}</td></tr>
<tr class="memdesc:ac35edc760057a2e48b4e8ba9ecf2ad25"><td class="mdescLeft"> </td><td class="mdescRight">Flags that can be passed into filters to let them know how to deal with the incoming data. <a href="bufferevent_8h.html#ac35edc760057a2e48b4e8ba9ecf2ad25">More...</a><br /></td></tr>
<tr class="separator:ac35edc760057a2e48b4e8ba9ecf2ad25"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa4919449c62c6483e2d135509190dc65"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#aa4919449c62c6483e2d135509190dc65">bufferevent_options</a> { <a class="el" href="bufferevent_8h.html#aa4919449c62c6483e2d135509190dc65a5dc89d74ef445da33295d00c8f6adc90">BEV_OPT_CLOSE_ON_FREE</a> = (1<<0),
<a class="el" href="bufferevent_8h.html#aa4919449c62c6483e2d135509190dc65adfb637881b739eff1441ad848a5e3a2d">BEV_OPT_THREADSAFE</a> = (1<<1),
<a class="el" href="bufferevent_8h.html#aa4919449c62c6483e2d135509190dc65a2fbeb24d0156aa2492c23aaace73f1d3">BEV_OPT_DEFER_CALLBACKS</a> = (1<<2),
<a class="el" href="bufferevent_8h.html#aa4919449c62c6483e2d135509190dc65acb8ca6f6422fb8f9a748521cf8c4caf5">BEV_OPT_UNLOCK_CALLBACKS</a> = (1<<3)
}</td></tr>
<tr class="memdesc:aa4919449c62c6483e2d135509190dc65"><td class="mdescLeft"> </td><td class="mdescRight">Options that can be specified when creating a bufferevent. <a href="bufferevent_8h.html#aa4919449c62c6483e2d135509190dc65">More...</a><br /></td></tr>
<tr class="separator:aa4919449c62c6483e2d135509190dc65"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7837b6947fc855924466e2347a6faa8f"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a7837b6947fc855924466e2347a6faa8f">bufferevent_trigger_options</a> { <a class="el" href="bufferevent_8h.html#a7837b6947fc855924466e2347a6faa8fa02d5d43f86f75f0f1569ca2b16025bfc">BEV_TRIG_IGNORE_WATERMARKS</a> = (1<<16),
<a class="el" href="bufferevent_8h.html#a7837b6947fc855924466e2347a6faa8faef788894ba060effdd88553e59eb1330">BEV_TRIG_DEFER_CALLBACKS</a> = BEV_OPT_DEFER_CALLBACKS
}</td></tr>
<tr class="memdesc:a7837b6947fc855924466e2347a6faa8f"><td class="mdescLeft"> </td><td class="mdescRight">Flags for bufferevent_trigger(_event) that modify when and how to trigger the callback. <a href="bufferevent_8h.html#a7837b6947fc855924466e2347a6faa8f">More...</a><br /></td></tr>
<tr class="separator:a7837b6947fc855924466e2347a6faa8f"><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:a44ea6c9406f855dadf4afadadbbf47d8"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a44ea6c9406f855dadf4afadadbbf47d8">bufferevent_add_to_rate_limit_group</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bev, struct bufferevent_rate_limit_group *g)</td></tr>
<tr class="memdesc:a44ea6c9406f855dadf4afadadbbf47d8"><td class="mdescLeft"> </td><td class="mdescRight">Add 'bev' to the list of bufferevents whose aggregate reading and writing is restricted by 'g'. <a href="bufferevent_8h.html#a44ea6c9406f855dadf4afadadbbf47d8">More...</a><br /></td></tr>
<tr class="separator:a44ea6c9406f855dadf4afadadbbf47d8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:acb59fdb64642f73a96c84adeb97311cb"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#acb59fdb64642f73a96c84adeb97311cb">bufferevent_base_set</a> (struct <a class="el" href="structevent__base.html">event_base</a> *base, struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev)</td></tr>
<tr class="memdesc:acb59fdb64642f73a96c84adeb97311cb"><td class="mdescLeft"> </td><td class="mdescRight">Assign a bufferevent to a specific <a class="el" href="structevent__base.html" title="Structure to hold information and state for a Libevent dispatch loop.">event_base</a>. <a href="bufferevent_8h.html#acb59fdb64642f73a96c84adeb97311cb">More...</a><br /></td></tr>
<tr class="separator:acb59fdb64642f73a96c84adeb97311cb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3427551c0806f78f1bdfd8d767974e27"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a3427551c0806f78f1bdfd8d767974e27">bufferevent_decref</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev)</td></tr>
<tr class="memdesc:a3427551c0806f78f1bdfd8d767974e27"><td class="mdescLeft"> </td><td class="mdescRight">Public interface to manually decrement the reference count of a bufferevent. <a href="bufferevent_8h.html#a3427551c0806f78f1bdfd8d767974e27">More...</a><br /></td></tr>
<tr class="separator:a3427551c0806f78f1bdfd8d767974e27"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4f3974def824e73a6861d94cff71e7c6"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a4f3974def824e73a6861d94cff71e7c6">bufferevent_disable</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev, short <a class="el" href="structevent.html">event</a>)</td></tr>
<tr class="memdesc:a4f3974def824e73a6861d94cff71e7c6"><td class="mdescLeft"> </td><td class="mdescRight">Disable a bufferevent. <a href="bufferevent_8h.html#a4f3974def824e73a6861d94cff71e7c6">More...</a><br /></td></tr>
<tr class="separator:a4f3974def824e73a6861d94cff71e7c6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa8a5dd2436494afd374213b99102265b"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#aa8a5dd2436494afd374213b99102265b">bufferevent_enable</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev, short <a class="el" href="structevent.html">event</a>)</td></tr>
<tr class="memdesc:aa8a5dd2436494afd374213b99102265b"><td class="mdescLeft"> </td><td class="mdescRight">Enable a bufferevent. <a href="bufferevent_8h.html#aa8a5dd2436494afd374213b99102265b">More...</a><br /></td></tr>
<tr class="separator:aa8a5dd2436494afd374213b99102265b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4e7b46a3dd1518534a2120ee9c8dbe69"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a4e7b46a3dd1518534a2120ee9c8dbe69">bufferevent_flush</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev, short iotype, enum <a class="el" href="bufferevent_8h.html#ac35edc760057a2e48b4e8ba9ecf2ad25">bufferevent_flush_mode</a> mode)</td></tr>
<tr class="memdesc:a4e7b46a3dd1518534a2120ee9c8dbe69"><td class="mdescLeft"> </td><td class="mdescRight">Triggers the bufferevent to produce more data if possible. <a href="bufferevent_8h.html#a4e7b46a3dd1518534a2120ee9c8dbe69">More...</a><br /></td></tr>
<tr class="separator:a4e7b46a3dd1518534a2120ee9c8dbe69"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8baa699f526f237c0d33f618f073c1cc"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a8baa699f526f237c0d33f618f073c1cc">bufferevent_free</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev)</td></tr>
<tr class="memdesc:a8baa699f526f237c0d33f618f073c1cc"><td class="mdescLeft"> </td><td class="mdescRight">Deallocate the storage associated with a bufferevent structure. <a href="bufferevent_8h.html#a8baa699f526f237c0d33f618f073c1cc">More...</a><br /></td></tr>
<tr class="separator:a8baa699f526f237c0d33f618f073c1cc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a16aa6baf1d489b14fd31cf5e18265186"><td class="memItemLeft" align="right" valign="top"><a id="a16aa6baf1d489b14fd31cf5e18265186"></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="bufferevent_8h.html#a16aa6baf1d489b14fd31cf5e18265186">bufferevent_get_base</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bev)</td></tr>
<tr class="memdesc:a16aa6baf1d489b14fd31cf5e18265186"><td class="mdescLeft"> </td><td class="mdescRight">Return the <a class="el" href="structevent__base.html" title="Structure to hold information and state for a Libevent dispatch loop.">event_base</a> used by a bufferevent. <br /></td></tr>
<tr class="separator:a16aa6baf1d489b14fd31cf5e18265186"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab78b8248210f0fadac8b5924dde5a3e7"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL short </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#ab78b8248210f0fadac8b5924dde5a3e7">bufferevent_get_enabled</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev)</td></tr>
<tr class="memdesc:ab78b8248210f0fadac8b5924dde5a3e7"><td class="mdescLeft"> </td><td class="mdescRight">Return the events that are enabled on a given bufferevent. <a href="bufferevent_8h.html#ab78b8248210f0fadac8b5924dde5a3e7">More...</a><br /></td></tr>
<tr class="separator:ab78b8248210f0fadac8b5924dde5a3e7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3ddbf50178b96b3f243ddc83d67e88b0"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL struct <a class="el" href="structevbuffer.html">evbuffer</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a3ddbf50178b96b3f243ddc83d67e88b0">bufferevent_get_input</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev)</td></tr>
<tr class="memdesc:a3ddbf50178b96b3f243ddc83d67e88b0"><td class="mdescLeft"> </td><td class="mdescRight">Returns the input buffer. <a href="bufferevent_8h.html#a3ddbf50178b96b3f243ddc83d67e88b0">More...</a><br /></td></tr>
<tr class="separator:a3ddbf50178b96b3f243ddc83d67e88b0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2fd3db28a9802573c07e5e0584b85465"><td class="memItemLeft" align="right" valign="top"><a id="a2fd3db28a9802573c07e5e0584b85465"></a>
EVENT2_EXPORT_SYMBOL ev_ssize_t </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a2fd3db28a9802573c07e5e0584b85465">bufferevent_get_max_single_read</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bev)</td></tr>
<tr class="memdesc:a2fd3db28a9802573c07e5e0584b85465"><td class="mdescLeft"> </td><td class="mdescRight">Get the current size limit for single read operation. <br /></td></tr>
<tr class="separator:a2fd3db28a9802573c07e5e0584b85465"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:acb0bd0b3bb5c983c2b3680637af08617"><td class="memItemLeft" align="right" valign="top"><a id="acb0bd0b3bb5c983c2b3680637af08617"></a>
EVENT2_EXPORT_SYMBOL ev_ssize_t </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#acb0bd0b3bb5c983c2b3680637af08617">bufferevent_get_max_single_write</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bev)</td></tr>
<tr class="memdesc:acb0bd0b3bb5c983c2b3680637af08617"><td class="mdescLeft"> </td><td class="mdescRight">Get the current size limit for single write operation. <br /></td></tr>
<tr class="separator:acb0bd0b3bb5c983c2b3680637af08617"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac6e45fa1fc577c4f0e6c4689e72c0a15"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL struct <a class="el" href="structevbuffer.html">evbuffer</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#ac6e45fa1fc577c4f0e6c4689e72c0a15">bufferevent_get_output</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev)</td></tr>
<tr class="memdesc:ac6e45fa1fc577c4f0e6c4689e72c0a15"><td class="mdescLeft"> </td><td class="mdescRight">Returns the output buffer. <a href="bufferevent_8h.html#ac6e45fa1fc577c4f0e6c4689e72c0a15">More...</a><br /></td></tr>
<tr class="separator:ac6e45fa1fc577c4f0e6c4689e72c0a15"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0091b3c386580cf2980039ad9a629b70"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a0091b3c386580cf2980039ad9a629b70">bufferevent_get_priority</a> (const struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev)</td></tr>
<tr class="memdesc:a0091b3c386580cf2980039ad9a629b70"><td class="mdescLeft"> </td><td class="mdescRight">Return the priority of a bufferevent. <a href="bufferevent_8h.html#a0091b3c386580cf2980039ad9a629b70">More...</a><br /></td></tr>
<tr class="separator:a0091b3c386580cf2980039ad9a629b70"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3e0081196d2776b92994c6034eb00b2c"><td class="memItemLeft" align="right" valign="top"><a id="a3e0081196d2776b92994c6034eb00b2c"></a>
EVENT2_EXPORT_SYMBOL struct <a class="el" href="structbufferevent.html">bufferevent</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a3e0081196d2776b92994c6034eb00b2c">bufferevent_get_underlying</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev)</td></tr>
<tr class="memdesc:a3e0081196d2776b92994c6034eb00b2c"><td class="mdescLeft"> </td><td class="mdescRight">Returns the underlying bufferevent associated with a bufferevent (if the bufferevent is a wrapper), or NULL if there is no underlying bufferevent. <br /></td></tr>
<tr class="separator:a3e0081196d2776b92994c6034eb00b2c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae58a293995d110362cc1fc695678a928"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#ae58a293995d110362cc1fc695678a928">bufferevent_getcb</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev, <a class="el" href="bufferevent_8h.html#ad0b9fa4a6c8f03b2fe5a9929a7f2cd59">bufferevent_data_cb</a> *readcb_ptr, <a class="el" href="bufferevent_8h.html#ad0b9fa4a6c8f03b2fe5a9929a7f2cd59">bufferevent_data_cb</a> *writecb_ptr, <a class="el" href="bufferevent_8h.html#a3b0191b460511796e5281474cd704ec4">bufferevent_event_cb</a> *eventcb_ptr, void **cbarg_ptr)</td></tr>
<tr class="memdesc:ae58a293995d110362cc1fc695678a928"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the callbacks for a bufferevent. <a href="bufferevent_8h.html#ae58a293995d110362cc1fc695678a928">More...</a><br /></td></tr>
<tr class="separator:ae58a293995d110362cc1fc695678a928"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a544e049e4a8cca27ab1a98b8339fe72a"><td class="memItemLeft" align="right" valign="top">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="bufferevent_8h.html#a544e049e4a8cca27ab1a98b8339fe72a">bufferevent_getfd</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev)</td></tr>
<tr class="memdesc:a544e049e4a8cca27ab1a98b8339fe72a"><td class="mdescLeft"> </td><td class="mdescRight">Returns the file descriptor associated with a bufferevent, or -1 if no file descriptor is associated with the bufferevent. <a href="bufferevent_8h.html#a544e049e4a8cca27ab1a98b8339fe72a">More...</a><br /></td></tr>
<tr class="separator:a544e049e4a8cca27ab1a98b8339fe72a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae3dd6349d1e33b5238e110a3aba4d163"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#ae3dd6349d1e33b5238e110a3aba4d163">bufferevent_getwatermark</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev, short events, size_t *lowmark, size_t *highmark)</td></tr>
<tr class="memdesc:ae3dd6349d1e33b5238e110a3aba4d163"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the watermarks for read or write events. <a href="bufferevent_8h.html#ae3dd6349d1e33b5238e110a3aba4d163">More...</a><br /></td></tr>
<tr class="separator:ae3dd6349d1e33b5238e110a3aba4d163"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a27cabbe542fec7731049312e37e7ba95"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a27cabbe542fec7731049312e37e7ba95">bufferevent_incref</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev)</td></tr>
<tr class="memdesc:a27cabbe542fec7731049312e37e7ba95"><td class="mdescLeft"> </td><td class="mdescRight">Public interface to manually increase the reference count of a bufferevent this is useful in situations where a user may reference the bufferevent somewhere else (unknown to libevent) <a href="bufferevent_8h.html#a27cabbe542fec7731049312e37e7ba95">More...</a><br /></td></tr>
<tr class="separator:a27cabbe542fec7731049312e37e7ba95"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8744a827bb440c1b62676ec35b56b5fc"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a8744a827bb440c1b62676ec35b56b5fc">bufferevent_lock</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev)</td></tr>
<tr class="memdesc:a8744a827bb440c1b62676ec35b56b5fc"><td class="mdescLeft"> </td><td class="mdescRight">Acquire the lock on a bufferevent. <a href="bufferevent_8h.html#a8744a827bb440c1b62676ec35b56b5fc">More...</a><br /></td></tr>
<tr class="separator:a8744a827bb440c1b62676ec35b56b5fc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a32442df1f9b2252e00d9d9a64ea07854"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL struct <a class="el" href="structbufferevent.html">bufferevent</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a32442df1f9b2252e00d9d9a64ea07854">bufferevent_pair_get_partner</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bev)</td></tr>
<tr class="memdesc:a32442df1f9b2252e00d9d9a64ea07854"><td class="mdescLeft"> </td><td class="mdescRight">Given one bufferevent returned by <a class="el" href="bufferevent_8h.html#ac6271b7cc2126d3bc745cf00187672a5" title="Allocate a pair of linked bufferevents.">bufferevent_pair_new()</a>, returns the other one if it still exists. <a href="bufferevent_8h.html#a32442df1f9b2252e00d9d9a64ea07854">More...</a><br /></td></tr>
<tr class="separator:a32442df1f9b2252e00d9d9a64ea07854"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac6271b7cc2126d3bc745cf00187672a5"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#ac6271b7cc2126d3bc745cf00187672a5">bufferevent_pair_new</a> (struct <a class="el" href="structevent__base.html">event_base</a> *base, int options, struct <a class="el" href="structbufferevent.html">bufferevent</a> *pair[2])</td></tr>
<tr class="memdesc:ac6271b7cc2126d3bc745cf00187672a5"><td class="mdescLeft"> </td><td class="mdescRight">Allocate a pair of linked bufferevents. <a href="bufferevent_8h.html#ac6271b7cc2126d3bc745cf00187672a5">More...</a><br /></td></tr>
<tr class="separator:ac6271b7cc2126d3bc745cf00187672a5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2a0eaaf330e2fa46f84dd5ec3e1299c8"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a2a0eaaf330e2fa46f84dd5ec3e1299c8">bufferevent_priority_set</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev, int pri)</td></tr>
<tr class="memdesc:a2a0eaaf330e2fa46f84dd5ec3e1299c8"><td class="mdescLeft"> </td><td class="mdescRight">Assign a priority to a bufferevent. <a href="bufferevent_8h.html#a2a0eaaf330e2fa46f84dd5ec3e1299c8">More...</a><br /></td></tr>
<tr class="separator:a2a0eaaf330e2fa46f84dd5ec3e1299c8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5f4f37207371ed122bd5866a55769be1"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a5f4f37207371ed122bd5866a55769be1">bufferevent_rate_limit_group_free</a> (struct bufferevent_rate_limit_group *)</td></tr>
<tr class="memdesc:a5f4f37207371ed122bd5866a55769be1"><td class="mdescLeft"> </td><td class="mdescRight">Free a rate-limiting group. <a href="bufferevent_8h.html#a5f4f37207371ed122bd5866a55769be1">More...</a><br /></td></tr>
<tr class="separator:a5f4f37207371ed122bd5866a55769be1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afc5cd06cb7b574ec9746c8fb89b98491"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL struct bufferevent_rate_limit_group * </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#afc5cd06cb7b574ec9746c8fb89b98491">bufferevent_rate_limit_group_new</a> (struct <a class="el" href="structevent__base.html">event_base</a> *base, const struct ev_token_bucket_cfg *cfg)</td></tr>
<tr class="memdesc:afc5cd06cb7b574ec9746c8fb89b98491"><td class="mdescLeft"> </td><td class="mdescRight">Create a new rate-limit group for bufferevents. <a href="bufferevent_8h.html#afc5cd06cb7b574ec9746c8fb89b98491">More...</a><br /></td></tr>
<tr class="separator:afc5cd06cb7b574ec9746c8fb89b98491"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a23bbafd1ee4e0a12cc2253b46458b06d"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a23bbafd1ee4e0a12cc2253b46458b06d">bufferevent_rate_limit_group_set_cfg</a> (struct bufferevent_rate_limit_group *, const struct ev_token_bucket_cfg *)</td></tr>
<tr class="memdesc:a23bbafd1ee4e0a12cc2253b46458b06d"><td class="mdescLeft"> </td><td class="mdescRight">Change the rate-limiting settings for a given rate-limiting group. <a href="bufferevent_8h.html#a23bbafd1ee4e0a12cc2253b46458b06d">More...</a><br /></td></tr>
<tr class="separator:a23bbafd1ee4e0a12cc2253b46458b06d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a43c18046f0accddec559dba1a67d933d"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a43c18046f0accddec559dba1a67d933d">bufferevent_rate_limit_group_set_min_share</a> (struct bufferevent_rate_limit_group *, size_t)</td></tr>
<tr class="memdesc:a43c18046f0accddec559dba1a67d933d"><td class="mdescLeft"> </td><td class="mdescRight">Change the smallest quantum we're willing to allocate to any single bufferevent in a group for reading or writing at a time. <a href="bufferevent_8h.html#a43c18046f0accddec559dba1a67d933d">More...</a><br /></td></tr>
<tr class="separator:a43c18046f0accddec559dba1a67d933d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9e36c54f6b0ea02183998d5a604a00ef"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a9e36c54f6b0ea02183998d5a604a00ef">bufferevent_read</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev, void *data, size_t size)</td></tr>
<tr class="memdesc:a9e36c54f6b0ea02183998d5a604a00ef"><td class="mdescLeft"> </td><td class="mdescRight">Read data from a bufferevent buffer. <a href="bufferevent_8h.html#a9e36c54f6b0ea02183998d5a604a00ef">More...</a><br /></td></tr>
<tr class="separator:a9e36c54f6b0ea02183998d5a604a00ef"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abcab28c476ef6bde1faf233bfd18285c"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#abcab28c476ef6bde1faf233bfd18285c">bufferevent_read_buffer</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev, struct <a class="el" href="structevbuffer.html">evbuffer</a> *buf)</td></tr>
<tr class="memdesc:abcab28c476ef6bde1faf233bfd18285c"><td class="mdescLeft"> </td><td class="mdescRight">Read data from a bufferevent buffer into an evbuffer. <a href="bufferevent_8h.html#abcab28c476ef6bde1faf233bfd18285c">More...</a><br /></td></tr>
<tr class="separator:abcab28c476ef6bde1faf233bfd18285c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a37762f5e89204ca8a8184b59414e6f46"><td class="memItemLeft" align="right" valign="top"><a id="a37762f5e89204ca8a8184b59414e6f46"></a>
EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a37762f5e89204ca8a8184b59414e6f46">bufferevent_remove_from_rate_limit_group</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bev)</td></tr>
<tr class="memdesc:a37762f5e89204ca8a8184b59414e6f46"><td class="mdescLeft"> </td><td class="mdescRight">Remove 'bev' from its current rate-limit group (if any). <br /></td></tr>
<tr class="separator:a37762f5e89204ca8a8184b59414e6f46"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a955c7d37679173c593ee6ed0a7adeeea"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a955c7d37679173c593ee6ed0a7adeeea">bufferevent_replacefd</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev, <a class="el" href="util_8h.html#a7ef0023565082a65020f6e56be59fd0b">evutil_socket_t</a> fd)</td></tr>
<tr class="memdesc:a955c7d37679173c593ee6ed0a7adeeea"><td class="mdescLeft"> </td><td class="mdescRight">Replaces the file descriptor on which the bufferevent operates. <a href="bufferevent_8h.html#a955c7d37679173c593ee6ed0a7adeeea">More...</a><br /></td></tr>
<tr class="separator:a955c7d37679173c593ee6ed0a7adeeea"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac450d06c482f354510d5d0abe4577278"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#ac450d06c482f354510d5d0abe4577278">bufferevent_set_max_single_read</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bev, size_t size)</td></tr>
<tr class="memdesc:ac450d06c482f354510d5d0abe4577278"><td class="mdescLeft"> </td><td class="mdescRight">Set the size limit for single read operation. <a href="bufferevent_8h.html#ac450d06c482f354510d5d0abe4577278">More...</a><br /></td></tr>
<tr class="separator:ac450d06c482f354510d5d0abe4577278"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8e5f4f727f9e0b74f8232c3d758b607e"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a8e5f4f727f9e0b74f8232c3d758b607e">bufferevent_set_max_single_write</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bev, size_t size)</td></tr>
<tr class="memdesc:a8e5f4f727f9e0b74f8232c3d758b607e"><td class="mdescLeft"> </td><td class="mdescRight">Set the size limit for single write operation. <a href="bufferevent_8h.html#a8e5f4f727f9e0b74f8232c3d758b607e">More...</a><br /></td></tr>
<tr class="separator:a8e5f4f727f9e0b74f8232c3d758b607e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad5381c899547a19ee6a93df63b064ad4"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#ad5381c899547a19ee6a93df63b064ad4">bufferevent_set_rate_limit</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bev, struct ev_token_bucket_cfg *cfg)</td></tr>
<tr class="memdesc:ad5381c899547a19ee6a93df63b064ad4"><td class="mdescLeft"> </td><td class="mdescRight">Set the rate-limit of a the bufferevent 'bev' to the one specified in 'cfg'. <a href="bufferevent_8h.html#ad5381c899547a19ee6a93df63b064ad4">More...</a><br /></td></tr>
<tr class="separator:ad5381c899547a19ee6a93df63b064ad4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aec0864607ef2bf9816cda06c1c4ab83f"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#aec0864607ef2bf9816cda06c1c4ab83f">bufferevent_set_timeouts</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev, const struct timeval *timeout_read, const struct timeval *timeout_write)</td></tr>
<tr class="memdesc:aec0864607ef2bf9816cda06c1c4ab83f"><td class="mdescLeft"> </td><td class="mdescRight">Set the read and write timeout for a bufferevent. <a href="bufferevent_8h.html#aec0864607ef2bf9816cda06c1c4ab83f">More...</a><br /></td></tr>
<tr class="separator:aec0864607ef2bf9816cda06c1c4ab83f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a031df52978c5237b70fb8ae7df572c97"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a031df52978c5237b70fb8ae7df572c97">bufferevent_setcb</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev, <a class="el" href="bufferevent_8h.html#ad0b9fa4a6c8f03b2fe5a9929a7f2cd59">bufferevent_data_cb</a> readcb, <a class="el" href="bufferevent_8h.html#ad0b9fa4a6c8f03b2fe5a9929a7f2cd59">bufferevent_data_cb</a> writecb, <a class="el" href="bufferevent_8h.html#a3b0191b460511796e5281474cd704ec4">bufferevent_event_cb</a> eventcb, void *cbarg)</td></tr>
<tr class="memdesc:a031df52978c5237b70fb8ae7df572c97"><td class="mdescLeft"> </td><td class="mdescRight">Changes the callbacks for a bufferevent. <a href="bufferevent_8h.html#a031df52978c5237b70fb8ae7df572c97">More...</a><br /></td></tr>
<tr class="separator:a031df52978c5237b70fb8ae7df572c97"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a66cdf9296b02676aacf98a6277a7e756"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a66cdf9296b02676aacf98a6277a7e756">bufferevent_setfd</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev, <a class="el" href="util_8h.html#a7ef0023565082a65020f6e56be59fd0b">evutil_socket_t</a> fd)</td></tr>
<tr class="memdesc:a66cdf9296b02676aacf98a6277a7e756"><td class="mdescLeft"> </td><td class="mdescRight">Changes the file descriptor on which the bufferevent operates. <a href="bufferevent_8h.html#a66cdf9296b02676aacf98a6277a7e756">More...</a><br /></td></tr>
<tr class="separator:a66cdf9296b02676aacf98a6277a7e756"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae23c61cdaf3f74d0fea96d41aa6f7783"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#ae23c61cdaf3f74d0fea96d41aa6f7783">bufferevent_setwatermark</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev, short events, size_t lowmark, size_t highmark)</td></tr>
<tr class="memdesc:ae23c61cdaf3f74d0fea96d41aa6f7783"><td class="mdescLeft"> </td><td class="mdescRight">Sets the watermarks for read and write events. <a href="bufferevent_8h.html#ae23c61cdaf3f74d0fea96d41aa6f7783">More...</a><br /></td></tr>
<tr class="separator:ae23c61cdaf3f74d0fea96d41aa6f7783"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aefc782ac77411bdd712be30d6268af2e"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#aefc782ac77411bdd712be30d6268af2e">bufferevent_socket_connect</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev, const struct sockaddr *addr, int socklen)</td></tr>
<tr class="memdesc:aefc782ac77411bdd712be30d6268af2e"><td class="mdescLeft"> </td><td class="mdescRight">Launch a connect() attempt with a socket-based bufferevent. <a href="bufferevent_8h.html#aefc782ac77411bdd712be30d6268af2e">More...</a><br /></td></tr>
<tr class="separator:aefc782ac77411bdd712be30d6268af2e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5c3c313f2ff0d79a1889e508b37d9dbe"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a5c3c313f2ff0d79a1889e508b37d9dbe">bufferevent_socket_connect_hostname</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev, struct evdns_base *evdns_base, int family, const char *hostname, int port)</td></tr>
<tr class="memdesc:a5c3c313f2ff0d79a1889e508b37d9dbe"><td class="mdescLeft"> </td><td class="mdescRight">Resolve the hostname 'hostname' and connect to it as with <a class="el" href="bufferevent_8h.html#aefc782ac77411bdd712be30d6268af2e" title="Launch a connect() attempt with a socket-based bufferevent.">bufferevent_socket_connect()</a>. <a href="bufferevent_8h.html#a5c3c313f2ff0d79a1889e508b37d9dbe">More...</a><br /></td></tr>
<tr class="separator:a5c3c313f2ff0d79a1889e508b37d9dbe"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afd80dc15fef6d1e7a88a0464e72e8acb"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#afd80dc15fef6d1e7a88a0464e72e8acb">bufferevent_socket_connect_hostname_hints</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev, struct evdns_base *evdns_base, const struct <a class="el" href="structevutil__addrinfo.html">evutil_addrinfo</a> *hints_in, const char *hostname, int port)</td></tr>
<tr class="memdesc:afd80dc15fef6d1e7a88a0464e72e8acb"><td class="mdescLeft"> </td><td class="mdescRight">Resolve the hostname 'hostname' and connect to it as with <a class="el" href="bufferevent_8h.html#aefc782ac77411bdd712be30d6268af2e" title="Launch a connect() attempt with a socket-based bufferevent.">bufferevent_socket_connect()</a>. <a href="bufferevent_8h.html#afd80dc15fef6d1e7a88a0464e72e8acb">More...</a><br /></td></tr>
<tr class="separator:afd80dc15fef6d1e7a88a0464e72e8acb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa533016e5ffc2ed558a5d85f9fbe2fd5"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#aa533016e5ffc2ed558a5d85f9fbe2fd5">bufferevent_socket_get_dns_error</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bev)</td></tr>
<tr class="memdesc:aa533016e5ffc2ed558a5d85f9fbe2fd5"><td class="mdescLeft"> </td><td class="mdescRight">Return the error code for the last failed DNS lookup attempt made by <a class="el" href="bufferevent_8h.html#a5c3c313f2ff0d79a1889e508b37d9dbe" title="Resolve the hostname 'hostname' and connect to it as with bufferevent_socket_connect().">bufferevent_socket_connect_hostname()</a>. <a href="bufferevent_8h.html#aa533016e5ffc2ed558a5d85f9fbe2fd5">More...</a><br /></td></tr>
<tr class="separator:aa533016e5ffc2ed558a5d85f9fbe2fd5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a71181be5ab504e26f866dd3d91494854"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL struct <a class="el" href="structbufferevent.html">bufferevent</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a71181be5ab504e26f866dd3d91494854">bufferevent_socket_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, int options)</td></tr>
<tr class="memdesc:a71181be5ab504e26f866dd3d91494854"><td class="mdescLeft"> </td><td class="mdescRight">Create a new socket bufferevent over an existing socket. <a href="bufferevent_8h.html#a71181be5ab504e26f866dd3d91494854">More...</a><br /></td></tr>
<tr class="separator:a71181be5ab504e26f866dd3d91494854"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae46282450083187370ba2ea42029d341"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#ae46282450083187370ba2ea42029d341">bufferevent_trigger</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev, short iotype, int options)</td></tr>
<tr class="memdesc:ae46282450083187370ba2ea42029d341"><td class="mdescLeft"> </td><td class="mdescRight">Triggers bufferevent data callbacks. <a href="bufferevent_8h.html#ae46282450083187370ba2ea42029d341">More...</a><br /></td></tr>
<tr class="separator:ae46282450083187370ba2ea42029d341"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae8574fb31c0dc88c158c5324110bcbac"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#ae8574fb31c0dc88c158c5324110bcbac">bufferevent_trigger_event</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev, short what, int options)</td></tr>
<tr class="memdesc:ae8574fb31c0dc88c158c5324110bcbac"><td class="mdescLeft"> </td><td class="mdescRight">Triggers the bufferevent event callback. <a href="bufferevent_8h.html#ae8574fb31c0dc88c158c5324110bcbac">More...</a><br /></td></tr>
<tr class="separator:ae8574fb31c0dc88c158c5324110bcbac"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a238f9ac0fcd75094f7b7611e7e6649f2"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a238f9ac0fcd75094f7b7611e7e6649f2">bufferevent_unlock</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev)</td></tr>
<tr class="memdesc:a238f9ac0fcd75094f7b7611e7e6649f2"><td class="mdescLeft"> </td><td class="mdescRight">Release the lock on a bufferevent. <a href="bufferevent_8h.html#a238f9ac0fcd75094f7b7611e7e6649f2">More...</a><br /></td></tr>
<tr class="separator:a238f9ac0fcd75094f7b7611e7e6649f2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7873bee379202ca1913ea365b92d2ed1"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a7873bee379202ca1913ea365b92d2ed1">bufferevent_write</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev, const void *data, size_t size)</td></tr>
<tr class="memdesc:a7873bee379202ca1913ea365b92d2ed1"><td class="mdescLeft"> </td><td class="mdescRight">Write data to a bufferevent buffer. <a href="bufferevent_8h.html#a7873bee379202ca1913ea365b92d2ed1">More...</a><br /></td></tr>
<tr class="separator:a7873bee379202ca1913ea365b92d2ed1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac9b0f97c37f116dcb579e4491dadda1d"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#ac9b0f97c37f116dcb579e4491dadda1d">bufferevent_write_buffer</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bufev, struct <a class="el" href="structevbuffer.html">evbuffer</a> *buf)</td></tr>
<tr class="memdesc:ac9b0f97c37f116dcb579e4491dadda1d"><td class="mdescLeft"> </td><td class="mdescRight">Write data from an evbuffer to a bufferevent buffer. <a href="bufferevent_8h.html#ac9b0f97c37f116dcb579e4491dadda1d">More...</a><br /></td></tr>
<tr class="separator:ac9b0f97c37f116dcb579e4491dadda1d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7ac436abc86f4071a5c43b29c12dba16"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a7ac436abc86f4071a5c43b29c12dba16">ev_token_bucket_cfg_free</a> (struct ev_token_bucket_cfg *cfg)</td></tr>
<tr class="memdesc:a7ac436abc86f4071a5c43b29c12dba16"><td class="mdescLeft"> </td><td class="mdescRight">Free all storage held in 'cfg'. <a href="bufferevent_8h.html#a7ac436abc86f4071a5c43b29c12dba16">More...</a><br /></td></tr>
<tr class="separator:a7ac436abc86f4071a5c43b29c12dba16"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2dc87d1bae8855f9efca12edea9e3b84"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL struct ev_token_bucket_cfg * </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a2dc87d1bae8855f9efca12edea9e3b84">ev_token_bucket_cfg_new</a> (size_t read_rate, size_t read_burst, size_t write_rate, size_t write_burst, const struct timeval *tick_len)</td></tr>
<tr class="memdesc:a2dc87d1bae8855f9efca12edea9e3b84"><td class="mdescLeft"> </td><td class="mdescRight">Initialize and return a new object to configure the rate-limiting behavior of bufferevents. <a href="bufferevent_8h.html#a2dc87d1bae8855f9efca12edea9e3b84">More...</a><br /></td></tr>
<tr class="separator:a2dc87d1bae8855f9efca12edea9e3b84"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">Rate limit inspection</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p>Return the current read or write bucket size for a bufferevent.</p>
<p>If it is not configured with a per-bufferevent ratelimit, return EV_SSIZE_MAX. This function does not inspect the group limit, if any. Note that it can return a negative value if the bufferevent has been made to read or write more than its limit. </p>
</div></td></tr>
<tr class="memitem:a7bd78c974571f1a1781c6d2e7c7f5a95"><td class="memItemLeft" align="right" valign="top"><a id="a7bd78c974571f1a1781c6d2e7c7f5a95"></a>
EVENT2_EXPORT_SYMBOL ev_ssize_t </td><td class="memItemRight" valign="bottom"><b>bufferevent_get_max_to_read</b> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bev)</td></tr>
<tr class="separator:a7bd78c974571f1a1781c6d2e7c7f5a95"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af400a3b3857af85eefc0fa4084bd1405"><td class="memItemLeft" align="right" valign="top"><a id="af400a3b3857af85eefc0fa4084bd1405"></a>
EVENT2_EXPORT_SYMBOL ev_ssize_t </td><td class="memItemRight" valign="bottom"><b>bufferevent_get_max_to_write</b> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bev)</td></tr>
<tr class="separator:af400a3b3857af85eefc0fa4084bd1405"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab6a835bd6e7b6aa8b06e86ebc99a2b63"><td class="memItemLeft" align="right" valign="top"><a id="ab6a835bd6e7b6aa8b06e86ebc99a2b63"></a>
EVENT2_EXPORT_SYMBOL ev_ssize_t </td><td class="memItemRight" valign="bottom"><b>bufferevent_get_read_limit</b> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bev)</td></tr>
<tr class="separator:ab6a835bd6e7b6aa8b06e86ebc99a2b63"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:acf11852528ac5bd13bbcce555ef8bf3e"><td class="memItemLeft" align="right" valign="top"><a id="acf11852528ac5bd13bbcce555ef8bf3e"></a>
EVENT2_EXPORT_SYMBOL const struct ev_token_bucket_cfg * </td><td class="memItemRight" valign="bottom"><b>bufferevent_get_token_bucket_cfg</b> (const struct <a class="el" href="structbufferevent.html">bufferevent</a> *bev)</td></tr>
<tr class="separator:acf11852528ac5bd13bbcce555ef8bf3e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4cf14fd14ead7c499569944a3b110cca"><td class="memItemLeft" align="right" valign="top"><a id="a4cf14fd14ead7c499569944a3b110cca"></a>
EVENT2_EXPORT_SYMBOL ev_ssize_t </td><td class="memItemRight" valign="bottom"><b>bufferevent_get_write_limit</b> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bev)</td></tr>
<tr class="separator:a4cf14fd14ead7c499569944a3b110cca"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">Group Rate limit inspection</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p>Return the read or write bucket size for a bufferevent rate limit group.</p>
<p>Note that it can return a negative value if bufferevents in the group have been made to read or write more than their limits. </p>
</div></td></tr>
<tr class="memitem:a1def3dda7c95050d485f6c93e3f8fc77"><td class="memItemLeft" align="right" valign="top"><a id="a1def3dda7c95050d485f6c93e3f8fc77"></a>
EVENT2_EXPORT_SYMBOL ev_ssize_t </td><td class="memItemRight" valign="bottom"><b>bufferevent_rate_limit_group_get_read_limit</b> (struct bufferevent_rate_limit_group *)</td></tr>
<tr class="separator:a1def3dda7c95050d485f6c93e3f8fc77"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae12b24f9a62ef64f6daa36bb2b43b506"><td class="memItemLeft" align="right" valign="top"><a id="ae12b24f9a62ef64f6daa36bb2b43b506"></a>
EVENT2_EXPORT_SYMBOL ev_ssize_t </td><td class="memItemRight" valign="bottom"><b>bufferevent_rate_limit_group_get_write_limit</b> (struct bufferevent_rate_limit_group *)</td></tr>
<tr class="separator:ae12b24f9a62ef64f6daa36bb2b43b506"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">Rate limit manipulation</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p>Subtract a number of bytes from a bufferevent's read or write bucket.</p>
<p>The decrement value can be negative, if you want to manually refill the bucket. If the change puts the bucket above or below zero, the bufferevent will resume or suspend reading writing as appropriate. These functions make no change in the buckets for the bufferevent's group, if any.</p>
<p>Returns 0 on success, -1 on internal error. </p>
</div></td></tr>
<tr class="memitem:ae3bd5cd93b533a90288f94dd470575cd"><td class="memItemLeft" align="right" valign="top"><a id="ae3bd5cd93b533a90288f94dd470575cd"></a>
EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><b>bufferevent_decrement_read_limit</b> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bev, ev_ssize_t decr)</td></tr>
<tr class="separator:ae3bd5cd93b533a90288f94dd470575cd"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0dc370fe3501d783dc30cdfab2d1ec3a"><td class="memItemLeft" align="right" valign="top"><a id="a0dc370fe3501d783dc30cdfab2d1ec3a"></a>
EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><b>bufferevent_decrement_write_limit</b> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bev, ev_ssize_t decr)</td></tr>
<tr class="separator:a0dc370fe3501d783dc30cdfab2d1ec3a"><td class="memSeparator" colspan="2"> </td></tr>
<tr><td colspan="2"><div class="groupHeader">Group rate limit manipulation</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p>Subtract a number of bytes from a bufferevent rate-limiting group's read or write bucket.</p>
<p>The decrement value can be negative, if you want to manually refill the bucket. If the change puts the bucket above or below zero, the bufferevents in the group will resume or suspend reading writing as appropriate.</p>
<p>Returns 0 on success, -1 on internal error. </p>
</div></td></tr>
<tr class="memitem:a652634947f792d3db45cf996b06f73dc"><td class="memItemLeft" align="right" valign="top"><a id="a652634947f792d3db45cf996b06f73dc"></a>
EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><b>bufferevent_rate_limit_group_decrement_read</b> (struct bufferevent_rate_limit_group *, ev_ssize_t)</td></tr>
<tr class="separator:a652634947f792d3db45cf996b06f73dc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a92fa077a3c0713385ca0c5b28f76bffe"><td class="memItemLeft" align="right" valign="top"><a id="a92fa077a3c0713385ca0c5b28f76bffe"></a>
EVENT2_EXPORT_SYMBOL int </td><td class="memItemRight" valign="bottom"><b>bufferevent_rate_limit_group_decrement_write</b> (struct bufferevent_rate_limit_group *, ev_ssize_t)</td></tr>
<tr class="separator:a92fa077a3c0713385ca0c5b28f76bffe"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac94cfb31bf5542e1a424d2df3d73203f"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#ac94cfb31bf5542e1a424d2df3d73203f">bufferevent_rate_limit_group_get_totals</a> (struct bufferevent_rate_limit_group *grp, ev_uint64_t *total_read_out, ev_uint64_t *total_written_out)</td></tr>
<tr class="memdesc:ac94cfb31bf5542e1a424d2df3d73203f"><td class="mdescLeft"> </td><td class="mdescRight">Inspect the total bytes read/written on a group. <a href="bufferevent_8h.html#ac94cfb31bf5542e1a424d2df3d73203f">More...</a><br /></td></tr>
<tr class="separator:ac94cfb31bf5542e1a424d2df3d73203f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0cb2748aa4dce6804d166a74383dd0cc"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a0cb2748aa4dce6804d166a74383dd0cc">bufferevent_rate_limit_group_reset_totals</a> (struct bufferevent_rate_limit_group *grp)</td></tr>
<tr class="memdesc:a0cb2748aa4dce6804d166a74383dd0cc"><td class="mdescLeft"> </td><td class="mdescRight">Reset the total bytes read/written on a group. <a href="bufferevent_8h.html#a0cb2748aa4dce6804d166a74383dd0cc">More...</a><br /></td></tr>
<tr class="separator:a0cb2748aa4dce6804d166a74383dd0cc"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Filtering support</h2></td></tr>
<tr class="memitem:add4274f8e311afc47fb097d290dc54e8"><td class="memItemLeft" align="right" valign="top">typedef enum <a class="el" href="bufferevent_8h.html#a19e499f7bfa831b802fd3575d141b4e1">bufferevent_filter_result</a>(* </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#add4274f8e311afc47fb097d290dc54e8">bufferevent_filter_cb</a>) (struct <a class="el" href="structevbuffer.html">evbuffer</a> *src, struct <a class="el" href="structevbuffer.html">evbuffer</a> *dst, ev_ssize_t dst_limit, enum <a class="el" href="bufferevent_8h.html#ac35edc760057a2e48b4e8ba9ecf2ad25">bufferevent_flush_mode</a> mode, void *ctx)</td></tr>
<tr class="memdesc:add4274f8e311afc47fb097d290dc54e8"><td class="mdescLeft"> </td><td class="mdescRight">A callback function to implement a filter for a bufferevent. <a href="bufferevent_8h.html#add4274f8e311afc47fb097d290dc54e8">More...</a><br /></td></tr>
<tr class="separator:add4274f8e311afc47fb097d290dc54e8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a38bb612dac0112d8ceeb02d0a9a02451"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL struct <a class="el" href="structbufferevent.html">bufferevent</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a38bb612dac0112d8ceeb02d0a9a02451">bufferevent_filter_new</a> (struct <a class="el" href="structbufferevent.html">bufferevent</a> *underlying, <a class="el" href="bufferevent_8h.html#add4274f8e311afc47fb097d290dc54e8">bufferevent_filter_cb</a> input_filter, <a class="el" href="bufferevent_8h.html#add4274f8e311afc47fb097d290dc54e8">bufferevent_filter_cb</a> output_filter, int options, void(*free_context)(void *), void *ctx)</td></tr>
<tr class="memdesc:a38bb612dac0112d8ceeb02d0a9a02451"><td class="mdescLeft"> </td><td class="mdescRight">Allocate a new filtering bufferevent on top of an existing bufferevent. <a href="bufferevent_8h.html#a38bb612dac0112d8ceeb02d0a9a02451">More...</a><br /></td></tr>
<tr class="separator:a38bb612dac0112d8ceeb02d0a9a02451"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a19e499f7bfa831b802fd3575d141b4e1"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="bufferevent_8h.html#a19e499f7bfa831b802fd3575d141b4e1">bufferevent_filter_result</a> { <a class="el" href="bufferevent_8h.html#a19e499f7bfa831b802fd3575d141b4e1a794bf8211eaafdbeb382991dc5874e4d">BEV_OK</a> = 0,
<a class="el" href="bufferevent_8h.html#a19e499f7bfa831b802fd3575d141b4e1a78c4f864aee50d333d74e3b46e12b8a4">BEV_NEED_MORE</a> = 1,
<a class="el" href="bufferevent_8h.html#a19e499f7bfa831b802fd3575d141b4e1a4e51550811d3dad92400c27d69277032">BEV_ERROR</a> = 2
}</td></tr>
<tr class="memdesc:a19e499f7bfa831b802fd3575d141b4e1"><td class="mdescLeft"> </td><td class="mdescRight">Values that filters can return. <a href="bufferevent_8h.html#a19e499f7bfa831b802fd3575d141b4e1">More...</a><br /></td></tr>
<tr class="separator:a19e499f7bfa831b802fd3575d141b4e1"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Functions for buffering data for network sending or receiving. </p>
<p>Bufferevents are higher level than evbuffers: each has an underlying evbuffer for reading and one for writing, and callbacks that are invoked under certain circumstances.</p>
<p>A bufferevent provides input and output buffers that get filled and drained automatically. The user of a bufferevent no longer deals directly with the I/O, but instead is reading from input and writing to output buffers.</p>
<p>Once initialized, the bufferevent structure can be used repeatedly with <a class="el" href="bufferevent_8h.html#aa8a5dd2436494afd374213b99102265b" title="Enable a bufferevent.">bufferevent_enable()</a> and <a class="el" href="bufferevent_8h.html#a4f3974def824e73a6861d94cff71e7c6" title="Disable a bufferevent.">bufferevent_disable()</a>.</p>
<p>When reading is enabled, the bufferevent will try to read from the file descriptor onto its input buffer, and call the read callback. When writing is enabled, the bufferevent will try to write data onto its file descriptor when the output buffer has enough data, and call the write callback when the output buffer is sufficiently drained.</p>
<p>Bufferevents come in several flavors, including:</p>
<dl>
<dt>Socket-based bufferevents </dt>
<dd><p class="startdd">A bufferevent that reads and writes data onto a network socket. Created with <a class="el" href="bufferevent_8h.html#a71181be5ab504e26f866dd3d91494854" title="Create a new socket bufferevent over an existing socket.">bufferevent_socket_new()</a>.</p>
<p class="enddd"></p>
</dd>
<dt>Paired bufferevents </dt>
<dd><p class="startdd">A pair of bufferevents that send and receive data to one another without touching the network. Created with <a class="el" href="bufferevent_8h.html#ac6271b7cc2126d3bc745cf00187672a5" title="Allocate a pair of linked bufferevents.">bufferevent_pair_new()</a>.</p>
<p class="enddd"></p>
</dd>
<dt>Filtering bufferevents </dt>
<dd><p class="startdd">A bufferevent that transforms data, and sends or receives it over another underlying bufferevent. Created with <a class="el" href="bufferevent_8h.html#a38bb612dac0112d8ceeb02d0a9a02451" title="Allocate a new filtering bufferevent on top of an existing bufferevent.">bufferevent_filter_new()</a>.</p>
<p class="enddd"></p>
</dd>
<dt>SSL-backed bufferevents </dt>
<dd>A bufferevent that uses the openssl library to send and receive data over an encrypted connection. Created with <a class="el" href="bufferevent__ssl_8h.html#a7a3090b586bfc7fc02e81a3a2c2deea5" title="Create a new SSL bufferevent to send its data over an SSL * on a socket.">bufferevent_openssl_socket_new()</a> or <a class="el" href="bufferevent__ssl_8h.html#ac6d45c0c7988f83b0feb2b67497e33c9" title="Create a new SSL bufferevent to send its data over another bufferevent.">bufferevent_openssl_filter_new()</a>. </dd>
</dl>
</div><h2 class="groupheader">Typedef Documentation</h2>
<a id="ad0b9fa4a6c8f03b2fe5a9929a7f2cd59"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad0b9fa4a6c8f03b2fe5a9929a7f2cd59">◆ </a></span>bufferevent_data_cb</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void(* bufferevent_data_cb) (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bev, void *ctx)</td>
</tr>
</table>
</div><div class="memdoc">
<p>A read or write callback for a bufferevent. </p>
<p>The read callback is triggered when new data arrives in the input buffer and the amount of readable data exceed the low watermark which is 0 by default.</p>
<p>The write callback is triggered if the write buffer has been exhausted or fell below its low watermark.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">bev</td><td>the bufferevent that triggered the callback </td></tr>
<tr><td class="paramname">ctx</td><td>the user-specified context for this bufferevent </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a3b0191b460511796e5281474cd704ec4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3b0191b460511796e5281474cd704ec4">◆ </a></span>bufferevent_event_cb</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void(* bufferevent_event_cb) (struct <a class="el" href="structbufferevent.html">bufferevent</a> *bev, short what, void *ctx)</td>
</tr>
</table>
</div><div class="memdoc">
<p>An event/error callback for a bufferevent. </p>
<p>The event callback is triggered if either an EOF condition or another unrecoverable error was encountered.</p>
<p>For bufferevents with deferred callbacks, this is a bitwise OR of all errors that have happened on the bufferevent since the last callback invocation.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">bev</td><td>the bufferevent for which the error condition was reached </td></tr>
<tr><td class="paramname">what</td><td>a conjunction of flags: BEV_EVENT_READING or BEV_EVENT_WRITING to indicate if the error was encountered on the read or write path, and one of the following flags: BEV_EVENT_EOF, BEV_EVENT_ERROR, BEV_EVENT_TIMEOUT, BEV_EVENT_CONNECTED.</td></tr>
<tr><td class="paramname">ctx</td><td>the user-specified context for this bufferevent </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="add4274f8e311afc47fb097d290dc54e8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#add4274f8e311afc47fb097d290dc54e8">◆ </a></span>bufferevent_filter_cb</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef enum <a class="el" href="bufferevent_8h.html#a19e499f7bfa831b802fd3575d141b4e1">bufferevent_filter_result</a>(* bufferevent_filter_cb) (struct <a class="el" href="structevbuffer.html">evbuffer</a> *src, struct <a class="el" href="structevbuffer.html">evbuffer</a> *dst, ev_ssize_t dst_limit, enum <a class="el" href="bufferevent_8h.html#ac35edc760057a2e48b4e8ba9ecf2ad25">bufferevent_flush_mode</a> mode, void *ctx)</td>
</tr>
</table>
</div><div class="memdoc">
<p>A callback function to implement a filter for a bufferevent. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">src</td><td>An evbuffer to drain data from. </td></tr>
<tr><td class="paramname">dst</td><td>An evbuffer to add data to. </td></tr>
<tr><td class="paramname">limit</td><td>A suggested upper bound of bytes to write to dst. The filter may ignore this value, but doing so means that it will overflow the high-water mark associated with dst. -1 means "no limit". </td></tr>
<tr><td class="paramname">mode</td><td>Whether we should write data as may be convenient (BEV_NORMAL), or flush as much data as we can (BEV_FLUSH), or flush as much as we can, possibly including an end-of-stream marker (BEV_FINISH). </td></tr>
<tr><td class="paramname">ctx</td><td>A user-supplied pointer.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>BEV_OK if we wrote some data; BEV_NEED_MORE if we can't produce any more output until we get some input; and BEV_ERROR on an error. </dd></dl>
</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="a19e499f7bfa831b802fd3575d141b4e1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a19e499f7bfa831b802fd3575d141b4e1">◆ </a></span>bufferevent_filter_result</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="bufferevent_8h.html#a19e499f7bfa831b802fd3575d141b4e1">bufferevent_filter_result</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Values that filters can return. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a19e499f7bfa831b802fd3575d141b4e1a794bf8211eaafdbeb382991dc5874e4d"></a>BEV_OK </td><td class="fielddoc"><p>everything is okay </p>
</td></tr>
<tr><td class="fieldname"><a id="a19e499f7bfa831b802fd3575d141b4e1a78c4f864aee50d333d74e3b46e12b8a4"></a>BEV_NEED_MORE </td><td class="fielddoc"><p>the filter needs to read more data before output </p>
</td></tr>
<tr><td class="fieldname"><a id="a19e499f7bfa831b802fd3575d141b4e1a4e51550811d3dad92400c27d69277032"></a>BEV_ERROR </td><td class="fielddoc"><p>the filter encountered a critical error, no further data can be processed. </p>
</td></tr>
</table>
</div>
</div>
<a id="ac35edc760057a2e48b4e8ba9ecf2ad25"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac35edc760057a2e48b4e8ba9ecf2ad25">◆ </a></span>bufferevent_flush_mode</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="bufferevent_8h.html#ac35edc760057a2e48b4e8ba9ecf2ad25">bufferevent_flush_mode</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Flags that can be passed into filters to let them know how to deal with the incoming data. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ac35edc760057a2e48b4e8ba9ecf2ad25a81903ce04ca68ac1680dd0b7a28a7fce"></a>BEV_NORMAL </td><td class="fielddoc"><p>usually set when processing data </p>
</td></tr>
<tr><td class="fieldname"><a id="ac35edc760057a2e48b4e8ba9ecf2ad25a77e7f15a95815dcaaef27fdabb0e6164"></a>BEV_FLUSH </td><td class="fielddoc"><p>want to checkpoint all data sent. </p>
</td></tr>
<tr><td class="fieldname"><a id="ac35edc760057a2e48b4e8ba9ecf2ad25acb248a91854bbebd773061df7f4bbc94"></a>BEV_FINISHED </td><td class="fielddoc"><p>encountered EOF on read or done sending data </p>
</td></tr>
</table>
</div>
</div>
<a id="aa4919449c62c6483e2d135509190dc65"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa4919449c62c6483e2d135509190dc65">◆ </a></span>bufferevent_options</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="bufferevent_8h.html#aa4919449c62c6483e2d135509190dc65">bufferevent_options</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Options that can be specified when creating a bufferevent. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="aa4919449c62c6483e2d135509190dc65a5dc89d74ef445da33295d00c8f6adc90"></a>BEV_OPT_CLOSE_ON_FREE </td><td class="fielddoc"><p>If set, we close the underlying file descriptor/bufferevent/whatever when this bufferevent is freed. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa4919449c62c6483e2d135509190dc65adfb637881b739eff1441ad848a5e3a2d"></a>BEV_OPT_THREADSAFE </td><td class="fielddoc"><p>If set, and threading is enabled, operations on this bufferevent are protected by a lock. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa4919449c62c6483e2d135509190dc65a2fbeb24d0156aa2492c23aaace73f1d3"></a>BEV_OPT_DEFER_CALLBACKS </td><td class="fielddoc"><p>If set, callbacks are run deferred in the event loop. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa4919449c62c6483e2d135509190dc65acb8ca6f6422fb8f9a748521cf8c4caf5"></a>BEV_OPT_UNLOCK_CALLBACKS </td><td class="fielddoc"><p>If set, callbacks are executed without locks being held on the bufferevent. </p>
<p>This option currently requires that BEV_OPT_DEFER_CALLBACKS also be set; a future version of Libevent might remove the requirement. </p>
</td></tr>
</table>
</div>
</div>
<a id="a7837b6947fc855924466e2347a6faa8f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7837b6947fc855924466e2347a6faa8f">◆ </a></span>bufferevent_trigger_options</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="bufferevent_8h.html#a7837b6947fc855924466e2347a6faa8f">bufferevent_trigger_options</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Flags for bufferevent_trigger(_event) that modify when and how to trigger the callback. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a7837b6947fc855924466e2347a6faa8fa02d5d43f86f75f0f1569ca2b16025bfc"></a>BEV_TRIG_IGNORE_WATERMARKS </td><td class="fielddoc"><p>trigger the callback regardless of the watermarks </p>
</td></tr>
<tr><td class="fieldname"><a id="a7837b6947fc855924466e2347a6faa8faef788894ba060effdd88553e59eb1330"></a>BEV_TRIG_DEFER_CALLBACKS </td><td class="fielddoc"><p>defer even if the callbacks are not </p>
</td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a44ea6c9406f855dadf4afadadbbf47d8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a44ea6c9406f855dadf4afadadbbf47d8">◆ </a></span>bufferevent_add_to_rate_limit_group()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL int bufferevent_add_to_rate_limit_group </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="structbufferevent.html">bufferevent</a> * </td>
<td class="paramname"><em>bev</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct bufferevent_rate_limit_group * </td>
<td class="paramname"><em>g</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Add 'bev' to the list of bufferevents whose aggregate reading and writing is restricted by 'g'. </p>
<p>If 'g' is NULL, remove 'bev' from its current group.</p>
<p>A bufferevent may belong to no more than one rate-limit group at a time. If 'bev' is already a member of a group, it will be removed from its old group before being added to 'g'.</p>
<p>Return 0 on success and -1 on failure. </p>
</div>
</div>
<a id="acb59fdb64642f73a96c84adeb97311cb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb59fdb64642f73a96c84adeb97311cb">◆ </a></span>bufferevent_base_set()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL int bufferevent_base_set </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">struct <a class="el" href="structbufferevent.html">bufferevent</a> * </td>
<td class="paramname"><em>bufev</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Assign a bufferevent to a specific <a class="el" href="structevent__base.html" title="Structure to hold information and state for a Libevent dispatch loop.">event_base</a>. </p>
<p>NOTE that only socket bufferevents support this function.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">base</td><td>an <a class="el" href="structevent__base.html" title="Structure to hold information and state for a Libevent dispatch loop.">event_base</a> returned by <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> </td></tr>
<tr><td class="paramname">bufev</td><td>a bufferevent struct returned by <a class="el" href="bufferevent__compat_8h.html#a621af7017b3a7fe2ab1de902297ceb94" title="Create a new bufferevent for an fd.">bufferevent_new()</a> or <a class="el" href="bufferevent_8h.html#a71181be5ab504e26f866dd3d91494854" title="Create a new socket bufferevent over an existing socket.">bufferevent_socket_new()</a> </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="bufferevent__compat_8h.html#a621af7017b3a7fe2ab1de902297ceb94" title="Create a new bufferevent for an fd.">bufferevent_new()</a> </dd></dl>
</div>
</div>
<a id="a3427551c0806f78f1bdfd8d767974e27"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3427551c0806f78f1bdfd8d767974e27">◆ </a></span>bufferevent_decref()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL int bufferevent_decref </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="structbufferevent.html">bufferevent</a> * </td>
<td class="paramname"><em>bufev</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Public interface to manually decrement the reference count of a bufferevent. </p>
<p>Warning: make sure you know what you're doing. This is mainly used in conjunction with <a class="el" href="bufferevent_8h.html#a27cabbe542fec7731049312e37e7ba95" title="Public interface to manually increase the reference count of a bufferevent this is useful in situatio...">bufferevent_incref()</a>. This will free up all data associated with a bufferevent if the reference count hits 0.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">bufev</td><td>the bufferevent to decrement the refcount on</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if the bufferevent was freed, otherwise 0 (still referenced) </dd></dl>
</div>
</div>
<a id="a4f3974def824e73a6861d94cff71e7c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4f3974def824e73a6861d94cff71e7c6">◆ </a></span>bufferevent_disable()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL int bufferevent_disable </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="structbufferevent.html">bufferevent</a> * </td>
<td class="paramname"><em>bufev</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">short </td>
<td class="paramname"><em>event</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Disable a bufferevent. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">bufev</td><td>the bufferevent to be disabled. bufev must not be NULL. </td></tr>
<tr><td class="paramname">event</td><td>any combination of EV_READ | EV_WRITE. </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="bufferevent_8h.html#aa8a5dd2436494afd374213b99102265b" title="Enable a bufferevent.">bufferevent_enable()</a> </dd></dl>
</div>
</div>
<a id="aa8a5dd2436494afd374213b99102265b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8a5dd2436494afd374213b99102265b">◆ </a></span>bufferevent_enable()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL int bufferevent_enable </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="structbufferevent.html">bufferevent</a> * </td>
<td class="paramname"><em>bufev</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">short </td>
<td class="paramname"><em>event</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Enable a bufferevent. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">bufev</td><td>the bufferevent to be enabled. bufev must not be NULL. </td></tr>
<tr><td class="paramname">event</td><td>any combination of EV_READ | EV_WRITE. </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="bufferevent_8h.html#a4f3974def824e73a6861d94cff71e7c6" title="Disable a bufferevent.">bufferevent_disable()</a> </dd></dl>
</div>
</div>
<a id="a38bb612dac0112d8ceeb02d0a9a02451"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a38bb612dac0112d8ceeb02d0a9a02451">◆ </a></span>bufferevent_filter_new()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL struct <a class="el" href="structbufferevent.html">bufferevent</a>* bufferevent_filter_new </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="structbufferevent.html">bufferevent</a> * </td>
<td class="paramname"><em>underlying</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="bufferevent_8h.html#add4274f8e311afc47fb097d290dc54e8">bufferevent_filter_cb</a> </td>
<td class="paramname"><em>input_filter</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="bufferevent_8h.html#add4274f8e311afc47fb097d290dc54e8">bufferevent_filter_cb</a> </td>
<td class="paramname"><em>output_filter</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>options</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void(*)(void *) </td>
<td class="paramname"><em>free_context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>ctx</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Allocate a new filtering bufferevent on top of an existing bufferevent. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">underlying</td><td>the underlying bufferevent. </td></tr>
<tr><td class="paramname">input_filter</td><td>The filter to apply to data we read from the underlying bufferevent </td></tr>
<tr><td class="paramname">output_filter</td><td>The filer to apply to data we write to the underlying bufferevent </td></tr>
<tr><td class="paramname">options</td><td>A bitfield of bufferevent options. </td></tr>
<tr><td class="paramname">free_context</td><td>A function to use to free the filter context when this bufferevent is freed. </td></tr>
<tr><td class="paramname">ctx</td><td>A context pointer to pass to the filter functions. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a4e7b46a3dd1518534a2120ee9c8dbe69"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e7b46a3dd1518534a2120ee9c8dbe69">◆ </a></span>bufferevent_flush()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL int bufferevent_flush </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="structbufferevent.html">bufferevent</a> * </td>
<td class="paramname"><em>bufev</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">short </td>
<td class="paramname"><em>iotype</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">enum <a class="el" href="bufferevent_8h.html#ac35edc760057a2e48b4e8ba9ecf2ad25">bufferevent_flush_mode</a> </td>
<td class="paramname"><em>mode</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Triggers the bufferevent to produce more data if possible. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">bufev</td><td>the bufferevent object </td></tr>
<tr><td class="paramname">iotype</td><td>either EV_READ or EV_WRITE or both. </td></tr>
<tr><td class="paramname">mode</td><td>either BEV_NORMAL or BEV_FLUSH or BEV_FINISHED </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>-1 on failure, 0 if no data was produces, 1 if data was produced </dd></dl>
</div>
</div>
<a id="a8baa699f526f237c0d33f618f073c1cc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8baa699f526f237c0d33f618f073c1cc">◆ </a></span>bufferevent_free()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL void bufferevent_free </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="structbufferevent.html">bufferevent</a> * </td>
<td class="paramname"><em>bufev</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Deallocate the storage associated with a bufferevent structure. </p>
<p>If there is pending data to write on the bufferevent, it probably won't be flushed before the bufferevent is freed.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">bufev</td><td>the bufferevent structure to be freed. bufev must not be NULL. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ab78b8248210f0fadac8b5924dde5a3e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab78b8248210f0fadac8b5924dde5a3e7">◆ </a></span>bufferevent_get_enabled()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL short bufferevent_get_enabled </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="structbufferevent.html">bufferevent</a> * </td>
<td class="paramname"><em>bufev</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the events that are enabled on a given bufferevent. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">bufev</td><td>the bufferevent to inspect </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A combination of EV_READ | EV_WRITE </dd></dl>
</div>
</div>
<a id="a3ddbf50178b96b3f243ddc83d67e88b0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3ddbf50178b96b3f243ddc83d67e88b0">◆ </a></span>bufferevent_get_input()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL struct <a class="el" href="structevbuffer.html">evbuffer</a>* bufferevent_get_input </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="structbufferevent.html">bufferevent</a> * </td>
<td class="paramname"><em>bufev</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the input buffer. </p>
<p>The user MUST NOT set the callback on this buffer.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">bufev</td><td>the bufferevent from which to get the evbuffer. bufev must not be NULL. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the evbuffer object for the input buffer </dd></dl>
</div>
</div>
<a id="ac6e45fa1fc577c4f0e6c4689e72c0a15"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac6e45fa1fc577c4f0e6c4689e72c0a15">◆ </a></span>bufferevent_get_output()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL struct <a class="el" href="structevbuffer.html">evbuffer</a>* bufferevent_get_output </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="structbufferevent.html">bufferevent</a> * </td>
<td class="paramname"><em>bufev</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the output buffer. </p>
<p>The user MUST NOT set the callback on this buffer.</p>
<p>When filters are being used, the filters need to be manually triggered if the output buffer was manipulated.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">bufev</td><td>the bufferevent from which to get the evbuffer. bufev must not be NULL. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the evbuffer object for the output buffer </dd></dl>
</div>
</div>
<a id="a0091b3c386580cf2980039ad9a629b70"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0091b3c386580cf2980039ad9a629b70">◆ </a></span>bufferevent_get_priority()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL int bufferevent_get_priority </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="structbufferevent.html">bufferevent</a> * </td>
<td class="paramname"><em>bufev</em></td><td>)</td>