This file is indexed.

/usr/share/doc/libprelude2/html/libprelude-prelude-connection-pool.html is in libprelude2 1.0.0-11ubuntu4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>prelude-connection-pool</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="Prelude library Reference Manual">
<link rel="up" href="pt03.html" title="Part III. Reading events from the collector">
<link rel="prev" href="libprelude-idmef-message-read.html" title="idmef-message-read">
<link rel="next" href="pt04.html" title="Part IV. Filtering operation on IDMEF messages">
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="pt01.html" title="Part I. Using libprelude to interoperate with prelude-manager">
<link rel="part" href="pt02.html" title="Part II. Sending events with libprelude">
<link rel="chapter" href="ch01.html" title="The low level IDMEF API">
<link rel="chapter" href="ch02.html" title="The high level IDMEF API">
<link rel="part" href="pt03.html" title="Part III. Reading events from the collector">
<link rel="part" href="pt04.html" title="Part IV. Filtering operation on IDMEF messages">
<link rel="chapter" href="ch03.html" title="Utility functions">
<link rel="chapter" href="ch04.html" title="Others">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="libprelude-idmef-message-read.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="pt03.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Prelude library Reference Manual</th>
<td><a accesskey="n" href="pt04.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libprelude-prelude-connection-pool.synopsis" class="shortcut">Top</a>
                 | 
                <a href="#libprelude-prelude-connection-pool.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry" title="prelude-connection-pool">
<a name="libprelude-prelude-connection-pool"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libprelude-prelude-connection-pool.top_of_page"></a>prelude-connection-pool</span></h2>
<p>prelude-connection-pool — Pool of connection handling</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="libprelude-prelude-connection-pool.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
enum                <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-flags-t" title="enum prelude_connection_pool_flags_t">prelude_connection_pool_flags_t</a>;
enum                <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-event-t" title="enum prelude_connection_pool_event_t">prelude_connection_pool_event_t</a>;
typedef             <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a>;
void                <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-broadcast" title="prelude_connection_pool_broadcast ()">prelude_connection_pool_broadcast</a>   (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
                                                         <a class="link" href="libprelude-prelude-msg.html#prelude-msg-t" title="prelude_msg_t">prelude_msg_t</a> *msg);
void                <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-broadcast-async" title="prelude_connection_pool_broadcast_async ()">prelude_connection_pool_broadcast_async</a>
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
                                                         <a class="link" href="libprelude-prelude-msg.html#prelude-msg-t" title="prelude_msg_t">prelude_msg_t</a> *msg);
int                 <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-init" title="prelude_connection_pool_init ()">prelude_connection_pool_init</a>        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);
int                 <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-new" title="prelude_connection_pool_new ()">prelude_connection_pool_new</a>         (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> **ret,
                                                         <a class="link" href="libprelude-prelude-client-profile.html#prelude-client-profile-t" title="prelude_client_profile_t">prelude_client_profile_t</a> *cp,
                                                         <a class="link" href="libprelude-prelude-connection.html#prelude-connection-permission-t" title="enum prelude_connection_permission_t">prelude_connection_permission_t</a> permission);
<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> * <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-ref" title="prelude_connection_pool_ref ()">prelude_connection_pool_ref</a> (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);
<a class="link" href="libprelude-prelude-list.html#prelude-list-t" title="prelude_list_t">prelude_list_t</a> *    <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-get-connection-list" title="prelude_connection_pool_get_connection_list ()">prelude_connection_pool_get_connection_list</a>
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);
int                 <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-add-connection" title="prelude_connection_pool_add_connection ()">prelude_connection_pool_add_connection</a>
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
                                                         <a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t">prelude_connection_t</a> *cnx);
int                 <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-del-connection" title="prelude_connection_pool_del_connection ()">prelude_connection_pool_del_connection</a>
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
                                                         <a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t">prelude_connection_t</a> *cnx);
int                 <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-connection-dead" title="prelude_connection_pool_set_connection_dead ()">prelude_connection_pool_set_connection_dead</a>
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
                                                         <a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t">prelude_connection_t</a> *cnx);
