8f59e94a496e45a3664079aae924532bce47e2aa
[m6w6/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.0.99 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="Misc" 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.0
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 <p class="caption"><span class="caption-text">libmemcached</span></p>
89 <ul class="current">
90 <li class="toctree-l1"><a class="reference internal" href="../libmemcached.html">Introduction</a></li>
91 <li class="toctree-l1"><a class="reference internal" href="index.html">libmemcached API</a></li>
92 <li class="toctree-l1 current"><a class="reference internal" href="index_misc.html">Misc</a><ul class="current">
93 <li class="toctree-l2 current"><a class="current reference internal" href="#">Configuration</a></li>
94 <li class="toctree-l2"><a class="reference internal" href="constants.html">Constants</a></li>
95 <li class="toctree-l2"><a class="reference internal" href="examples.html">Examples</a></li>
96 <li class="toctree-l2"><a class="reference internal" href="versioning.html">Versioning</a></li>
97 </ul>
98 </li>
99 </ul>
100 <p class="caption"><span class="caption-text">libmemcachedutil</span></p>
101 <ul>
102 <li class="toctree-l1"><a class="reference internal" href="../libmemcachedutil.html">Introduction</a></li>
103 <li class="toctree-l1"><a class="reference internal" href="../libmemcachedutil/index.html">libmemcachedutil API</a></li>
104 </ul>
105 <p class="caption"><span class="caption-text">libhashkit</span></p>
106 <ul>
107 <li class="toctree-l1"><a class="reference internal" href="../libhashkit.html">Introduction</a></li>
108 <li class="toctree-l1"><a class="reference internal" href="../libhashkit/index.html">libhashkit API</a></li>
109 </ul>
110 <p class="caption"><span class="caption-text">Client Applications</span></p>
111 <ul>
112 <li class="toctree-l1"><a class="reference internal" href="../bin/index.html">Client Applications</a></li>
113 </ul>
114 <p class="caption"><span class="caption-text">Copyright</span></p>
115 <ul>
116 <li class="toctree-l1"><a class="reference internal" href="../copyright.html">Copyright</a></li>
117 </ul>
118
119
120
121 </div>
122 </div>
123 </nav>
124
125 <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
126
127
128 <nav class="wy-nav-top" aria-label="top navigation">
129
130 <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
131 <a href="../index.html">libmemcached</a>
132
133 </nav>
134
135
136 <div class="wy-nav-content">
137
138 <div class="rst-content">
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156 <div role="navigation" aria-label="breadcrumbs navigation">
157
158 <ul class="wy-breadcrumbs">
159
160 <li><a href="../index.html">Docs</a> &raquo;</li>
161
162 <li><a href="index_misc.html">Misc</a> &raquo;</li>
163
164 <li>libmemcached Configuration</li>
165
166
167 <li class="wy-breadcrumbs-aside">
168
169
170
171 </li>
172
173 </ul>
174
175
176 <hr/>
177 </div>
178 <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
179 <div itemprop="articleBody">
180
181 <div class="section" id="libmemcached-configuration">
182 <h1>libmemcached Configuration<a class="headerlink" href="#libmemcached-configuration" title="Permalink to this headline"></a></h1>
183 <div class="section" id="synopsis">
184 <h2>SYNOPSIS<a class="headerlink" href="#synopsis" title="Permalink to this headline"></a></h2>
185 <dl class="docutils">
186 <dt>#include &lt;libmemcached-1.0/memcached.h&gt;</dt>
187 <dd>Compile and link with -lmemcached</dd>
188 </dl>
189 <dl class="function">
190 <dt id="_CPPv49memcachedPKc6size_t">
191 <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>
192 <dd><table class="docutils field-list" frame="void" rules="none">
193 <col class="field-name" />
194 <col class="field-body" />
195 <tbody valign="top">
196 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
197 <li><strong>string</strong> -- configuration string</li>
198 <li><strong>string_length</strong> -- length of the configuration string without any terminating zero</li>
199 </ul>
200 </td>
201 </tr>
202 <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>
203 </td>
204 </tr>
205 </tbody>
206 </table>
207 </dd></dl>
208
209 <dl class="function">
210 <dt id="_CPPv432libmemcached_check_configurationPKc6size_tPc6size_t">
211 <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>
212 <dd><table class="docutils field-list" frame="void" rules="none">
213 <col class="field-name" />
214 <col class="field-body" />
215 <tbody valign="top">
216 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
217 <li><strong>option_string</strong> -- configuration string</li>
218 <li><strong>length</strong> -- length of the configuration string without any terminating zero</li>
219 <li><strong>error_buffer</strong> -- buffer used to store any error message</li>
220 <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>
221 </ul>
222 </td>
223 </tr>
224 <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>
225 </td>
226 </tr>
227 </tbody>
228 </table>
229 </dd></dl>
230
231 </div>
232 <div class="section" id="description">
233 <h2>DESCRIPTION<a class="headerlink" href="#description" title="Permalink to this headline"></a></h2>
234 <p><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">libmemcached</span></code> implements a custom language for configuring and modifying
235 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
236 that you can use in your application directly.</p>
237 <div class="section" id="general-options">
238 <h3>General Options:<a class="headerlink" href="#general-options" title="Permalink to this headline"></a></h3>
239 <dl class="describe">
240 <dt>
241 <code class="descname">--SERVER=&lt;servername&gt;:&lt;optional_port&gt;/?&lt;optional_weight&gt;</code></dt>
242 <dd><p>Provide a servername to be used by the client.</p>
243 <p>Providing a weight will cause weighting to occur with all hosts with each
244 server getting a default weight of 1.</p>
245 </dd></dl>
246
247 <dl class="describe">
248 <dt>
249 <code class="descname">--SOCKET=&quot;&lt;filepath&gt;/?&lt;optional_weight&gt;&quot;</code></dt>
250 <dd><p>Provide a filepath to a UNIX socket file. Providing a weight will cause
251 weighting to occur with all hosts with each server getting a default weight
252 of 1.</p>
253 </dd></dl>
254
255 <dl class="describe">
256 <dt>
257 <code class="descname">--VERIFY-KEY</code></dt>
258 <dd><p>Verify that keys that are being used fit within the design of the protocol
259 being used.</p>
260 </dd></dl>
261
262 <dl class="describe">
263 <dt>
264 <code class="descname">--REMOVE_FAILED_SERVERS</code></dt>
265 <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>
266 </dd></dl>
267
268 <dl class="describe">
269 <dt>
270 <code class="descname">--BINARY-PROTOCOL</code></dt>
271 <dd><p>Force all connections to use the binary protocol.</p>
272 </dd></dl>
273
274 <dl class="describe">
275 <dt>
276 <code class="descname">--BUFFER-REQUESTS</code></dt>
277 <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>
278 </dd></dl>
279
280 <dl class="describe">
281 <dt>
282 <code class="descname">--CONFIGURE-FILE=</code></dt>
283 <dd><p>Provide a configuration file to be used to load requests. Beware that by
284 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
285 on information only contained in the file.</p>
286 </dd></dl>
287
288 <dl class="describe">
289 <dt>
290 <code class="descname">--CONNECT-TIMEOUT=</code></dt>
291 <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>
292 </dd></dl>
293
294 <dl class="describe">
295 <dt>
296 <code class="descname">--DISTRIBUTION=</code></dt>
297 <dd><p>Set the distribution model used by the client.
298 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>
299 </dd></dl>
300
301 <dl class="describe">
302 <dt>
303 <code class="descname">--HASH=</code></dt>
304 <dd><p>Set the hashing algorithm used for placing keys on servers.</p>
305 </dd></dl>
306
307 <dl class="describe">
308 <dt>
309 <code class="descname">--HASH-WITH-NAMESPACE</code></dt>
310 <dd><p>When enabled the prefix key will be added to the key when determining which
311 server to store the data in.</p>
312 </dd></dl>
313
314 <dl class="describe">
315 <dt>
316 <code class="descname">--NOREPLY</code></dt>
317 <dd><p>Enable &quot;no reply&quot; for all calls that support this. It is highly recommended
318 that you use this option with the binary protocol only.</p>
319 </dd></dl>
320
321 <dl class="describe">
322 <dt>
323 <code class="descname">--NUMBER-OF-REPLICAS=</code></dt>
324 <dd><p>Set the number of servers that keys will be replicated to.</p>
325 </dd></dl>
326
327 <dl class="describe">
328 <dt>
329 <code class="descname">--RANDOMIZE-REPLICA-READ</code></dt>
330 <dd><p>Select randomly the server within the replication pool to read from.</p>
331 </dd></dl>
332
333 <dl class="describe">
334 <dt>
335 <code class="descname">--SORT-HOSTS</code></dt>
336 <dd><p>When adding new servers always calculate their distribution based on sorted
337 naming order.</p>
338 </dd></dl>
339
340 <dl class="describe">
341 <dt>
342 <code class="descname">--SUPPORT-CAS</code></dt>
343 <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>
344 </dd></dl>
345
346 <dl class="describe">
347 <dt>
348 <code class="descname">--USE-UDP</code></dt>
349 <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>
350 </dd></dl>
351
352 <dl class="describe">
353 <dt>
354 <code class="descname">--NAMESPACE=</code></dt>
355 <dd><p>A namespace is a container that provides context for keys, only other
356 requests that know the namespace can access these values. This is
357 accomplished by prepending the namespace value to all keys.</p>
358 </dd></dl>
359
360 </div>
361 <div class="section" id="memcached-pool-options">
362 <h3>Memcached Pool Options:<a class="headerlink" href="#memcached-pool-options" title="Permalink to this headline"></a></h3>
363 <dl class="describe">
364 <dt>
365 <code class="descname">--POOL-MIN</code></dt>
366 <dd><p>Initial size of pool.</p>
367 </dd></dl>
368
369 <dl class="describe">
370 <dt>
371 <code class="descname">--POOL-MAX</code></dt>
372 <dd><p>Maximize size of the pool.</p>
373 </dd></dl>
374
375 </div>
376 <div class="section" id="i-o-options">
377 <h3>I/O Options:<a class="headerlink" href="#i-o-options" title="Permalink to this headline"></a></h3>
378 <dl class="describe">
379 <dt>
380 <code class="descname">--TCP-NODELAY</code></dt>
381 <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>
382 </dd></dl>
383
384 <dl class="describe">
385 <dt>
386 <code class="descname">--TCP-KEEPALIVE</code></dt>
387 <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>
388 </dd></dl>
389
390 <dl class="describe">
391 <dt>
392 <code class="descname">--RETRY-TIMEOUT=</code></dt>
393 <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>
394 </dd></dl>
395
396 <dl class="describe">
397 <dt>
398 <code class="descname">--SERVER-FAILURE-LIMIT=</code></dt>
399 <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>
400 </dd></dl>
401
402 <dl class="describe">
403 <dt>
404 <code class="descname">--SND-TIMEOUT=</code></dt>
405 <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>
406 </dd></dl>
407
408 <dl class="describe">
409 <dt>
410 <code class="descname">--SOCKET-RECV-SIZE=</code></dt>
411 <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>
412 </dd></dl>
413
414 <dl class="describe">
415 <dt>
416 <code class="descname">--SOCKET-SEND-SIZE=</code></dt>
417 <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>
418 </dd></dl>
419
420 <dl class="describe">
421 <dt>
422 <code class="descname">--POLL-TIMEOUT=</code></dt>
423 <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>
424 </dd></dl>
425
426 <dl class="describe">
427 <dt>
428 <code class="descname">--IO-BYTES-WATERMARK=</code></dt>
429 <dd></dd></dl>
430
431 <dl class="describe">
432 <dt>
433 <code class="descname">--IO-KEY-PREFETCH=</code></dt>
434 <dd></dd></dl>
435
436 <dl class="describe">
437 <dt>
438 <code class="descname">--IO-MSG-WATERMARK=</code></dt>
439 <dd></dd></dl>
440
441 <dl class="describe">
442 <dt>
443 <code class="descname">--TCP-KEEPIDLE</code></dt>
444 <dd></dd></dl>
445
446 <dl class="describe">
447 <dt>
448 <code class="descname">--RCV-TIMEOUT=</code></dt>
449 <dd></dd></dl>
450
451 </div>
452 <div class="section" id="other-options">
453 <h3>Other Options:<a class="headerlink" href="#other-options" title="Permalink to this headline"></a></h3>
454 <dl class="describe">
455 <dt>
456 <code class="descname">INCLUDE</code></dt>
457 <dd><p>Include a file in configuration.
458 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>
459 </dd></dl>
460
461 <dl class="describe">
462 <dt>
463 <code class="descname">RESET</code></dt>
464 <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>
465 </dd></dl>
466
467 <dl class="describe">
468 <dt>
469 <code class="descname">END</code></dt>
470 <dd><p>End configuration processing.</p>
471 </dd></dl>
472
473 <dl class="describe">
474 <dt>
475 <code class="descname">ERROR</code></dt>
476 <dd><p>End configuration processing and throw an error.</p>
477 </dd></dl>
478
479 </div>
480 </div>
481 <div class="section" id="environment">
482 <h2>ENVIRONMENT<a class="headerlink" href="#environment" title="Permalink to this headline"></a></h2>
483 <dl class="envvar">
484 <dt id="envvar-LIBMEMCACHED">
485 <code class="descname">LIBMEMCACHED</code><a class="headerlink" href="#envvar-LIBMEMCACHED" title="Permalink to this definition"></a></dt>
486 <dd></dd></dl>
487
488 </div>
489 <div class="section" id="return-value">
490 <h2>RETURN VALUE<a class="headerlink" href="#return-value" title="Permalink to this headline"></a></h2>
491 <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
492 initialized). On an allocation failure, it returns NULL.</p>
493 </div>
494 <div class="section" id="example">
495 <h2>EXAMPLE<a class="headerlink" href="#example" title="Permalink to this headline"></a></h2>
496 <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>
497 <span class="s">&quot;--SERVER=host10.example.com &quot;</span>
498 <span class="s">&quot;--SERVER=host11.example.com &quot;</span>
499 <span class="s">&quot;--SERVER=host10.example.com&quot;</span><span class="p">;</span>
500 <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>
501 <span class="p">{</span>
502 <span class="c1">// ...</span>
503 <span class="p">}</span>
504 <span class="n">memcached_free</span><span class="p">(</span><span class="n">memc</span><span class="p">);</span>
505 </pre></div>
506 </div>
507 </div>
508 <div class="section" id="see-also">
509 <h2>SEE ALSO<a class="headerlink" href="#see-also" title="Permalink to this headline"></a></h2>
510 <ul class="simple">
511 <li><em class="manpage"><a class="manpage reference external" href="https://linux.die.net/man/1/memcached">memcached(1)</a></em></li>
512 <li><a class="reference internal" href="../libmemcached.html"><span class="doc">C/C++ Client Library for memcached</span></a></li>
513 <li><a class="reference internal" href="memcached_strerror.html"><span class="doc">Converting Error Codes to Messages</span></a></li>
514 </ul>
515 </div>
516 </div>
517
518
519 </div>
520
521 </div>
522 <footer>
523
524 <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
525
526 <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>
527
528
529 <a href="index_misc.html" class="btn btn-neutral float-left" title="Misc" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
530
531 </div>
532
533
534 <hr/>
535
536 <div role="contentinfo">
537 <p>
538 &copy; <a href="../copyright.html">Copyright</a>
539
540 </p>
541 </div>
542 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>.
543
544 </footer>
545
546 </div>
547 </div>
548
549 </section>
550
551 </div>
552
553
554
555 <script type="text/javascript">
556 jQuery(function () {
557 SphinxRtdTheme.Navigation.enable(true);
558 });
559 </script>
560
561
562
563
564
565
566 </body>
567 </html>