28
28
<th width="100%" align="center">Prelude library Reference Manual</th>
29
29
<td><a accesskey="n" href="pt04.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
31
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id380504" class="shortcut">Top</a>
33
<a href="#id334398" class="shortcut">Description</a></nobr></td></tr>
31
<tr><td colspan="5" class="shortcuts"><nobr><a href="#libprelude-prelude-connection-pool.synopsis" class="shortcut">Top</a>
33
<a href="#libprelude-prelude-connection-pool.description" class="shortcut">Description</a></nobr></td></tr>
35
35
<div class="refentry" lang="en">
36
36
<a name="libprelude-prelude-connection-pool"></a><div class="titlepage"></div>
37
37
<div class="refnamediv"><table width="100%"><tr>
40
<a name="id380504"></a><span class="refentrytitle">prelude-connection-pool</span>
42
<p>prelude-connection-pool —
39
<h2><span class="refentrytitle"><a name="libprelude-prelude-connection-pool.top_of_page"></a>prelude-connection-pool</span></h2>
40
<p>prelude-connection-pool —
43
41
Pool of connection handling</p>
45
43
<td valign="top" align="right"></td>
46
44
</tr></table></div>
47
45
<div class="refsynopsisdiv">
46
<a name="libprelude-prelude-connection-pool.synopsis"></a><h2>Synopsis</h2>
49
47
<pre class="synopsis">
53
enum <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-flags-t">prelude_connection_pool_flags_t</a>;
54
enum <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-event-t">prelude_connection_pool_event_t</a>;
55
typedef <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a>;
56
void <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-broadcast">prelude_connection_pool_broadcast</a> (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
57
<a href="libprelude-prelude-msg.html#prelude-msg-t">prelude_msg_t</a> *msg);
58
void <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-broadcast-async">prelude_connection_pool_broadcast_async</a>
59
(<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
60
<a href="libprelude-prelude-msg.html#prelude-msg-t">prelude_msg_t</a> *msg);
61
int <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-init">prelude_connection_pool_init</a> (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool);
62
int <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-new">prelude_connection_pool_new</a> (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> **ret,
63
<a href="libprelude-prelude-client-profile.html#prelude-client-profile-t">prelude_client_profile_t</a> *cp,
64
<a href="libprelude-prelude-connection.html#prelude-connection-permission-t">prelude_connection_permission_t</a> permission);
65
<a href="libprelude-prelude-list.html#prelude-list-t">prelude_list_t</a>* <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-get-connection-list">prelude_connection_pool_get_connection_list</a>
66
(<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool);
67
int <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-add-connection">prelude_connection_pool_add_connection</a>
68
(<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
69
<a href="libprelude-prelude-connection.html#prelude-connection-t">prelude_connection_t</a> *cnx);
70
int <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-connection-dead">prelude_connection_pool_set_connection_dead</a>
71
(<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
72
<a href="libprelude-prelude-connection.html#prelude-connection-t">prelude_connection_t</a> *cnx);
73
int <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-connection-alive">prelude_connection_pool_set_connection_alive</a>
74
(<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
75
<a href="libprelude-prelude-connection.html#prelude-connection-t">prelude_connection_t</a> *cnx);
76
int <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-connection-string">prelude_connection_pool_set_connection_string</a>
77
(<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
48
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>;
49
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>;
50
typedef <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a>;
51
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,
52
<a class="link" href="libprelude-prelude-msg.html#prelude-msg-t" title="prelude_msg_t">prelude_msg_t</a> *msg);
53
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>
54
(<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
55
<a class="link" href="libprelude-prelude-msg.html#prelude-msg-t" title="prelude_msg_t">prelude_msg_t</a> *msg);
56
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);
57
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,
58
<a class="link" href="libprelude-prelude-client-profile.html#prelude-client-profile-t" title="prelude_client_profile_t">prelude_client_profile_t</a> *cp,
59
<a class="link" href="libprelude-prelude-connection.html#prelude-connection-permission-t" title="enum prelude_connection_permission_t">prelude_connection_permission_t</a> permission);
60
<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);
61
<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>
62
(<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);
63
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>
64
(<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
65
<a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t">prelude_connection_t</a> *cnx);
66
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>
67
(<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
68
<a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t">prelude_connection_t</a> *cnx);
69
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>
70
(<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
71
<a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t">prelude_connection_t</a> *cnx);
72
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>
73
(<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
78
74
const char *cfgstr);
79
const char* <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-get-connection-string">prelude_connection_pool_get_connection_string</a>
80
(<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool);
81
void <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-destroy">prelude_connection_pool_destroy</a> (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool);
82
<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-flags-t">prelude_connection_pool_flags_t</a> <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-get-flags">prelude_connection_pool_get_flags</a>
83
(<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool);
84
void <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-flags">prelude_connection_pool_set_flags</a> (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
85
<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-flags-t">prelude_connection_pool_flags_t</a> flags);
86
void <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-required-permission">prelude_connection_pool_set_required_permission</a>
87
(<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
88
<a href="libprelude-prelude-connection.html#prelude-connection-permission-t">prelude_connection_permission_t</a> req_perm);
89
void <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-data">prelude_connection_pool_set_data</a> (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
75
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>
76
(<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);
77
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);
78
<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>
79
(<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool);
80
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,
81
<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);
82
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>
83
(<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
84
<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);
85
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,
91
void* <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-get-data">prelude_connection_pool_get_data</a> (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool);
92
int <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-recv">prelude_connection_pool_recv</a> (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
94
<a href="libprelude-prelude-connection.html#prelude-connection-t">prelude_connection_t</a> **outconn,
95
<a href="libprelude-prelude-msg.html#prelude-msg-t">prelude_msg_t</a> **outmsg);
96
int <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-check-event">prelude_connection_pool_check_event</a> (<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
98
int (*event_cb) (prelude_connection_pool_t *pool,prelude_connection_pool_event_t event,prelude_connection_t *cnx, void *extra),
87
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);
88
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,
90
<a class="link" href="libprelude-prelude-connection.html#prelude-connection-t" title="prelude_connection_t">prelude_connection_t</a> **outcon,
91
<a class="link" href="libprelude-prelude-msg.html#prelude-msg-t" title="prelude_msg_t">prelude_msg_t</a> **outmsg);
92
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,
94
int (event_cbprelude_connection_pool_t *pool,prelude_connection_pool_event_t event,prelude_connection_t *cnx, void *extra) (),
100
void <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-global-event-handler">prelude_connection_pool_set_global_event_handler</a>
101
(<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
102
<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-event-t">prelude_connection_pool_event_t</a> wanted_events,
103
int (*callback) (prelude_connection_pool_t *pool,prelude_connection_pool_event_t events));
104
void <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-set-event-handler">prelude_connection_pool_set_event_handler</a>
105
(<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool,
106
<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-event-t">prelude_connection_pool_event_t</a> wanted_events,
107
int (*callback) (prelude_connection_pool_t *pool,prelude_connection_pool_event_t events,prelude_connection_t *cnx));
96
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>
97
(<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
98
<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,
99
int (callbackprelude_connection_pool_t *pool,prelude_connection_pool_event_t events) ());
100
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>
101
(<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t">prelude_connection_pool_t</a> *pool,
102
<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,
103
int (callbackprelude_connection_pool_t *pool,prelude_connection_pool_event_t events,prelude_connection_t *cnx) ());
110
106
<div class="refsect1" lang="en">
111
<a name="id334398"></a><h2>Description</h2>
107
<a name="libprelude-prelude-connection-pool.description"></a><h2>Description</h2>
113
109
This API handle pool of connection, allowing to address a set of connection using only one object.
126
122
It is usually not necessary to access this API directly, however if
127
123
you are looking at how to read events from a pool of connection, you're most
128
probably looking for the <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-check-event"><code class="function">prelude_connection_pool_check_event()</code></a> function.
124
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.
131
If this is the case, use <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-check-event"><code class="function">prelude_connection_pool_check_event()</code></a> for polling the
127
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
132
128
pool or <code class="function">prelude_connection_set_event_handler()</code> / <code class="function">prelude_connection_set_global_event_handler()</code>
133
129
if you want asynchronous notification of event.
136
132
Note that <code class="function">prelude_connection_set_event_handler()</code> and <code class="function">prelude_connection_set_global_event_handler()</code>
137
133
are only asynchronous if timer are running in asynchronous mode. Otherwise, the callback for theses
138
function might be called when you call the <a href="libprelude-prelude-timer.html#prelude-timer-wake-up"><code class="function">prelude_timer_wake_up()</code></a> function.
134
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.
141
In the provided callback, you might use <a href="libprelude-prelude-connection.html#prelude-connection-recv"><code class="function">prelude_connection_recv()</code></a> to retrieve an event of type
137
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
142
138
<span class="type">PRELUDE_CONNECTION_POOL_EVENT_INPUT</span>. And, you could, for example, if the retrieved message has
143
the <span class="type">PRELUDE_MSG_ID_IDMEF</span> tag, provide the returned <a href="libprelude-prelude-msg.html#prelude-msg-t"><span class="type">prelude_msg_t</span></a> object to <a href="libprelude-idmef-message-read.html#idmef-message-read"><code class="function">idmef_message_read()</code></a>
144
in order to convert the received message to a <a href="libprelude-idmef-tree-wrap.html#idmef-message-t"><span class="type">idmef_message_t</span></a> object.
139
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>
140
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.
147
143
<div class="refsect1" lang="en">
148
<a name="id347773"></a><h2>Details</h2>
144
<a name="libprelude-prelude-connection-pool.details"></a><h2>Details</h2>
149
145
<div class="refsect2" lang="en">
150
<a name="id347784"></a><h3>
151
<a name="prelude-connection-pool-flags-t"></a>enum prelude_connection_pool_flags_t</h3>
152
<a class="indexterm" name="id347796"></a><pre class="programlisting">typedef enum {
146
<a name="prelude-connection-pool-flags-t"></a><h3>enum prelude_connection_pool_flags_t</h3>
147
<pre class="programlisting">typedef enum {
153
148
PRELUDE_CONNECTION_POOL_FLAGS_RECONNECT = 0x01,
154
149
PRELUDE_CONNECTION_POOL_FLAGS_FAILOVER = 0x02
155
150
} prelude_connection_pool_flags_t;
309
298
<div class="refsect2" lang="en">
310
<a name="id404992"></a><h3>
311
<a name="prelude-connection-pool-get-connection-list"></a>prelude_connection_pool_get_connection_list ()</h3>
312
<a class="indexterm" name="id405003"></a><pre class="programlisting"><a href="libprelude-prelude-list.html#prelude-list-t">prelude_list_t</a>* prelude_connection_pool_get_connection_list
313
(<a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t">prelude_connection_pool_t</a> *pool);</pre>
319
<div class="variablelist"><table border="0">
320
<col align="left" valign="top">
323
<td><span class="term"><em class="parameter"><code>pool</code></em> :</span></td>
324
<td> Pointer to a <a href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t"><span class="type">prelude_connection_pool_t</span></a> object.
328
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
299
<a name="prelude-connection-pool-ref"></a><h3>prelude_connection_pool_ref ()</h3>
300
<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>
302
Increases <em class="parameter"><code>pool</code></em> reference count.
305
<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
306
it reaches 0, at which point the <em class="parameter"><code>pool</code></em> will be destroyed.</p>
310
<div class="variablelist"><table border="0">
311
<col align="left" valign="top">
314
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
315
<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.
319
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
320
<td> The provided <em class="parameter"><code>pool</code></em> is returned.
327
<div class="refsect2" lang="en">
328
<a name="prelude-connection-pool-get-connection-list"></a><h3>prelude_connection_pool_get_connection_list ()</h3>
329
<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
330
(<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>
336
<div class="variablelist"><table border="0">
337
<col align="left" valign="top">
340
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
341
<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.
345
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
329
346
<td> The list of connections handled by <em class="parameter"><code>pool</code></em>.