int                 <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-connection-alive" title="prelude_connection_pool_set_connection_alive ()">prelude_connection_pool_set_connection_alive</a>
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
                                                         <a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t">prelude_connection_t</a> *cnx);
int                 <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-connection-string" title="prelude_connection_pool_set_connection_string ()">prelude_connection_pool_set_connection_string</a>
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
                                                         const char *cfgstr);
const char *        <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-get-connection-string" title="prelude_connection_pool_get_connection_string ()">prelude_connection_pool_get_connection_string</a>
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);
void                <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-destroy" title="prelude_connection_pool_destroy ()">prelude_connection_pool_destroy</a>     (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);
<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-flags-t" title="enum prelude_connection_pool_flags_t">prelude_connection_pool_flags_t</a>  <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-get-flags" title="prelude_connection_pool_get_flags ()">prelude_connection_pool_get_flags</a>
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);
void                <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-flags" title="prelude_connection_pool_set_flags ()">prelude_connection_pool_set_flags</a>   (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
                                                         <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-flags-t" title="enum prelude_connection_pool_flags_t">prelude_connection_pool_flags_t</a> flags);
void                <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-required-permission" title="prelude_connection_pool_set_required_permission ()">prelude_connection_pool_set_required_permission</a>
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
                                                         <a class="link" href="libprelude-prelude-connection.html#prelude-connection-permission-t" title="enum prelude_connection_permission_t">prelude_connection_permission_t</a> req_perm);
void                <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-data" title="prelude_connection_pool_set_data ()">prelude_connection_pool_set_data</a>    (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
                                                         void *data);
void *              <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-get-data" title="prelude_connection_pool_get_data ()">prelude_connection_pool_get_data</a>    (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);
int                 <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-recv" title="prelude_connection_pool_recv ()">prelude_connection_pool_recv</a>        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
                                                         int timeout,
                                                         <a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t">prelude_connection_t</a> **outcon,
                                                         <a class="link" href="libprelude-prelude-msg.html#prelude-msg-t" title="prelude_msg_t">prelude_msg_t</a> **outmsg);
int                 <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-check-event" title="prelude_connection_pool_check_event ()">prelude_connection_pool_check_event</a> (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
                                                         int timeout,
                                                         int (event_cbprelude_connection_pool_t *pool,prelude_connection_pool_event_t event,prelude_connection_t *cnx, void *extra) (),
                                                         void *extra);
void                <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-global-event-handler" title="prelude_connection_pool_set_global_event_handler ()">prelude_connection_pool_set_global_event_handler</a>
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
                                                         <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-event-t" title="enum prelude_connection_pool_event_t">prelude_connection_pool_event_t</a> wanted_events,
                                                         int (callbackprelude_connection_pool_t *pool,prelude_connection_pool_event_t events) ());
void                <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-event-handler" title="prelude_connection_pool_set_event_handler ()">prelude_connection_pool_set_event_handler</a>
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
                                                         <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-event-t" title="enum prelude_connection_pool_event_t">prelude_connection_pool_event_t</a> wanted_events,
                                                         int (callbackprelude_connection_pool_t *pool,prelude_connection_pool_event_t events,prelude_connection_t *cnx) ());
