Deploy to GitHub pages
[awesomized/libmemcached] / libmemcached / configuration.html
1
2
3 <!DOCTYPE html>
4 <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
5 <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
6 <head>
7 <meta charset="utf-8">
8
9 <meta name="viewport" content="width=device-width, initial-scale=1.0">
10
11 <title>libmemcached Configuration &mdash; libmemcached 1.1.0 documentation</title>
12
13
14
15
16
17
18
19
20 <script type="text/javascript" src="../_static/js/modernizr.min.js"></script>
21
22
23 <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
24 <script type="text/javascript" src="../_static/jquery.js"></script>
25 <script type="text/javascript" src="../_static/underscore.js"></script>
26 <script type="text/javascript" src="../_static/doctools.js"></script>
27 <script type="text/javascript" src="../_static/language_data.js"></script>
28
29 <script type="text/javascript" src="../_static/js/theme.js"></script>
30
31
32
33
34 <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
35 <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
36 <link rel="index" title="Index" href="../genindex.html" />
37 <link rel="search" title="Search" href="../search.html" />
38 <link rel="copyright" title="Copyright" href="../copyright.html" />
39 <link rel="next" title="libmemcached Constants and Defaults" href="constants.html" />
40 <link rel="prev" title="Miscellaneous" href="index_misc.html" />
41 </head>
42
43 <body class="wy-body-for-nav">
44
45
46 <div class="wy-grid-for-nav">
47
48 <nav data-toggle="wy-nav-shift" class="wy-nav-side">
49 <div class="wy-side-scroll">
50 <div class="wy-side-nav-search" >
51
52
53
54 <a href="../index.html" class="icon icon-home"> libmemcached
55
56
57
58 </a>
59
60
61
62
63 <div class="version">
64 1.1
65 </div>
66
67
68
69
70 <div role="search">
71 <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
72 <input type="text" name="q" placeholder="Search docs" />
73 <input type="hidden" name="check_keywords" value="yes" />
74 <input type="hidden" name="area" value="default" />
75 </form>
76 </div>
77
78
79 </div>
80
81 <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
82
83
84
85
86
87
88 <ul class="current">
89 <li class="toctree-l1"><a class="reference internal" href="../libmemcached.html">Introduction</a></li>
90 <li class="toctree-l1"><a class="reference internal" href="index.html">libmemcached API</a></li>
91 <li class="toctree-l1"><a class="reference internal" href="../libmemcachedutil/index.html">libmemcachedutil API</a></li>
92 <li class="toctree-l1"><a class="reference internal" href="../libhashkit/index.html">libhashkit API</a></li>
93 <li class="toctree-l1"><a class="reference internal" href="../bin/index.html">Client Applications</a></li>
94 <li class="toctree-l1 current"><a class="reference internal" href="index_misc.html">Miscellaneous</a><ul class="current">
95 <li class="toctree-l2 current"><a class="current reference internal" href="#">Configuration</a></li>
96 <li class="toctree-l2"><a class="reference internal" href="constants.html">Constants</a></li>
97 <li class="toctree-l2"><a class="reference internal" href="examples.html">Examples</a></li>
98 <li class="toctree-l2"><a class="reference internal" href="versioning.html">Versioning</a></li>
99 </ul>
100 </li>
101 </ul>
102 <ul>
103 <li class="toctree-l1"><a class="reference internal" href="../changelogs.html">Change Logs</a></li>
104 <li class="toctree-l1"><a class="reference internal" href="../copyright.html">Copyright</a></li>
105 </ul>
106
107
108
109 </div>
110 </div>
111 </nav>
112
113 <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
114
115
116 <nav class="wy-nav-top" aria-label="top navigation">
117
118 <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
119 <a href="../index.html">libmemcached</a>
120
121 </nav>
122
123
124 <div class="wy-nav-content">
125
126 <div class="rst-content">
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144 <div role="navigation" aria-label="breadcrumbs navigation">
145
146 <ul class="wy-breadcrumbs">
147
148 <li><a href="../index.html">Docs</a> &raquo;</li>
149
150 <li><a href="index_misc.html">Miscellaneous</a> &raquo;</li>
151
152 <li>libmemcached Configuration</li>
153
154
155 <li class="wy-breadcrumbs-aside">
156
157
158
159 <a href="https://github.com/m6w6/libmemcached/blob/v1.x/docs/source/libmemcached/configuration.rst" class="fa fa-github"> Edit on GitHub</a>
160
161
162
163 </li>
164
165 </ul>
166
167
168 <hr/>
169 </div>
170 <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
171 <div itemprop="articleBody">
172
173 <div class="section" id="libmemcached-configuration">
174 <h1>libmemcached Configuration<a class="headerlink" href="#libmemcached-configuration" title="Permalink to this headline"></a></h1>
175 <div class="section" id="synopsis">
176 <h2>SYNOPSIS<a class="headerlink" href="#synopsis" title="Permalink to this headline"></a></h2>
177 <dl class="docutils">
178 <dt>#include &lt;libmemcached-<a href="#id1"><span class="problematic" id="id2">|libmemcached_version|</span></a>/memcached.h&gt;</dt>
179 <dd>Compile and link with -lmemcached</dd>
180 </dl>
181 <dl class="function">
182 <dt id="_CPPv49memcachedPKc6size_t">
183 <span id="_CPPv39memcachedPKc6size_t"></span><span id="_CPPv29memcachedPKc6size_t"></span><span id="memcached__cCP.s"></span><a class="reference internal" href="memcached_create.html#_CPPv412memcached_st" title="memcached_st">memcached_st</a> *<code class="descname">memcached</code><span class="sig-paren">(</span><em class="property">const</em> char *<em>string</em>, size_t <em>string_length</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv49memcachedPKc6size_t" title="Permalink to this definition"></a><br /></dt>
184 <dd><table class="docutils field-list" frame="void" rules="none">
185 <col class="field-name" />
186 <col class="field-body" />
187 <tbody valign="top">
188 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
189 <li><strong>string</strong> -- configuration string</li>
190 <li><strong>string_length</strong> -- length of the configuration string without any terminating zero</li>
191 </ul>
192 </td>
193 </tr>
194 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">allocated and initialized <a class="reference internal" href="memcached_create.html#_CPPv412memcached_st" title="memcached_st"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">memcached_st</span></code></a> struct</p>
195 </td>
196 </tr>
197 </tbody>
198 </table>
199 </dd></dl>
200
201 <dl class="function">
202 <dt id="_CPPv432libmemcached_check_configurationPKc6size_tPc6size_t">
203 <span id="_CPPv332libmemcached_check_configurationPKc6size_tPc6size_t"></span><span id="_CPPv232libmemcached_check_configurationPKc6size_tPc6size_t"></span><span id="libmemcached_check_configuration__cCP.s.cP.s"></span><a class="reference internal" href="memcached_return_t.html#_CPPv418memcached_return_t" title="memcached_return_t">memcached_return_t</a> <code class="descname">libmemcached_check_configuration</code><span class="sig-paren">(</span><em class="property">const</em> char *<em>option_string</em>, size_t <em>length</em>, char *<em>error_buffer</em>, size_t <em>error_buffer_size</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv432libmemcached_check_configurationPKc6size_tPc6size_t" title="Permalink to this definition"></a><br /></dt>
204 <dd><table class="docutils field-list" frame="void" rules="none">
205 <col class="field-name" />
206 <col class="field-body" />
207 <tbody valign="top">
208 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
209 <li><strong>option_string</strong> -- configuration string</li>
210 <li><strong>length</strong> -- length of the configuration string without any terminating zero</li>
211 <li><strong>error_buffer</strong> -- buffer used to store any error message</li>
212 <li><strong>error_buffer_size</strong> -- available size of the <a class="reference internal" href="#_CPPv432libmemcached_check_configurationPKc6size_tPc6size_t" title="libmemcached_check_configuration::error_buffer"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">error_buffer</span></code></a></li>
213 </ul>
214 </td>
215 </tr>
216 <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><a class="reference internal" href="memcached_return_t.html#_CPPv418memcached_return_t" title="memcached_return_t"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">memcached_return_t</span></code></a> indicating success</p>
217 </td>
218 </tr>
219 </tbody>
220 </table>
221 </dd></dl>
222
223 </div>
224 <div class="section" id="description">
225 <h2>DESCRIPTION<a class="headerlink" href="#description" title="Permalink to this headline"></a></h2>
226 <p><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">libmemcached</span></code> implements a custom language for configuring and modifying
227 servers. By passing in an option string you can generate a <a class="reference internal" href="memcached_create.html#_CPPv412memcached_st" title="memcached_st"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">memcached_st</span></code></a> object
228 that you can use in your application directly.</p>
229 <div class="section" id="general-options">
230 <h3>General Options:<a class="headerlink" href="#general-options" title="Permalink to this headline"></a></h3>
231 <dl class="describe">
232 <dt>
233 <code class="descname">--SERVER=&lt;servername&gt;:&lt;optional_port&gt;/?&lt;optional_weight&gt;</code></dt>
234 <dd><p>Provide a servername to be used by the client.</p>
235 <p>Providing a weight will cause weighting to occur with all hosts with each
236 server getting a default weight of 1.</p>
237 </dd></dl>
238
239 <dl class="describe">
240 <dt>
241 <code class="descname">--SOCKET=&quot;&lt;filepath&gt;/?&lt;optional_weight&gt;&quot;</code></dt>
242 <dd><p>Provide a filepath to a UNIX socket file. Providing a weight will cause
243 weighting to occur with all hosts with each server getting a default weight
244 of 1.</p>
245 </dd></dl>
246
247 <dl class="describe">
248 <dt>
249 <code class="descname">--VERIFY-KEY</code></dt>
250 <dd><p>Verify that keys that are being used fit within the design of the protocol
251 being used.</p>
252 </dd></dl>
253
254 <dl class="describe">
255 <dt>
256 <code class="descname">--REMOVE_FAILED_SERVERS</code></dt>
257 <dd><p>Enable the behavior <a class="reference internal" href="memcached_behavior.html#_CPPv4N20memcached_behavior_t40MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERSE" title="MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS</span></code></a>.</p>
258 </dd></dl>
259
260 <dl class="describe">
261 <dt>
262 <code class="descname">--BINARY-PROTOCOL</code></dt>
263 <dd><p>Force all connections to use the binary protocol.</p>
264 </dd></dl>
265
266 <dl class="describe">
267 <dt>
268 <code class="descname">--BUFFER-REQUESTS</code></dt>
269 <dd><p>Please see <a class="reference internal" href="memcached_behavior.html#_CPPv4N20memcached_behavior_t34MEMCACHED_BEHAVIOR_BUFFER_REQUESTSE" title="MEMCACHED_BEHAVIOR_BUFFER_REQUESTS"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">MEMCACHED_BEHAVIOR_BUFFER_REQUESTS</span></code></a>.</p>
270 </dd></dl>
271
272 <dl class="describe">
273 <dt>
274 <code class="descname">--CONFIGURE-FILE=</code></dt>
275 <dd><p>Provide a configuration file to be used to load requests. Beware that by
276 using a configuration file <code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">libmemcached</span></code> will reset <a class="reference internal" href="memcached_create.html#_CPPv412memcached_st" title="memcached_st"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">memcached_st</span></code></a> based
277 on information only contained in the file.</p>
278 </dd></dl>
279
280 <dl class="describe">
281 <dt>
282 <code class="descname">--CONNECT-TIMEOUT=</code></dt>
283 <dd><p>See <a class="reference internal" href="memcached_behavior.html#_CPPv422memcached_behavior_setP12memcached_st20memcached_behavior_t8uint64_t" title="memcached_behavior_set"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">memcached_behavior_set()</span></code></a> for <a class="reference internal" href="memcached_behavior.html#_CPPv4N20memcached_behavior_t34MEMCACHED_BEHAVIOR_CONNECT_TIMEOUTE" title="MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT</span></code></a>.</p>
284 </dd></dl>
285
286 <dl class="describe">
287 <dt>
288 <code class="descname">--DISTRIBUTION=</code></dt>
289 <dd><p>Set the distribution model used by the client.
290 See <a class="reference internal" href="memcached_behavior.html#_CPPv422memcached_behavior_setP12memcached_st20memcached_behavior_t8uint64_t" title="memcached_behavior_set"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">memcached_behavior_set()</span></code></a> for more details.</p>
291 </dd></dl>
292
293 <dl class="describe">
294 <dt>
295 <code class="descname">--HASH=</code></dt>
296 <dd><p>Set the hashing algorithm used for placing keys on servers.</p>
297 </dd></dl>
298
299 <dl class="describe">
300 <dt>
301 <code class="descname">--HASH-WITH-NAMESPACE</code></dt>
302 <dd><p>When enabled the prefix key will be added to the key when determining which
303 server to store the data in.</p>
304 </dd></dl>
305
306 <dl class="describe">
307 <dt>
308 <code class="descname">--NOREPLY</code></dt>
309 <dd><p>Enable &quot;no reply&quot; for all calls that support this. It is highly recommended
310 that you use this option with the binary protocol only.</p>
311 </dd></dl>
312
313 <dl class="describe">
314 <dt>
315 <code class="descname">--NUMBER-OF-REPLICAS=</code></dt>
316 <dd><p>Set the number of servers that keys will be replicated to.</p>
317 </dd></dl>
318
319 <dl class="describe">
320 <dt>
321 <code class="descname">--RANDOMIZE-REPLICA-READ</code></dt>
322 <dd><p>Select randomly the server within the replication pool to read from.</p>
323 </dd></dl>
324
325 <dl class="describe">
326 <dt>
327 <code class="descname">--SORT-HOSTS</code></dt>
328 <dd><p>When adding new servers always calculate their distribution based on sorted
329 naming order.</p>
330 </dd></dl>
331
332 <dl class="describe">
333 <dt>
334 <code class="descname">--SUPPORT-CAS</code></dt>
335 <dd><p>See <a class="reference internal" href="memcached_behavior.html#_CPPv422memcached_behavior_setP12memcached_st20memcached_behavior_t8uint64_t" title="memcached_behavior_set"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">memcached_behavior_set()</span></code></a> for <a class="reference internal" href="memcached_behavior.html#_CPPv4N20memcached_behavior_t30MEMCACHED_BEHAVIOR_SUPPORT_CASE" title="MEMCACHED_BEHAVIOR_SUPPORT_CAS"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">MEMCACHED_BEHAVIOR_SUPPORT_CAS</span></code></a></p>
336 </dd></dl>
337
338 <dl class="describe">
339 <dt>
340 <code class="descname">--USE-UDP</code></dt>
341 <dd><p>See <a class="reference internal" href="memcached_behavior.html#_CPPv422memcached_behavior_setP12memcached_st20memcached_behavior_t8uint64_t" title="memcached_behavior_set"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">memcached_behavior_set()</span></code></a> for <a class="reference internal" href="memcached_behavior.html#_CPPv4N20memcached_behavior_t26MEMCACHED_BEHAVIOR_USE_UDPE" title="MEMCACHED_BEHAVIOR_USE_UDP"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">MEMCACHED_BEHAVIOR_USE_UDP</span></code></a></p>
342 </dd></dl>
343
344 <dl class="describe">
345 <dt>
346 <code class="descname">--NAMESPACE=</code></dt>
347 <dd><p>A namespace is a container that provides context for keys, only other
348 requests that know the namespace can access these values. This is
349 accomplished by prepending the namespace value to all keys.</p>
350 </dd></dl>
351
352 </div>
353 <div class="section" id="memcached-pool-options">
354 <h3>Memcached Pool Options:<a class="headerlink" href="#memcached-pool-options" title="Permalink to this headline"></a></h3>
355 <dl class="describe">
356 <dt>
357 <code class="descname">--POOL-MIN</code></dt>
358 <dd><p>Initial size of pool.</p>
359 </dd></dl>
360
361 <dl class="describe">
362 <dt>
363 <code class="descname">--POOL-MAX</code></dt>
364 <dd><p>Maximize size of the pool.</p>
365 </dd></dl>
366
367 </div>
368 <div class="section" id="i-o-options">
369 <h3>I/O Options:<a class="headerlink" href="#i-o-options" title="Permalink to this headline"></a></h3>
370 <dl class="describe">
371 <dt>
372 <code class="descname">--TCP-NODELAY</code></dt>
373 <dd><p>See <a class="reference internal" href="memcached_behavior.html#_CPPv422memcached_behavior_setP12memcached_st20memcached_behavior_t8uint64_t" title="memcached_behavior_set"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">memcached_behavior_set()</span></code></a> for <a class="reference internal" href="memcached_behavior.html#_CPPv4N20memcached_behavior_t30MEMCACHED_BEHAVIOR_TCP_NODELAYE" title="MEMCACHED_BEHAVIOR_TCP_NODELAY"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">MEMCACHED_BEHAVIOR_TCP_NODELAY</span></code></a></p>
374 </dd></dl>
375
376 <dl class="describe">
377 <dt>
378 <code class="descname">--TCP-KEEPALIVE</code></dt>
379 <dd><p>See <a class="reference internal" href="memcached_behavior.html#_CPPv422memcached_behavior_setP12memcached_st20memcached_behavior_t8uint64_t" title="memcached_behavior_set"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">memcached_behavior_set()</span></code></a> for <code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">MEMCACHED_BEHAVIOR_TCP_KEEPALIVE</span></code></p>
380 </dd></dl>
381
382 <dl class="describe">
383 <dt>
384 <code class="descname">--RETRY-TIMEOUT=</code></dt>
385 <dd><p>See <a class="reference internal" href="memcached_behavior.html#_CPPv422memcached_behavior_setP12memcached_st20memcached_behavior_t8uint64_t" title="memcached_behavior_set"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">memcached_behavior_set()</span></code></a> for <a class="reference internal" href="memcached_behavior.html#_CPPv4N20memcached_behavior_t32MEMCACHED_BEHAVIOR_RETRY_TIMEOUTE" title="MEMCACHED_BEHAVIOR_RETRY_TIMEOUT"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">MEMCACHED_BEHAVIOR_RETRY_TIMEOUT</span></code></a></p>
386 </dd></dl>
387
388 <dl class="describe">
389 <dt>
390 <code class="descname">--SERVER-FAILURE-LIMIT=</code></dt>
391 <dd><p>See <a class="reference internal" href="memcached_behavior.html#_CPPv422memcached_behavior_setP12memcached_st20memcached_behavior_t8uint64_t" title="memcached_behavior_set"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">memcached_behavior_set()</span></code></a> for <a class="reference internal" href="memcached_behavior.html#_CPPv4N20memcached_behavior_t39MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMITE" title="MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT</span></code></a></p>
392 </dd></dl>
393
394 <dl class="describe">
395 <dt>
396 <code class="descname">--SND-TIMEOUT=</code></dt>
397 <dd><p>See <a class="reference internal" href="memcached_behavior.html#_CPPv422memcached_behavior_setP12memcached_st20memcached_behavior_t8uint64_t" title="memcached_behavior_set"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">memcached_behavior_set()</span></code></a> for <a class="reference internal" href="memcached_behavior.html#_CPPv4N20memcached_behavior_t30MEMCACHED_BEHAVIOR_SND_TIMEOUTE" title="MEMCACHED_BEHAVIOR_SND_TIMEOUT"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">MEMCACHED_BEHAVIOR_SND_TIMEOUT</span></code></a></p>
398 </dd></dl>
399
400 <dl class="describe">
401 <dt>
402 <code class="descname">--SOCKET-RECV-SIZE=</code></dt>
403 <dd><p>See <a class="reference internal" href="memcached_behavior.html#_CPPv422memcached_behavior_setP12memcached_st20memcached_behavior_t8uint64_t" title="memcached_behavior_set"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">memcached_behavior_set()</span></code></a> for <a class="reference internal" href="memcached_behavior.html#_CPPv4N20memcached_behavior_t35MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZEE" title="MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE</span></code></a></p>
404 </dd></dl>
405
406 <dl class="describe">
407 <dt>
408 <code class="descname">--SOCKET-SEND-SIZE=</code></dt>
409 <dd><p>See <a class="reference internal" href="memcached_behavior.html#_CPPv422memcached_behavior_setP12memcached_st20memcached_behavior_t8uint64_t" title="memcached_behavior_set"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">memcached_behavior_set()</span></code></a> for <a class="reference internal" href="memcached_behavior.html#_CPPv4N20memcached_behavior_t35MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZEE" title="MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE</span></code></a></p>
410 </dd></dl>
411
412 <dl class="describe">
413 <dt>
414 <code class="descname">--POLL-TIMEOUT=</code></dt>
415 <dd><p>Set the timeout used by <em class="manpage"><a class="manpage reference external" href="https://linux.die.net/man/3/poll">poll(3)</a></em>.</p>
416 </dd></dl>
417
418 <dl class="describe">
419 <dt>
420 <code class="descname">--IO-BYTES-WATERMARK=</code></dt>
421 <dd></dd></dl>
422
423 <dl class="describe">
424 <dt>
425 <code class="descname">--IO-KEY-PREFETCH=</code></dt>
426 <dd></dd></dl>
427
428 <dl class="describe">
429 <dt>
430 <code class="descname">--IO-MSG-WATERMARK=</code></dt>
431 <dd></dd></dl>
432
433 <dl class="describe">
434 <dt>
435 <code class="descname">--TCP-KEEPIDLE</code></dt>
436 <dd></dd></dl>
437
438 <dl class="describe">
439 <dt>
440 <code class="descname">--RCV-TIMEOUT=</code></dt>
441 <dd></dd></dl>
442
443 </div>
444 <div class="section" id="other-options">
445 <h3>Other Options:<a class="headerlink" href="#other-options" title="Permalink to this headline"></a></h3>
446 <dl class="describe">
447 <dt>
448 <code class="descname">INCLUDE</code></dt>
449 <dd><p>Include a file in configuration.
450 Unlike <code class="docutils literal notranslate"><span class="pre">--CONFIGURE-FILE=</span></code> this will not reset <a class="reference internal" href="memcached_create.html#_CPPv412memcached_st" title="memcached_st"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">memcached_st</span></code></a>.</p>
451 </dd></dl>
452
453 <dl class="describe">
454 <dt>
455 <code class="descname">RESET</code></dt>
456 <dd><p>Reset <a class="reference internal" href="memcached_create.html#_CPPv412memcached_st" title="memcached_st"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">memcached_st</span></code></a> and continue to process.</p>
457 </dd></dl>
458
459 <dl class="describe">
460 <dt>
461 <code class="descname">END</code></dt>
462 <dd><p>End configuration processing.</p>
463 </dd></dl>
464
465 <dl class="describe">
466 <dt>
467 <code class="descname">ERROR</code></dt>
468 <dd><p>End configuration processing and throw an error.</p>
469 </dd></dl>
470
471 </div>
472 </div>
473 <div class="section" id="environment">
474 <h2>ENVIRONMENT<a class="headerlink" href="#environment" title="Permalink to this headline"></a></h2>
475 <dl class="envvar">
476 <dt id="envvar-LIBMEMCACHED">
477 <code class="descname">LIBMEMCACHED</code><a class="headerlink" href="#envvar-LIBMEMCACHED" title="Permalink to this definition"></a></dt>
478 <dd></dd></dl>
479
480 </div>
481 <div class="section" id="return-value">
482 <h2>RETURN VALUE<a class="headerlink" href="#return-value" title="Permalink to this headline"></a></h2>
483 <p><a class="reference internal" href="#_CPPv49memcachedPKc6size_t" title="memcached"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">memcached()</span></code></a> returns a pointer to the <a class="reference internal" href="memcached_create.html#_CPPv412memcached_st" title="memcached_st"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">memcached_st</span></code></a> that was created (or
484 initialized). On an allocation failure, it returns NULL.</p>
485 </div>
486 <div class="section" id="example">
487 <h2>EXAMPLE<a class="headerlink" href="#example" title="Permalink to this headline"></a></h2>
488 <div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">config_string</span><span class="o">=</span>
489 <span class="s">&quot;--SERVER=host10.example.com &quot;</span>
490 <span class="s">&quot;--SERVER=host11.example.com &quot;</span>
491 <span class="s">&quot;--SERVER=host10.example.com&quot;</span><span class="p">;</span>
492 <span class="n">memcached_st</span> <span class="o">*</span><span class="n">memc</span><span class="o">=</span> <span class="n">memcached</span><span class="p">(</span><span class="n">config_string</span><span class="p">,</span> <span class="n">strlen</span><span class="p">(</span><span class="n">config_string</span><span class="p">));</span>
493 <span class="p">{</span>
494 <span class="c1">// ...</span>
495 <span class="p">}</span>
496 <span class="n">memcached_free</span><span class="p">(</span><span class="n">memc</span><span class="p">);</span>
497 </pre></div>
498 </div>
499 </div>
500 <div class="section" id="see-also">
501 <h2>SEE ALSO<a class="headerlink" href="#see-also" title="Permalink to this headline"></a></h2>
502 <ul class="simple">
503 <li><em class="manpage"><a class="manpage reference external" href="https://linux.die.net/man/1/memcached">memcached(1)</a></em></li>
504 <li><a class="reference internal" href="../libmemcached.html"><span class="doc">C/C++ Client Library for memcached</span></a></li>
505 <li><a class="reference internal" href="memcached_strerror.html"><span class="doc">Converting Error Codes to Messages</span></a></li>
506 </ul>
507 </div>
508 </div>
509
510
511 </div>
512
513 </div>
514 <footer>
515
516 <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
517
518 <a href="constants.html" class="btn btn-neutral float-right" title="libmemcached Constants and Defaults" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
519
520
521 <a href="index_misc.html" class="btn btn-neutral float-left" title="Miscellaneous" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
522
523 </div>
524
525
526 <hr/>
527
528 <div role="contentinfo">
529 <p>
530 &copy; <a href="../copyright.html">Copyright</a>
531
532 </p>
533 </div>
534 Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
535
536 </footer>
537
538 </div>
539 </div>
540
541 </section>
542
543 </div>
544
545
546
547 <script type="text/javascript">
548 jQuery(function () {
549 SphinxRtdTheme.Navigation.enable(true);
550 });
551 </script>
552
553
554
555
556
557
558 </body>
559 </html>