</pre>
</div>
<div class="refsect1" title="Description">
<a name="libprelude-prelude-connection-pool.description"></a><h2>Description</h2>
<p>
This API handle pool of connection, allowing to address a set of connection using only one object.
</p>
<p>
AND &amp; OR of connection are supported, so that it is possible to
address several connection at once, or to only address a set of connection
if another connection went down.
</p>
<p>
Additionally it provide failover in case one of the connection in
the pool goes down, and automatic reconnection and flushing of the
information that could not be sent due to the connection status.
</p>
<p>
It is usually not necessary to access this API directly, however if
you are looking at how to read events from a pool of connection, you're most
probably looking for the <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-check-event" title="prelude_connection_pool_check_event ()"><code class="function">prelude_connection_pool_check_event()</code></a> function.
</p>
<p>
If this is the case, use <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-check-event" title="prelude_connection_pool_check_event ()"><code class="function">prelude_connection_pool_check_event()</code></a> for polling the
pool or <code class="function">prelude_connection_set_event_handler()</code> / <code class="function">prelude_connection_set_global_event_handler()</code>
if you want asynchronous notification of event.
</p>
<p>
Note that <code class="function">prelude_connection_set_event_handler()</code> and <code class="function">prelude_connection_set_global_event_handler()</code>
are only asynchronous if timer are running in asynchronous mode. Otherwise, the callback for theses
function might be called when you call the <a class="link" href="libprelude-prelude-timer.html#prelude-timer-wake-up" title="prelude_timer_wake_up ()"><code class="function">prelude_timer_wake_up()</code></a> function.
</p>
<p>
In the provided callback, you might use <a class="link" href="libprelude-prelude-connection.html#prelude-connection-recv" title="prelude_connection_recv ()"><code class="function">prelude_connection_recv()</code></a> to retrieve an event of type
<span class="type">PRELUDE_CONNECTION_POOL_EVENT_INPUT</span>. And, you could, for example, if the retrieved message has
the <span class="type">PRELUDE_MSG_ID_IDMEF</span> tag, provide the returned <a class="link" href="libprelude-prelude-msg.html#prelude-msg-t" title="prelude_msg_t"><span class="type">prelude_msg_t</span></a> object to <a class="link" href="libprelude-idmef-message-read.html#idmef-message-read" title="idmef_message_read ()"><code class="function">idmef_message_read()</code></a>
in order to convert the received message to a <a class="link" href="libprelude-idmef-tree-wrap.html#idmef-message-t" title="idmef_message_t"><span class="type">idmef_message_t</span></a> object.
</p>
</div>
<div class="refsect1" title="Details">
<a name="libprelude-prelude-connection-pool.details"></a><h2>Details</h2>
<div class="refsect2" title="enum prelude_connection_pool_flags_t">
<a name="prelude-connection-pool-flags-t"></a><h3>enum prelude_connection_pool_flags_t</h3>
<pre class="programlisting">typedef enum {
        PRELUDE_CONNECTION_POOL_FLAGS_RECONNECT        = 0x01,
        PRELUDE_CONNECTION_POOL_FLAGS_FAILOVER         = 0x02
} prelude_connection_pool_flags_t;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="enum prelude_connection_pool_event_t">
<a name="prelude-connection-pool-event-t"></a><h3>enum prelude_connection_pool_event_t</h3>
<pre class="programlisting">typedef enum {
        PRELUDE_CONNECTION_POOL_EVENT_INPUT            = 0x01,
        PRELUDE_CONNECTION_POOL_EVENT_DEAD             = 0x02,
        PRELUDE_CONNECTION_POOL_EVENT_ALIVE            = 0x04
} prelude_connection_pool_event_t;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="prelude_connection_pool_t">
<a name="prelude-connection-pool-t"></a><h3>prelude_connection_pool_t</h3>
<pre class="programlisting">typedef struct prelude_connection_pool prelude_connection_pool_t;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="prelude_connection_pool_broadcast ()">
<a name="prelude-connection-pool-broadcast"></a><h3>prelude_connection_pool_broadcast ()</h3>
<pre class="programlisting">void                prelude_connection_pool_broadcast   (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
                                                         <a class="link" href="libprelude-prelude-msg.html#prelude-msg-t" title="prelude_msg_t">prelude_msg_t</a> *msg);</pre>
<p>
Sends the message contained in <em class="parameter"><code>msg</code></em> to all the connection in <em class="parameter"><code>pool</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td>
<td> Pointer on a <a class="link" href="libprelude-prelude-msg.html#prelude-msg-t" title="prelude_msg_t"><span class="type">prelude_msg_t</span></a> object.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="prelude_connection_pool_broadcast_async ()">
<a name="prelude-connection-pool-broadcast-async"></a><h3>prelude_connection_pool_broadcast_async ()</h3>
<pre class="programlisting">void                prelude_connection_pool_broadcast_async
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
                                                         <a class="link" href="libprelude-prelude-msg.html#prelude-msg-t" title="prelude_msg_t">prelude_msg_t</a> *msg);</pre>
<p>
Sends the message contained in <em class="parameter"><code>msg</code></em> to all connections
in <em class="parameter"><code>pool</code></em> asynchronously. After the request is processed,
the <em class="parameter"><code>msg</code></em> message will be freed.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td>
<td> Pointer on a <a class="link" href="libprelude-prelude-msg.html#prelude-msg-t" title="prelude_msg_t"><span class="type">prelude_msg_t</span></a> object.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="prelude_connection_pool_init ()">
<a name="prelude-connection-pool-init"></a><h3>prelude_connection_pool_init ()</h3>
<pre class="programlisting">int                 prelude_connection_pool_init        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);</pre>
<p>
Initializes <em class="parameter"><code>pool</code></em>. This means that connection associated with <em class="parameter"><code>pool</code></em>
using <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-connection-string" title="prelude_connection_pool_set_connection_string ()"><code class="function">prelude_connection_pool_set_connection_string()</code></a> will be
established.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> 0 on success, a negative value on error.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="prelude_connection_pool_new ()">
<a name="prelude-connection-pool-new"></a><h3>prelude_connection_pool_new ()</h3>
<pre class="programlisting">int                 prelude_connection_pool_new         (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> **ret,
                                                         <a class="link" href="libprelude-prelude-client-profile.html#prelude-client-profile-t" title="prelude_client_profile_t">prelude_client_profile_t</a> *cp,
                                                         <a class="link" href="libprelude-prelude-connection.html#prelude-connection-permission-t" title="enum prelude_connection_permission_t">prelude_connection_permission_t</a> permission);</pre>
<p>
<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-new" title="prelude_connection_pool_new ()"><code class="function">prelude_connection_pool_new()</code></a> initializes a new Connection Manager object.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>ret</code></em> :</span></p></td>
<td> Pointer to an address where to store the created <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cp</code></em> :</span></p></td>
<td> The <a class="link" href="libprelude-prelude-client-profile.html#prelude-client-profile-t" title="prelude_client_profile_t"><span class="type">prelude_client_profile_t</span></a> to use for connection.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>permission</code></em> :</span></p></td>
<td> Permission the connection in this connection-pool will require.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> 0 on success or a negative value if an error occured.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="prelude_connection_pool_ref ()">
<a name="prelude-connection-pool-ref"></a><h3>prelude_connection_pool_ref ()</h3>
<pre class="programlisting"><a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> * prelude_connection_pool_ref (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);</pre>
<p>
Increases <em class="parameter"><code>pool</code></em> reference count.
</p>
<p>
<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-destroy" title="prelude_connection_pool_destroy ()"><code class="function">prelude_connection_pool_destroy()</code></a> will decrease the refcount until
it reaches 0, at which point the <em class="parameter"><code>pool</code></em> will be destroyed.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> The provided <em class="parameter"><code>pool</code></em> is returned.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="prelude_connection_pool_get_connection_list ()">
<a name="prelude-connection-pool-get-connection-list"></a><h3>prelude_connection_pool_get_connection_list ()</h3>
<pre class="programlisting"><a class="link" href="libprelude-prelude-list.html#prelude-list-t" title="prelude_list_t">prelude_list_t</a> *    prelude_connection_pool_get_connection_list
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);</pre>
<p>
</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> The list of connections handled by <em class="parameter"><code>pool</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="prelude_connection_pool_add_connection ()">
<a name="prelude-connection-pool-add-connection"></a><h3>prelude_connection_pool_add_connection ()</h3>
<pre class="programlisting">int                 prelude_connection_pool_add_connection
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
                                                         <a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t">prelude_connection_t</a> *cnx);</pre>
<p>
Adds <em class="parameter"><code>cnx</code></em> to <em class="parameter"><code>pool</code></em> set of connections.
</p>
<p>
If <em class="parameter"><code>pool</code></em> is already initialized (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-init" title="prelude_connection_pool_init ()"><code class="function">prelude_connection_pool_init()</code></a> called)
and <em class="parameter"><code>cnx</code></em> is not alive, it will attempt a reconnection.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cnx</code></em> :</span></p></td>
<td> Pointer to a <a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t"><span class="type">prelude_connection_t</span></a> object to add to <em class="parameter"><code>pool</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> 0 on success, a negative value if an error occured.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="prelude_connection_pool_del_connection ()">
<a name="prelude-connection-pool-del-connection"></a><h3>prelude_connection_pool_del_connection ()</h3>
<pre class="programlisting">int                 prelude_connection_pool_del_connection
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
                                                         <a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t">prelude_connection_t</a> *cnx);</pre>
<p>
Remove <em class="parameter"><code>cnx</code></em> from <em class="parameter"><code>pool</code></em> of connections.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cnx</code></em> :</span></p></td>
<td> Pointer to a <a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t"><span class="type">prelude_connection_t</span></a> object to remove from <em class="parameter"><code>pool</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> 0 on success, a negative value if an error occured.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="prelude_connection_pool_set_connection_dead ()">
<a name="prelude-connection-pool-set-connection-dead"></a><h3>prelude_connection_pool_set_connection_dead ()</h3>
<pre class="programlisting">int                 prelude_connection_pool_set_connection_dead
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
                                                         <a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t">prelude_connection_t</a> *cnx);</pre>
<p>
Notifies <em class="parameter"><code>pool</code></em> that the connection identified by <em class="parameter"><code>cnx</code></em> is dead.
</p>
<p>
Usually, this function should not be used since <em class="parameter"><code>pool</code></em> is
self sufficient, and handles connections issues internally. However,
it is sometime useful when the user has several mechanisms using the
connection, and that its own mechanism detects a connection problem
before <em class="parameter"><code>pool</code></em> notice.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cnx</code></em> :</span></p></td>
<td> Pointer to a <a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t"><span class="type">prelude_connection_t</span></a> object used within <em class="parameter"><code>pool</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> 0 on success, a negative value if an error occured.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="prelude_connection_pool_set_connection_alive ()">
<a name="prelude-connection-pool-set-connection-alive"></a><h3>prelude_connection_pool_set_connection_alive ()</h3>
<pre class="programlisting">int                 prelude_connection_pool_set_connection_alive
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
                                                         <a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t">prelude_connection_t</a> *cnx);</pre>
<p>
Notifies <em class="parameter"><code>pool</code></em> that the connection identified by <em class="parameter"><code>cnx</code></em> went back alive.
</p>
<p>
Usually, this function should not be used since <em class="parameter"><code>pool</code></em> is
self sufficient, and handles connection issues internally. However,
it is sometime useful when the user has several mechanisms using the
connection, and that its own mechanism detects a connection problem
before <em class="parameter"><code>pool</code></em> notice.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cnx</code></em> :</span></p></td>
<td> Pointer to a <a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t"><span class="type">prelude_connection_t</span></a> object used within <em class="parameter"><code>pool</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> 0 on success, a negative value if an error occured.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="prelude_connection_pool_set_connection_string ()">
<a name="prelude-connection-pool-set-connection-string"></a><h3>prelude_connection_pool_set_connection_string ()</h3>
<pre class="programlisting">int                 prelude_connection_pool_set_connection_string
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
                                                         const char *cfgstr);</pre>
<p>
Sets the connection string for <em class="parameter"><code>pool</code></em>. The connection string should be
in the form of : "address". Special operand like || (OR) and &amp;&amp; (AND),
are also accepted: "address &amp;&amp; address".
</p>
<p>
Where &amp;&amp; means that alert sent using <em class="parameter"><code>pool</code></em> will go to both configured
addresses, and || means that if the left address fails, the right address
will be used.
</p>
<p>
<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-init" title="prelude_connection_pool_init ()"><code class="function">prelude_connection_pool_init()</code></a> should be used to initiates the connection.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cfgstr</code></em> :</span></p></td>
<td> Connection string.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> 0 on success, a negative value if an error occured.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="prelude_connection_pool_get_connection_string ()">
<a name="prelude-connection-pool-get-connection-string"></a><h3>prelude_connection_pool_get_connection_string ()</h3>
<pre class="programlisting">const char *        prelude_connection_pool_get_connection_string
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);</pre>
<p>
Used to query the connection string used by <em class="parameter"><code>pool</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> The connection string.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="prelude_connection_pool_destroy ()">
<a name="prelude-connection-pool-destroy"></a><h3>prelude_connection_pool_destroy ()</h3>
<pre class="programlisting">void                prelude_connection_pool_destroy     (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);</pre>
<p>
Destroys <em class="parameter"><code>pool</code></em> and all connections handled.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="prelude_connection_pool_get_flags ()">
<a name="prelude-connection-pool-get-flags"></a><h3>prelude_connection_pool_get_flags ()</h3>
<pre class="programlisting"><a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-flags-t" title="enum prelude_connection_pool_flags_t">prelude_connection_pool_flags_t</a>  prelude_connection_pool_get_flags
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);</pre>
<p>
</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-flags-t" title="enum prelude_connection_pool_flags_t"><span class="type">prelude_connection_pool_flags_t</span></a> used in <em class="parameter"><code>pool</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="prelude_connection_pool_set_flags ()">
<a name="prelude-connection-pool-set-flags"></a><h3>prelude_connection_pool_set_flags ()</h3>
<pre class="programlisting">void                prelude_connection_pool_set_flags   (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
                                                         <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-flags-t" title="enum prelude_connection_pool_flags_t">prelude_connection_pool_flags_t</a> flags);</pre>
<p>
Sets <em class="parameter"><code>flags</code></em> within <em class="parameter"><code>pools</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td> Flags to use for <em class="parameter"><code>pool</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="prelude_connection_pool_set_required_permission ()">
<a name="prelude-connection-pool-set-required-permission"></a><h3>prelude_connection_pool_set_required_permission ()</h3>
<pre class="programlisting">void                prelude_connection_pool_set_required_permission
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
                                                         <a class="link" href="libprelude-prelude-connection.html#prelude-connection-permission-t" title="enum prelude_connection_permission_t">prelude_connection_permission_t</a> req_perm);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>req_perm</code></em> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="prelude_connection_pool_set_data ()">
<a name="prelude-connection-pool-set-data"></a><h3>prelude_connection_pool_set_data ()</h3>
<pre class="programlisting">void                prelude_connection_pool_set_data    (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
                                                         void *data);</pre>
<p>
The user might use this function to associate data with <em class="parameter"><code>pool</code></em>.
The data associated might be retrieved using <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-get-data" title="prelude_connection_pool_get_data ()"><code class="function">prelude_connection_pool_get_data()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td> Pointer to user specific data.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="prelude_connection_pool_get_data ()">
<a name="prelude-connection-pool-get-data"></a><h3>prelude_connection_pool_get_data ()</h3>
<pre class="programlisting">void *              prelude_connection_pool_get_data    (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);</pre>
<p>
The user might use this function to query data associated with
<em class="parameter"><code>pool</code></em> using <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-data" title="prelude_connection_pool_set_data ()"><code class="function">prelude_connection_pool_set_data()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the user data associated to <em class="parameter"><code>pool</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="prelude_connection_pool_recv ()">
<a name="prelude-connection-pool-recv"></a><h3>prelude_connection_pool_recv ()</h3>
<pre class="programlisting">int                 prelude_connection_pool_recv        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
                                                         int timeout,
                                                         <a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t">prelude_connection_t</a> **outcon,
                                                         <a class="link" href="libprelude-prelude-msg.html#prelude-msg-t" title="prelude_msg_t">prelude_msg_t</a> **outmsg);</pre>
<p>
This function queries the set of connections available in <em class="parameter"><code>pool</code></em> to see if
events are waiting to be handled. If timeout is zero, then this function
will return immediatly in case there is no event to be handled.
</p>
<p>
If timeout is -1, this function won't return until an event is available.
Otherwise this function will return if there is no event after the specified
number of second.
</p>
<p>
If an event is available, it will be read and store the <a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t"><span class="type">prelude_connection_t</span></a>
object in the <em class="parameter"><code>outcon</code></em> pointer. If <em class="parameter"><code>outmsg</code></em> was specified, the message will be
read and stored in there.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>timeout</code></em> :</span></p></td>
<td> Time to wait for an event.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>outcon</code></em> :</span></p></td>
<td> Pointer where the connection where an event happened should be stored.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>outmsg</code></em> :</span></p></td>
<td> Pointer where the next message that will be read should be stored.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> The number of handled events (0 or 1) or a negative value if an error occured.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="prelude_connection_pool_check_event ()">
<a name="prelude-connection-pool-check-event"></a><h3>prelude_connection_pool_check_event ()</h3>
<pre class="programlisting">int                 prelude_connection_pool_check_event (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
                                                         int timeout,
                                                         int (event_cbprelude_connection_pool_t *pool,prelude_connection_pool_event_t event,prelude_connection_t *cnx, void *extra) (),
                                                         void *extra);</pre>
<p>
This function queries the set of connections available in <em class="parameter"><code>pool</code></em> to see if
events are waiting to be handled. If timeout is zero, then this function
will return immediatly in case there is no event to be handled.
</p>
<p>
If timeout is -1, this function won't return until an event is available.
Otherwise this function will return if there is no event after the specified
number of second.
</p>
<p>
For each event, <em class="parameter"><code>event_cb</code></em> is called with the concerned <em class="parameter"><code>pool</code></em>, the provided
<em class="parameter"><code>extra</code></em> data, and the <em class="parameter"><code>cnx</code></em> where an event has occured.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>timeout</code></em> :</span></p></td>
<td> Time to wait for an event.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>event_cb</code></em> :</span></p></td>
<td> User provided callback function to call on received events.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>extra</code></em> :</span></p></td>
<td> Pointer to user specific data provided to <em class="parameter"><code>event_cb</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> The number of handled events, or a negative value if an error occured.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="prelude_connection_pool_set_global_event_handler ()">
<a name="prelude-connection-pool-set-global-event-handler"></a><h3>prelude_connection_pool_set_global_event_handler ()</h3>
<pre class="programlisting">void                prelude_connection_pool_set_global_event_handler
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
                                                         <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-event-t" title="enum prelude_connection_pool_event_t">prelude_connection_pool_event_t</a> wanted_events,
                                                         int (callbackprelude_connection_pool_t *pool,prelude_connection_pool_event_t events) ());</pre>
<p>
<em class="parameter"><code>callback</code></em> will be called each time one of the event specified in
<em class="parameter"><code>wanted_events</code></em> happen to <em class="parameter"><code>pool</code></em>. However, contrary to
<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-event-handler" title="prelude_connection_pool_set_event_handler ()"><code class="function">prelude_connection_pool_set_event_handler()</code></a>, the callback will be called
only once per set of event.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>wanted_events</code></em> :</span></p></td>
<td> Event the user want to be notified about.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td> User specific callback to call when an event is available.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="prelude_connection_pool_set_event_handler ()">
<a name="prelude-connection-pool-set-event-handler"></a><h3>prelude_connection_pool_set_event_handler ()</h3>
<pre class="programlisting">void                prelude_connection_pool_set_event_handler
                                                        (<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
                                                         <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-event-t" title="enum prelude_connection_pool_event_t">prelude_connection_pool_event_t</a> wanted_events,
                                                         int (callbackprelude_connection_pool_t *pool,prelude_connection_pool_event_t events,prelude_connection_t *cnx) ());</pre>
<p>
<em class="parameter"><code>callback</code></em> will be called each time one of the event specified in
<em class="parameter"><code>wanted_events</code></em> happens to <em class="parameter"><code>pool</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td> Pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>wanted_events</code></em> :</span></p></td>
<td> Event the user want to be notified about.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td> User specific callback to call when an event is available.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" title="See Also">
<a name="libprelude-prelude-connection-pool.see-also"></a><h2>See Also</h2>
<p>
<a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t"><span class="type">prelude_connection_t</span></a>
<a class="link" href="libprelude-idmef-message-read.html#idmef-message-read" title="idmef_message_read ()"><code class="function">idmef_message_read()</code></a>
</p>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.11</div>
</body>
</html>