Merge in docs.
authorBrian Aker <brian@tangent.org>
Fri, 8 Apr 2011 03:57:14 +0000 (20:57 -0700)
committerBrian Aker <brian@tangent.org>
Fri, 8 Apr 2011 03:57:14 +0000 (20:57 -0700)
157 files changed:
.bzrignore
docs/conf.py
docs/include.am
docs/index.rst
docs/libmemcached.rst
docs/man/hashkit_clone.3 [new file with mode: 0644]
docs/man/hashkit_crc32.3 [new file with mode: 0644]
docs/man/hashkit_create.3 [new file with mode: 0644]
docs/man/hashkit_fnv1_32.3 [new file with mode: 0644]
docs/man/hashkit_fnv1_64.3 [new file with mode: 0644]
docs/man/hashkit_fnv1a_32.3 [new file with mode: 0644]
docs/man/hashkit_fnv1a_64.3 [new file with mode: 0644]
docs/man/hashkit_free.3 [new file with mode: 0644]
docs/man/hashkit_functions.3 [new file with mode: 0644]
docs/man/hashkit_hsieh.3 [new file with mode: 0644]
docs/man/hashkit_is_allocated.3 [new file with mode: 0644]
docs/man/hashkit_jenkins.3 [new file with mode: 0644]
docs/man/hashkit_md5.3 [new file with mode: 0644]
docs/man/hashkit_murmur.3 [new file with mode: 0644]
docs/man/hashkit_value.3 [new file with mode: 0644]
docs/man/libmemcached.3 [new file with mode: 0644]
docs/man/libmemcached_examples.3 [new file with mode: 0644]
docs/man/libmemcachedutil.3 [new file with mode: 0644]
docs/man/memcached_add.3 [new file with mode: 0644]
docs/man/memcached_add_by_key.3 [new file with mode: 0644]
docs/man/memcached_analyze.3 [new file with mode: 0644]
docs/man/memcached_append.3 [new file with mode: 0644]
docs/man/memcached_append_by_key.3 [new file with mode: 0644]
docs/man/memcached_auto.3 [new file with mode: 0644]
docs/man/memcached_behavior.3 [new file with mode: 0644]
docs/man/memcached_behavior_get.3 [new file with mode: 0644]
docs/man/memcached_behavior_set.3 [new file with mode: 0644]
docs/man/memcached_callback.3 [new file with mode: 0644]
docs/man/memcached_callback_get.3 [new file with mode: 0644]
docs/man/memcached_callback_set.3 [new file with mode: 0644]
docs/man/memcached_cas.3 [new file with mode: 0644]
docs/man/memcached_cas_by_key.3 [new file with mode: 0644]
docs/man/memcached_clone.3 [new file with mode: 0644]
docs/man/memcached_create.3 [new file with mode: 0644]
docs/man/memcached_decrement.3 [new file with mode: 0644]
docs/man/memcached_decrement_with_initial.3 [new file with mode: 0644]
docs/man/memcached_delete.3 [new file with mode: 0644]
docs/man/memcached_delete_by_key.3 [new file with mode: 0644]
docs/man/memcached_destroy_sasl_auth_data.3 [new file with mode: 0644]
docs/man/memcached_dump.3 [new file with mode: 0644]
docs/man/memcached_fetch.3 [new file with mode: 0644]
docs/man/memcached_fetch_execute.3 [new file with mode: 0644]
docs/man/memcached_fetch_result.3 [new file with mode: 0644]
docs/man/memcached_flush.3 [new file with mode: 0644]
docs/man/memcached_flush_buffers.3 [new file with mode: 0644]
docs/man/memcached_free.3 [new file with mode: 0644]
docs/man/memcached_generate_hash_value.3 [new file with mode: 0644]
docs/man/memcached_get.3 [new file with mode: 0644]
docs/man/memcached_get_by_key.3 [new file with mode: 0644]
docs/man/memcached_get_memory_allocators.3 [new file with mode: 0644]
docs/man/memcached_get_sasl_callbacks.3 [new file with mode: 0644]
docs/man/memcached_get_user_data.3 [new file with mode: 0644]
docs/man/memcached_increment.3 [new file with mode: 0644]
docs/man/memcached_increment_with_initial.3 [new file with mode: 0644]
docs/man/memcached_lib_version.3 [new file with mode: 0644]
docs/man/memcached_memory_allocators.3 [new file with mode: 0644]
docs/man/memcached_mget.3 [new file with mode: 0644]
docs/man/memcached_mget_by_key.3 [new file with mode: 0644]
docs/man/memcached_mget_execute.3 [new file with mode: 0644]
docs/man/memcached_mget_execute_by_key.3 [new file with mode: 0644]
docs/man/memcached_pool.3 [new file with mode: 0644]
docs/man/memcached_pool_behavior_get.3 [new file with mode: 0644]
docs/man/memcached_pool_behavior_set.3 [new file with mode: 0644]
docs/man/memcached_pool_create.3 [new file with mode: 0644]
docs/man/memcached_pool_destroy.3 [new file with mode: 0644]
docs/man/memcached_pool_pop.3 [new file with mode: 0644]
docs/man/memcached_pool_push.3 [new file with mode: 0644]
docs/man/memcached_prepend.3 [new file with mode: 0644]
docs/man/memcached_prepend_by_key.3 [new file with mode: 0644]
docs/man/memcached_quit.3 [new file with mode: 0644]
docs/man/memcached_replace.3 [new file with mode: 0644]
docs/man/memcached_replace_by_key.3 [new file with mode: 0644]
docs/man/memcached_result_cas.3 [new file with mode: 0644]
docs/man/memcached_result_create.3 [new file with mode: 0644]
docs/man/memcached_result_flags.3 [new file with mode: 0644]
docs/man/memcached_result_free.3 [new file with mode: 0644]
docs/man/memcached_result_key_length.3 [new file with mode: 0644]
docs/man/memcached_result_key_value.3 [new file with mode: 0644]
docs/man/memcached_result_length.3 [new file with mode: 0644]
docs/man/memcached_result_st.3 [new file with mode: 0644]
docs/man/memcached_result_value.3 [new file with mode: 0644]
docs/man/memcached_sasl.3 [new file with mode: 0644]
docs/man/memcached_sasl_set_auth_data.3 [new file with mode: 0644]
docs/man/memcached_server_add.3 [new file with mode: 0644]
docs/man/memcached_server_add_unix_socket.3 [new file with mode: 0644]
docs/man/memcached_server_count.3 [new file with mode: 0644]
docs/man/memcached_server_cursor.3 [new file with mode: 0644]
docs/man/memcached_server_list.3 [new file with mode: 0644]
docs/man/memcached_server_list_append.3 [new file with mode: 0644]
docs/man/memcached_server_list_count.3 [new file with mode: 0644]
docs/man/memcached_server_list_free.3 [new file with mode: 0644]
docs/man/memcached_server_push.3 [new file with mode: 0644]
docs/man/memcached_server_st.3 [new file with mode: 0644]
docs/man/memcached_servers.3 [new file with mode: 0644]
docs/man/memcached_servers_parse.3 [new file with mode: 0644]
docs/man/memcached_servers_reset.3 [new file with mode: 0644]
docs/man/memcached_set.3 [new file with mode: 0644]
docs/man/memcached_set_by_key.3 [new file with mode: 0644]
docs/man/memcached_set_memory_allocators.3 [new file with mode: 0644]
docs/man/memcached_set_memory_allocators_context.3 [new file with mode: 0644]
docs/man/memcached_set_sasl_callbacks.3 [new file with mode: 0644]
docs/man/memcached_set_user_data.3 [new file with mode: 0644]
docs/man/memcached_stat.3 [new file with mode: 0644]
docs/man/memcached_stat_execute.3 [new file with mode: 0644]
docs/man/memcached_stat_get_keys.3 [new file with mode: 0644]
docs/man/memcached_stat_get_value.3 [new file with mode: 0644]
docs/man/memcached_stat_servername.3 [new file with mode: 0644]
docs/man/memcached_stats.3 [new file with mode: 0644]
docs/man/memcached_strerror.3 [new file with mode: 0644]
docs/man/memcached_user_data.3 [new file with mode: 0644]
docs/man/memcached_verbosity.3 [new file with mode: 0644]
docs/man/memcached_version.3 [new file with mode: 0644]
docs/man/memcapable.1 [new file with mode: 0644]
docs/man/memcat.1 [new file with mode: 0644]
docs/man/memcp.1 [new file with mode: 0644]
docs/man/memdump.1 [new file with mode: 0644]
docs/man/memerror.1 [new file with mode: 0644]
docs/man/memflush.1 [new file with mode: 0644]
docs/man/memrm.1 [new file with mode: 0644]
docs/man/memslap.1 [new file with mode: 0644]
docs/man/memstat.1 [new file with mode: 0644]
docs/memcached_analyze.rst
docs/memcached_auto.rst
docs/memcached_behavior.rst
docs/memcached_callback.rst
docs/memcached_create.rst
docs/memcached_delete.rst
docs/memcached_dump.rst
docs/memcached_flush.rst
docs/memcached_flush_buffers.rst
docs/memcached_generate_hash_value.rst
docs/memcached_get.rst
docs/memcached_memory_allocators.rst
docs/memcached_quit.rst
docs/memcached_result_st.rst
docs/memcached_sasl.rst
docs/memcached_server_st.rst
docs/memcached_servers.rst
docs/memcached_set.rst
docs/memcached_stats.rst
docs/memcached_strerror.rst
docs/memcached_user_data.rst
docs/memcached_verbosity.rst
docs/memcached_version.rst
libmemcached/error.c [deleted file]
libmemcached/error.cc [new file with mode: 0644]
libmemcached/include.am
libmemcached/memcached.h
libmemcached/options.h
libmemcached/types.h
tests/parser.cc
tests/string.cc

index ff0c0bb216993aa1f2c832358e56f15ed820b157..78b001ef0eb69e8858a4164399d5c8a43f8f1716 100644 (file)
@@ -73,7 +73,6 @@ lt~obsolete.m4
 patch
 docs/html/
 docs/linkcheck/
-docs/man/
 patch2
 stamp-h1
 support/Makefile
index 6a483c16457d274b542545671ba282ff69b2c60a..0ef2fa425d905a6069efc1fbe32018342f863ef6 100644 (file)
@@ -224,7 +224,7 @@ man_pages = [
   ('hashkit_functions', 'hashkit_jenkins', u'libhashkit Documentation', [u'Brian Aker'], 3),
   ('hashkit_functions', 'hashkit_md5', u'libhashkit Documentation', [u'Brian Aker'], 3),
   ('hashkit_functions', 'hashkit_murmur', u'libhashkit Documentation', [u'Brian Aker'], 3),
-  ('hashkit_hsieh', 'hashkit_hsieh', u'libhashkit Documentation', [u'Brian Aker'], 3),
+  ('hashkit_functions', 'hashkit_hsieh', u'libhashkit Documentation', [u'Brian Aker'], 3),
   ('hashkit_value', 'hashkit_value', u'libhashkit Documentation', [u'Brian Aker'], 3),
   ('libmemcached', 'libmemcached', u'libmemcached Documentation', [u'Brian Aker'], 3),
   ('libmemcached_examples', 'libmemcached_examples', u'libmemcached Documentation', [u'Brian Aker'], 3),
index 0e93ee7d3b25ec4c107d50fe5e6888ab13376bd0..ebfa12aba03c003a7dab3a40e6a02778b787726e 100644 (file)
@@ -163,8 +163,6 @@ ALLSPHINXOPTS   = -d $(SPHINX_BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOP
 
 .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
 
-if HAVE_RECENT_SPHINX
-
 man_MANS+= \
           docs/man/hashkit_crc32.3 \
           docs/man/hashkit_clone.3 \
@@ -265,109 +263,6 @@ man_MANS+= \
           docs/man/memslap.1 \
           docs/man/memstat.1
 
-DISTCLEANFILES+= \
-                docs/man/*
-
-docs/man/hashkit_clone.3: man
-docs/man/hashkit_crc32.3: man
-docs/man/hashkit_create.3: man
-docs/man/hashkit_fnv1_32.3: man
-docs/man/hashkit_fnv1_64.3: man
-docs/man/hashkit_fnv1a_32.3: man
-docs/man/hashkit_fnv1a_64.3: man
-docs/man/hashkit_free.3: man
-docs/man/hashkit_functions.3: man
-docs/man/hashkit_hsieh.3: man
-docs/man/hashkit_is_allocated.3: man
-docs/man/hashkit_jenkins.3: man
-docs/man/hashkit_md5.3: man
-docs/man/hashkit_murmur.3: man
-docs/man/hashkit_value.3: man
-docs/man/libmemcached.3: man
-docs/man/libmemcached_examples.3: man
-docs/man/libmemcachedutil.3: man
-docs/man/memcached_add.3: man
-docs/man/memcached_add_by_key.3: man
-docs/man/memcached_analyze.3: man
-docs/man/memcached_append.3: man
-docs/man/memcached_append_by_key.3: man
-docs/man/memcached_behavior_get.3: man
-docs/man/memcached_behavior_set.3: man
-docs/man/memcached_callback_get.3: man
-docs/man/memcached_callback_set.3: man
-docs/man/memcached_cas.3: man
-docs/man/memcached_cas_by_key.3: man
-docs/man/memcached_clone.3: man
-docs/man/memcached_create.3: man
-docs/man/memcached_decrement.3: man
-docs/man/memcached_decrement_with_initial.3: man
-docs/man/memcached_delete.3: man
-docs/man/memcached_delete_by_key.3: man
-docs/man/memcached_destroy_sasl_auth_data.3: man
-docs/man/memcached_dump.3: man
-docs/man/memcached_fetch.3: man
-docs/man/memcached_fetch_execute.3: man
-docs/man/memcached_fetch_result.3: man
-docs/man/memcached_flush_buffers.3: man
-docs/man/memcached_free.3: man
-docs/man/memcached_generate_hash_value.3: man
-docs/man/memcached_get.3: man
-docs/man/memcached_get_by_key.3: man
-docs/man/memcached_get_memory_allocators.3: man
-docs/man/memcached_get_sasl_callbacks.3: man
-docs/man/memcached_get_user_data.3: man
-docs/man/memcached_increment.3: man
-docs/man/memcached_increment_with_initial.3: man
-docs/man/memcached_lib_version.3: man
-docs/man/memcached_mget.3: man
-docs/man/memcached_mget_by_key.3: man
-docs/man/memcached_mget_execute.3: man
-docs/man/memcached_mget_execute_by_key.3: man
-docs/man/memcached_pool_behavior_get.3: man
-docs/man/memcached_pool_behavior_set.3: man
-docs/man/memcached_pool_create.3: man
-docs/man/memcached_pool_destroy.3: man
-docs/man/memcached_pool_pop.3: man
-docs/man/memcached_pool_push.3: man
-docs/man/memcached_prepend.3: man
-docs/man/memcached_prepend_by_key.3: man
-docs/man/memcached_quit.3: man
-docs/man/memcached_replace.3: man
-docs/man/memcached_replace_by_key.3: man
-docs/man/memcached_sasl_set_auth_data.3: man
-docs/man/memcached_server_add.3: man
-docs/man/memcached_server_count.3: man
-docs/man/memcached_server_cursor.3: man
-docs/man/memcached_server_list.3: man
-docs/man/memcached_server_list_append.3: man
-docs/man/memcached_server_list_count.3: man
-docs/man/memcached_server_list_free.3: man
-docs/man/memcached_server_push.3: man
-docs/man/memcached_servers_parse.3: man
-docs/man/memcached_set.3: man
-docs/man/memcached_set_by_key.3: man
-docs/man/memcached_set_memory_allocators.3: man
-docs/man/memcached_set_sasl_callbacks.3: man
-docs/man/memcached_set_user_data.3: man
-docs/man/memcached_stat.3: man
-docs/man/memcached_stat_execute.3: man
-docs/man/memcached_stat_get_keys.3: man
-docs/man/memcached_stat_get_value.3: man
-docs/man/memcached_stat_servername.3: man
-docs/man/memcached_strerror.3: man
-docs/man/memcached_verbosity.3: man
-docs/man/memcached_version.3: man
-docs/man/memcapable.1: man
-docs/man/memcat.1: man
-docs/man/memcp.1: man
-docs/man/memdump.1: man
-docs/man/memerror.1: man
-docs/man/memflush.1: man
-docs/man/memrm.1: man
-docs/man/memslap.1: man
-docs/man/memstat.1: man
-
-endif
 
 if HAVE_SPHINX
 sphinx-help:
index b8931239d8b2982c47b02823a762a5455e8946ec..8db8ebbd81b9801d3745b675367dd3575a0027a4 100644 (file)
@@ -11,113 +11,31 @@ Contents:
 .. toctree::
    :maxdepth: 2
 
-   hashkit_clone
    hashkit_create
    hashkit_functions
    hashkit_value
-   hashkit_crc32
-   hashkit_fnv1_32
-   hashkit_fnv1_64
-   hashkit_fnv1a_32
-   hashkit_fnv1a_64
-   hashkit_free
-   hashkit_hsieh
-   hashkit_is_allocated
-   hashkit_jenkins
-   hashkit_md5
-   hashkit_murmur
-   memcached_destroy_sasl_auth_data
-   memcached_get_sasl_callbacks
-   memcached_sasl_set_auth_data
-   memcached_set_sasl_callbacks
-   libmemcached
    libmemcached_examples
+   libmemcached
    libmemcachedutil
-   memcached_add
-   memcached_add_by_key
    memcached_analyze
-   memcached_append
-   memcached_append_by_key
    memcached_auto
    memcached_behavior
-   memcached_behavior_get
-   memcached_behavior_set
    memcached_callback
-   memcached_callback_get
-   memcached_callback_set
-   memcached_cas
-   memcached_cas_by_key
-   memcached_clone
    memcached_create
-   memcached_decrement
-   memcached_decrement_with_initial
    memcached_delete
-   memcached_delete_by_key
    memcached_dump
-   memcached_fetch
-   memcached_fetch_execute
-   memcached_fetch_result
-   memcached_flush
    memcached_flush_buffers
-   memcached_free
+   memcached_flush
    memcached_generate_hash_value
    memcached_get
-   memcached_get_by_key
-   memcached_get_memory_allocators
-   memcached_get_user_data
-   memcached_increment
-   memcached_increment_with_initial
-   memcached_lib_version
    memcached_memory_allocators
-   memcached_mget
-   memcached_mget_by_key
-   memcached_mget_execute
-   memcached_mget_execute_by_key
    memcached_pool
-   memcached_pool_behavior_get
-   memcached_pool_behavior_set
-   memcached_pool_create
-   memcached_pool_destroy
-   memcached_pool_push
-   memcached_pool_rst
-   memcached_prepend
-   memcached_prepend_by_key
    memcached_quit
-   memcached_replace
-   memcached_replace_by_key
-   memcached_result_cas
-   memcached_result_create
-   memcached_result_flags
-   memcached_result_free
-   memcached_result_key_length
-   memcached_result_key_value
-   memcached_result_length
    memcached_result_st
-   memcached_result_value
    memcached_sasl
-   memcached_server_add
-   memcached_server_add_unix_socket
-   memcached_server_count
-   memcached_server_cursor
-   memcached_server_list
-   memcached_server_list_append
-   memcached_server_list_count
-   memcached_server_list_free
-   memcached_server_push
-   memcached_server_st
    memcached_servers
-   memcached_servers_parse
-   memcached_servers_reset
+   memcached_server_st
    memcached_set
-   memcached_set_by_key
-   memcached_set_memory_allocators
-   memcached_set_memory_allocators_context
-   memcached_set_user_data
-   memcached_stat
-   memcached_stat_execute
-   memcached_stat_get_keys
-   memcached_stat_get_value
-   memcached_stat_servername
    memcached_stats
    memcached_strerror
    memcached_user_data
index eb5656f725be9ec3fac27d0455770479ba06bbda..5baaad7584fccee327170f1fa6a5de42f068183b 100644 (file)
@@ -24,7 +24,7 @@ SYNOPSIS
 
 .. code-block:: perl
 
-   #include <memcached.h>
+   #include <libmemcached/memcached.h>
 
 
 
diff --git a/docs/man/hashkit_clone.3 b/docs/man/hashkit_clone.3
new file mode 100644 (file)
index 0000000..9c83fea
--- /dev/null
@@ -0,0 +1,90 @@
+.TH "HASHKIT_CLONE" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+hashkit_clone \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Create and destroy hashkit objects
+.SH LIBRARY
+.sp
+C Library for hashing algorithms (libhashkit, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libhashkit/hashkit.h>
+
+hashkit_st *hashkit_create(hashkit_st *hash);
+
+hashkit_st *hashkit_clone(hashkit_st *destination, const hashkit_st *ptr);
+
+void hashkit_free(hashkit_st *hash);
+
+bool hashkit_is_allocated(const hashkit_st *hash);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+The hashkit_create() function initializes a hashkit object for use. If
+you pass a NULL argument for hash, then the memory for the object is
+allocated. If you specify a pre\-allocated piece of memory, that is
+initialized for use.
+.sp
+The hashkit_clone() function initializes a hashkit object much like
+hashkit_create(), but instead of using default settings it will use
+the settings of the ptr hashkit object.
+.sp
+The hashkit_free() frees any resources being consumed by the hashkit
+objects that were initialized with hashkit_create() or hashkit_clone().
+.sp
+The hashkit_is_allocated() reports where the memory was allocated
+for a hashkit object.
+.SH RETURN VALUE
+.sp
+hashkit_create() and hashkit_clone() will return NULL on failure or
+non\-NULL on success.
+.sp
+hashkit_is_allocated() returns true if the memory for the hashkit
+object was allocated inside of hashkit_create() or hashkit_clone(),
+otherwise it is false and was user\-supplied memory.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/hashkit_crc32.3 b/docs/man/hashkit_crc32.3
new file mode 100644 (file)
index 0000000..2aa8c98
--- /dev/null
@@ -0,0 +1,84 @@
+.TH "HASHKIT_CRC32" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+hashkit_crc32 \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Various hash functions to use for calculating values for keys
+.SH LIBRARY
+.sp
+C Library for hashing algorithms (libhashkit, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libhashkit/hashkit.h>
+
+uint32_t hashkit_default(const char *key, size_t key_length);
+uint32_t hashkit_fnv1_64(const char *key, size_t key_length);
+uint32_t hashkit_fnv1a_64(const char *key, size_t key_length);
+uint32_t hashkit_fnv1_32(const char *key, size_t key_length);
+uint32_t hashkit_fnv1a_32(const char *key, size_t key_length);
+uint32_t hashkit_crc32(const char *key, size_t key_length);
+uint32_t hashkit_hsieh(const char *key, size_t key_length);
+uint32_t hashkit_murmur(const char *key, size_t key_length);
+uint32_t hashkit_jenkins(const char *key, size_t key_length);
+uint32_t hashkit_md5(const char *key, size_t key_length);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+These functions generate hash values from a key using a variety of
+algorithms. These functions can be used standalone, or as arguments
+to hashkit_set_hash_fn(3) or hashkit_set_continuum_hash_fn(3).
+.sp
+The hashkit_hsieh() is only available if the library is built with
+the appropriate flag enabled.
+.SH RETURN VALUE
+.sp
+A 32\-bit hash value.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+hashkit_create(3) hashkit_value(3) hashkit_set_hash_fn(3)
+hashkit_set_continuum_hash_fn(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/hashkit_create.3 b/docs/man/hashkit_create.3
new file mode 100644 (file)
index 0000000..c795c31
--- /dev/null
@@ -0,0 +1,90 @@
+.TH "HASHKIT_CREATE" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+hashkit_create \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Create and destroy hashkit objects
+.SH LIBRARY
+.sp
+C Library for hashing algorithms (libhashkit, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libhashkit/hashkit.h>
+
+hashkit_st *hashkit_create(hashkit_st *hash);
+
+hashkit_st *hashkit_clone(hashkit_st *destination, const hashkit_st *ptr);
+
+void hashkit_free(hashkit_st *hash);
+
+bool hashkit_is_allocated(const hashkit_st *hash);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+The hashkit_create() function initializes a hashkit object for use. If
+you pass a NULL argument for hash, then the memory for the object is
+allocated. If you specify a pre\-allocated piece of memory, that is
+initialized for use.
+.sp
+The hashkit_clone() function initializes a hashkit object much like
+hashkit_create(), but instead of using default settings it will use
+the settings of the ptr hashkit object.
+.sp
+The hashkit_free() frees any resources being consumed by the hashkit
+objects that were initialized with hashkit_create() or hashkit_clone().
+.sp
+The hashkit_is_allocated() reports where the memory was allocated
+for a hashkit object.
+.SH RETURN VALUE
+.sp
+hashkit_create() and hashkit_clone() will return NULL on failure or
+non\-NULL on success.
+.sp
+hashkit_is_allocated() returns true if the memory for the hashkit
+object was allocated inside of hashkit_create() or hashkit_clone(),
+otherwise it is false and was user\-supplied memory.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/hashkit_fnv1_32.3 b/docs/man/hashkit_fnv1_32.3
new file mode 100644 (file)
index 0000000..177b872
--- /dev/null
@@ -0,0 +1,84 @@
+.TH "HASHKIT_FNV1_32" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+hashkit_fnv1_32 \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Various hash functions to use for calculating values for keys
+.SH LIBRARY
+.sp
+C Library for hashing algorithms (libhashkit, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libhashkit/hashkit.h>
+
+uint32_t hashkit_default(const char *key, size_t key_length);
+uint32_t hashkit_fnv1_64(const char *key, size_t key_length);
+uint32_t hashkit_fnv1a_64(const char *key, size_t key_length);
+uint32_t hashkit_fnv1_32(const char *key, size_t key_length);
+uint32_t hashkit_fnv1a_32(const char *key, size_t key_length);
+uint32_t hashkit_crc32(const char *key, size_t key_length);
+uint32_t hashkit_hsieh(const char *key, size_t key_length);
+uint32_t hashkit_murmur(const char *key, size_t key_length);
+uint32_t hashkit_jenkins(const char *key, size_t key_length);
+uint32_t hashkit_md5(const char *key, size_t key_length);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+These functions generate hash values from a key using a variety of
+algorithms. These functions can be used standalone, or as arguments
+to hashkit_set_hash_fn(3) or hashkit_set_continuum_hash_fn(3).
+.sp
+The hashkit_hsieh() is only available if the library is built with
+the appropriate flag enabled.
+.SH RETURN VALUE
+.sp
+A 32\-bit hash value.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+hashkit_create(3) hashkit_value(3) hashkit_set_hash_fn(3)
+hashkit_set_continuum_hash_fn(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/hashkit_fnv1_64.3 b/docs/man/hashkit_fnv1_64.3
new file mode 100644 (file)
index 0000000..382e1aa
--- /dev/null
@@ -0,0 +1,84 @@
+.TH "HASHKIT_FNV1_64" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+hashkit_fnv1_64 \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Various hash functions to use for calculating values for keys
+.SH LIBRARY
+.sp
+C Library for hashing algorithms (libhashkit, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libhashkit/hashkit.h>
+
+uint32_t hashkit_default(const char *key, size_t key_length);
+uint32_t hashkit_fnv1_64(const char *key, size_t key_length);
+uint32_t hashkit_fnv1a_64(const char *key, size_t key_length);
+uint32_t hashkit_fnv1_32(const char *key, size_t key_length);
+uint32_t hashkit_fnv1a_32(const char *key, size_t key_length);
+uint32_t hashkit_crc32(const char *key, size_t key_length);
+uint32_t hashkit_hsieh(const char *key, size_t key_length);
+uint32_t hashkit_murmur(const char *key, size_t key_length);
+uint32_t hashkit_jenkins(const char *key, size_t key_length);
+uint32_t hashkit_md5(const char *key, size_t key_length);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+These functions generate hash values from a key using a variety of
+algorithms. These functions can be used standalone, or as arguments
+to hashkit_set_hash_fn(3) or hashkit_set_continuum_hash_fn(3).
+.sp
+The hashkit_hsieh() is only available if the library is built with
+the appropriate flag enabled.
+.SH RETURN VALUE
+.sp
+A 32\-bit hash value.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+hashkit_create(3) hashkit_value(3) hashkit_set_hash_fn(3)
+hashkit_set_continuum_hash_fn(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/hashkit_fnv1a_32.3 b/docs/man/hashkit_fnv1a_32.3
new file mode 100644 (file)
index 0000000..7efe6cd
--- /dev/null
@@ -0,0 +1,84 @@
+.TH "HASHKIT_FNV1A_32" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+hashkit_fnv1a_32 \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Various hash functions to use for calculating values for keys
+.SH LIBRARY
+.sp
+C Library for hashing algorithms (libhashkit, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libhashkit/hashkit.h>
+
+uint32_t hashkit_default(const char *key, size_t key_length);
+uint32_t hashkit_fnv1_64(const char *key, size_t key_length);
+uint32_t hashkit_fnv1a_64(const char *key, size_t key_length);
+uint32_t hashkit_fnv1_32(const char *key, size_t key_length);
+uint32_t hashkit_fnv1a_32(const char *key, size_t key_length);
+uint32_t hashkit_crc32(const char *key, size_t key_length);
+uint32_t hashkit_hsieh(const char *key, size_t key_length);
+uint32_t hashkit_murmur(const char *key, size_t key_length);
+uint32_t hashkit_jenkins(const char *key, size_t key_length);
+uint32_t hashkit_md5(const char *key, size_t key_length);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+These functions generate hash values from a key using a variety of
+algorithms. These functions can be used standalone, or as arguments
+to hashkit_set_hash_fn(3) or hashkit_set_continuum_hash_fn(3).
+.sp
+The hashkit_hsieh() is only available if the library is built with
+the appropriate flag enabled.
+.SH RETURN VALUE
+.sp
+A 32\-bit hash value.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+hashkit_create(3) hashkit_value(3) hashkit_set_hash_fn(3)
+hashkit_set_continuum_hash_fn(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/hashkit_fnv1a_64.3 b/docs/man/hashkit_fnv1a_64.3
new file mode 100644 (file)
index 0000000..ec613ec
--- /dev/null
@@ -0,0 +1,84 @@
+.TH "HASHKIT_FNV1A_64" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+hashkit_fnv1a_64 \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Various hash functions to use for calculating values for keys
+.SH LIBRARY
+.sp
+C Library for hashing algorithms (libhashkit, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libhashkit/hashkit.h>
+
+uint32_t hashkit_default(const char *key, size_t key_length);
+uint32_t hashkit_fnv1_64(const char *key, size_t key_length);
+uint32_t hashkit_fnv1a_64(const char *key, size_t key_length);
+uint32_t hashkit_fnv1_32(const char *key, size_t key_length);
+uint32_t hashkit_fnv1a_32(const char *key, size_t key_length);
+uint32_t hashkit_crc32(const char *key, size_t key_length);
+uint32_t hashkit_hsieh(const char *key, size_t key_length);
+uint32_t hashkit_murmur(const char *key, size_t key_length);
+uint32_t hashkit_jenkins(const char *key, size_t key_length);
+uint32_t hashkit_md5(const char *key, size_t key_length);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+These functions generate hash values from a key using a variety of
+algorithms. These functions can be used standalone, or as arguments
+to hashkit_set_hash_fn(3) or hashkit_set_continuum_hash_fn(3).
+.sp
+The hashkit_hsieh() is only available if the library is built with
+the appropriate flag enabled.
+.SH RETURN VALUE
+.sp
+A 32\-bit hash value.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+hashkit_create(3) hashkit_value(3) hashkit_set_hash_fn(3)
+hashkit_set_continuum_hash_fn(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/hashkit_free.3 b/docs/man/hashkit_free.3
new file mode 100644 (file)
index 0000000..d016b89
--- /dev/null
@@ -0,0 +1,90 @@
+.TH "HASHKIT_FREE" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+hashkit_free \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Create and destroy hashkit objects
+.SH LIBRARY
+.sp
+C Library for hashing algorithms (libhashkit, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libhashkit/hashkit.h>
+
+hashkit_st *hashkit_create(hashkit_st *hash);
+
+hashkit_st *hashkit_clone(hashkit_st *destination, const hashkit_st *ptr);
+
+void hashkit_free(hashkit_st *hash);
+
+bool hashkit_is_allocated(const hashkit_st *hash);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+The hashkit_create() function initializes a hashkit object for use. If
+you pass a NULL argument for hash, then the memory for the object is
+allocated. If you specify a pre\-allocated piece of memory, that is
+initialized for use.
+.sp
+The hashkit_clone() function initializes a hashkit object much like
+hashkit_create(), but instead of using default settings it will use
+the settings of the ptr hashkit object.
+.sp
+The hashkit_free() frees any resources being consumed by the hashkit
+objects that were initialized with hashkit_create() or hashkit_clone().
+.sp
+The hashkit_is_allocated() reports where the memory was allocated
+for a hashkit object.
+.SH RETURN VALUE
+.sp
+hashkit_create() and hashkit_clone() will return NULL on failure or
+non\-NULL on success.
+.sp
+hashkit_is_allocated() returns true if the memory for the hashkit
+object was allocated inside of hashkit_create() or hashkit_clone(),
+otherwise it is false and was user\-supplied memory.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/hashkit_functions.3 b/docs/man/hashkit_functions.3
new file mode 100644 (file)
index 0000000..72006c0
--- /dev/null
@@ -0,0 +1,84 @@
+.TH "HASHKIT_FUNCTIONS" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+hashkit_functions \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Various hash functions to use for calculating values for keys
+.SH LIBRARY
+.sp
+C Library for hashing algorithms (libhashkit, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libhashkit/hashkit.h>
+
+uint32_t hashkit_default(const char *key, size_t key_length);
+uint32_t hashkit_fnv1_64(const char *key, size_t key_length);
+uint32_t hashkit_fnv1a_64(const char *key, size_t key_length);
+uint32_t hashkit_fnv1_32(const char *key, size_t key_length);
+uint32_t hashkit_fnv1a_32(const char *key, size_t key_length);
+uint32_t hashkit_crc32(const char *key, size_t key_length);
+uint32_t hashkit_hsieh(const char *key, size_t key_length);
+uint32_t hashkit_murmur(const char *key, size_t key_length);
+uint32_t hashkit_jenkins(const char *key, size_t key_length);
+uint32_t hashkit_md5(const char *key, size_t key_length);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+These functions generate hash values from a key using a variety of
+algorithms. These functions can be used standalone, or as arguments
+to hashkit_set_hash_fn(3) or hashkit_set_continuum_hash_fn(3).
+.sp
+The hashkit_hsieh() is only available if the library is built with
+the appropriate flag enabled.
+.SH RETURN VALUE
+.sp
+A 32\-bit hash value.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+hashkit_create(3) hashkit_value(3) hashkit_set_hash_fn(3)
+hashkit_set_continuum_hash_fn(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/hashkit_hsieh.3 b/docs/man/hashkit_hsieh.3
new file mode 100644 (file)
index 0000000..06eea99
--- /dev/null
@@ -0,0 +1,84 @@
+.TH "HASHKIT_HSIEH" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+hashkit_hsieh \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Various hash functions to use for calculating values for keys
+.SH LIBRARY
+.sp
+C Library for hashing algorithms (libhashkit, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libhashkit/hashkit.h>
+
+uint32_t hashkit_default(const char *key, size_t key_length);
+uint32_t hashkit_fnv1_64(const char *key, size_t key_length);
+uint32_t hashkit_fnv1a_64(const char *key, size_t key_length);
+uint32_t hashkit_fnv1_32(const char *key, size_t key_length);
+uint32_t hashkit_fnv1a_32(const char *key, size_t key_length);
+uint32_t hashkit_crc32(const char *key, size_t key_length);
+uint32_t hashkit_hsieh(const char *key, size_t key_length);
+uint32_t hashkit_murmur(const char *key, size_t key_length);
+uint32_t hashkit_jenkins(const char *key, size_t key_length);
+uint32_t hashkit_md5(const char *key, size_t key_length);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+These functions generate hash values from a key using a variety of
+algorithms. These functions can be used standalone, or as arguments
+to hashkit_set_hash_fn(3) or hashkit_set_continuum_hash_fn(3).
+.sp
+The hashkit_hsieh() is only available if the library is built with
+the appropriate flag enabled.
+.SH RETURN VALUE
+.sp
+A 32\-bit hash value.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+hashkit_create(3) hashkit_value(3) hashkit_set_hash_fn(3)
+hashkit_set_continuum_hash_fn(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/hashkit_is_allocated.3 b/docs/man/hashkit_is_allocated.3
new file mode 100644 (file)
index 0000000..27a64e6
--- /dev/null
@@ -0,0 +1,90 @@
+.TH "HASHKIT_IS_ALLOCATED" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+hashkit_is_allocated \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Create and destroy hashkit objects
+.SH LIBRARY
+.sp
+C Library for hashing algorithms (libhashkit, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libhashkit/hashkit.h>
+
+hashkit_st *hashkit_create(hashkit_st *hash);
+
+hashkit_st *hashkit_clone(hashkit_st *destination, const hashkit_st *ptr);
+
+void hashkit_free(hashkit_st *hash);
+
+bool hashkit_is_allocated(const hashkit_st *hash);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+The hashkit_create() function initializes a hashkit object for use. If
+you pass a NULL argument for hash, then the memory for the object is
+allocated. If you specify a pre\-allocated piece of memory, that is
+initialized for use.
+.sp
+The hashkit_clone() function initializes a hashkit object much like
+hashkit_create(), but instead of using default settings it will use
+the settings of the ptr hashkit object.
+.sp
+The hashkit_free() frees any resources being consumed by the hashkit
+objects that were initialized with hashkit_create() or hashkit_clone().
+.sp
+The hashkit_is_allocated() reports where the memory was allocated
+for a hashkit object.
+.SH RETURN VALUE
+.sp
+hashkit_create() and hashkit_clone() will return NULL on failure or
+non\-NULL on success.
+.sp
+hashkit_is_allocated() returns true if the memory for the hashkit
+object was allocated inside of hashkit_create() or hashkit_clone(),
+otherwise it is false and was user\-supplied memory.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/hashkit_jenkins.3 b/docs/man/hashkit_jenkins.3
new file mode 100644 (file)
index 0000000..871568e
--- /dev/null
@@ -0,0 +1,84 @@
+.TH "HASHKIT_JENKINS" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+hashkit_jenkins \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Various hash functions to use for calculating values for keys
+.SH LIBRARY
+.sp
+C Library for hashing algorithms (libhashkit, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libhashkit/hashkit.h>
+
+uint32_t hashkit_default(const char *key, size_t key_length);
+uint32_t hashkit_fnv1_64(const char *key, size_t key_length);
+uint32_t hashkit_fnv1a_64(const char *key, size_t key_length);
+uint32_t hashkit_fnv1_32(const char *key, size_t key_length);
+uint32_t hashkit_fnv1a_32(const char *key, size_t key_length);
+uint32_t hashkit_crc32(const char *key, size_t key_length);
+uint32_t hashkit_hsieh(const char *key, size_t key_length);
+uint32_t hashkit_murmur(const char *key, size_t key_length);
+uint32_t hashkit_jenkins(const char *key, size_t key_length);
+uint32_t hashkit_md5(const char *key, size_t key_length);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+These functions generate hash values from a key using a variety of
+algorithms. These functions can be used standalone, or as arguments
+to hashkit_set_hash_fn(3) or hashkit_set_continuum_hash_fn(3).
+.sp
+The hashkit_hsieh() is only available if the library is built with
+the appropriate flag enabled.
+.SH RETURN VALUE
+.sp
+A 32\-bit hash value.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+hashkit_create(3) hashkit_value(3) hashkit_set_hash_fn(3)
+hashkit_set_continuum_hash_fn(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/hashkit_md5.3 b/docs/man/hashkit_md5.3
new file mode 100644 (file)
index 0000000..a5400be
--- /dev/null
@@ -0,0 +1,84 @@
+.TH "HASHKIT_MD5" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+hashkit_md5 \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Various hash functions to use for calculating values for keys
+.SH LIBRARY
+.sp
+C Library for hashing algorithms (libhashkit, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libhashkit/hashkit.h>
+
+uint32_t hashkit_default(const char *key, size_t key_length);
+uint32_t hashkit_fnv1_64(const char *key, size_t key_length);
+uint32_t hashkit_fnv1a_64(const char *key, size_t key_length);
+uint32_t hashkit_fnv1_32(const char *key, size_t key_length);
+uint32_t hashkit_fnv1a_32(const char *key, size_t key_length);
+uint32_t hashkit_crc32(const char *key, size_t key_length);
+uint32_t hashkit_hsieh(const char *key, size_t key_length);
+uint32_t hashkit_murmur(const char *key, size_t key_length);
+uint32_t hashkit_jenkins(const char *key, size_t key_length);
+uint32_t hashkit_md5(const char *key, size_t key_length);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+These functions generate hash values from a key using a variety of
+algorithms. These functions can be used standalone, or as arguments
+to hashkit_set_hash_fn(3) or hashkit_set_continuum_hash_fn(3).
+.sp
+The hashkit_hsieh() is only available if the library is built with
+the appropriate flag enabled.
+.SH RETURN VALUE
+.sp
+A 32\-bit hash value.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+hashkit_create(3) hashkit_value(3) hashkit_set_hash_fn(3)
+hashkit_set_continuum_hash_fn(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/hashkit_murmur.3 b/docs/man/hashkit_murmur.3
new file mode 100644 (file)
index 0000000..e8ea61b
--- /dev/null
@@ -0,0 +1,84 @@
+.TH "HASHKIT_MURMUR" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+hashkit_murmur \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Various hash functions to use for calculating values for keys
+.SH LIBRARY
+.sp
+C Library for hashing algorithms (libhashkit, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libhashkit/hashkit.h>
+
+uint32_t hashkit_default(const char *key, size_t key_length);
+uint32_t hashkit_fnv1_64(const char *key, size_t key_length);
+uint32_t hashkit_fnv1a_64(const char *key, size_t key_length);
+uint32_t hashkit_fnv1_32(const char *key, size_t key_length);
+uint32_t hashkit_fnv1a_32(const char *key, size_t key_length);
+uint32_t hashkit_crc32(const char *key, size_t key_length);
+uint32_t hashkit_hsieh(const char *key, size_t key_length);
+uint32_t hashkit_murmur(const char *key, size_t key_length);
+uint32_t hashkit_jenkins(const char *key, size_t key_length);
+uint32_t hashkit_md5(const char *key, size_t key_length);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+These functions generate hash values from a key using a variety of
+algorithms. These functions can be used standalone, or as arguments
+to hashkit_set_hash_fn(3) or hashkit_set_continuum_hash_fn(3).
+.sp
+The hashkit_hsieh() is only available if the library is built with
+the appropriate flag enabled.
+.SH RETURN VALUE
+.sp
+A 32\-bit hash value.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+hashkit_create(3) hashkit_value(3) hashkit_set_hash_fn(3)
+hashkit_set_continuum_hash_fn(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/hashkit_value.3 b/docs/man/hashkit_value.3
new file mode 100644 (file)
index 0000000..7127204
--- /dev/null
@@ -0,0 +1,74 @@
+.TH "HASHKIT_VALUE" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+hashkit_value \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Generate a value for the given key
+.SH LIBRARY
+.sp
+C Library for hashing algorithms (libhashkit, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libhashkit/hashkit.h>
+
+uint32_t hashkit_value(hashkit_st *hash,
+                       const char *key,
+                       size_t key_length);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+The hashkit_value() function generates a 32\-bit hash value from the
+given key and key_length. The hash argument is an initialized hashkit
+object, and distribution type and hash function is used from this
+object while generating the value.
+.SH RETURN VALUE
+.sp
+A 32\-bit hash value.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+hashkit_create(3) hashkit_set_distribution(3) hashkit_set_hash_fn(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/libmemcached.3 b/docs/man/libmemcached.3
new file mode 100644 (file)
index 0000000..f8e8bc4
--- /dev/null
@@ -0,0 +1,187 @@
+.TH "LIBMEMCACHED" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+libmemcached \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Client library for memcached
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+"Memcached is a high\-performance, distributed memory object caching
+system, generic in nature, but intended for use in speeding up dynamic web
+applications by alleviating database load." \fI\%http://danga.com/memcached/\fP
+.sp
+\fBlibmemcached\fP is a small, thread\-safe client library for the
+memcached protocol. The code has all been written with an eye to allow
+for both web and embedded usage. It handles the work behind routing
+particular keys to specific servers that you specify (and values are
+matched based on server order as supplied by you). It implements both
+a modula and consistent method of object distribution.
+.sp
+There are multiple implemented routing and hashing methods. See the
+memcached_behavior_set() manpage.
+.sp
+All operations are performed against a \fBmemcached_st\fP structure.
+These structures can either be dynamically allocated or statically
+allocated and then initialized by memcached_create(). Functions have been
+written in order to encapsulate the \fBmemcached_st\fP. It is not
+recommended that you operate directly against the structure.
+.sp
+Nearly all functions return a \fBmemcached_return_t\fP value.
+This value can be translated to a printable string with memcached_strerror(3).
+.sp
+Partitioning based on keys is supported in the library. Using the key partioning
+functions it is possible to group sets of object onto servers.
+.sp
+\fBmemcached_st\fP structures are thread\-safe, but each thread must
+contain its own structure (that is, if you want to share these among
+threads you must provide your own locking). No global variables are
+used in this library.
+.sp
+If you are working with GNU autotools you will want to add the following to
+your configure.ac to properly include libmemcached in your application.
+.sp
+PKG_CHECK_MODULES(DEPS, libmemcached >= 0.8.0)
+AC_SUBST(DEPS_CFLAGS)
+AC_SUBST(DEPS_LIBS)
+.sp
+Some features of the library must be enabled through memcached_behavior_set().
+.sp
+Hope you enjoy it!
+.SH CONSTANTS
+.sp
+A number of constants have been provided for in the library.
+.sp
+MEMCACHED_DEFAULT_PORT
+.INDENT 0.0
+.INDENT 3.5
+.sp
+The default port used by memcached(3).
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_MAX_KEY
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Default maximum size of a key (which includes the null pointer). Master keys
+have no limit, this only applies to keys used for storage.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_MAX_KEY
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Default size of key (which includes the null pointer).
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_STRIDE
+.INDENT 0.0
+.INDENT 3.5
+.sp
+This is the "stride" used in the consistent hash used between replicas.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_MAX_HOST_LENGTH
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Maximum allowed size of the hostname.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_VERSION_STRING
+.INDENT 0.0
+.INDENT 3.5
+.sp
+String value of libmemcached version such as "1.23.4"
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_MAJOR_VERSION
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Major version value. Such as 1.23.4, would be 1
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_MINOR_VERSION
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Major version value. Such as 1.23.4, would be 23
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_MICRO_VERSION
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Major version value. Such as 1.23.4, would be 4
+.UNINDENT
+.UNINDENT
+.SH THREADS AND PROCESSES
+.sp
+When using threads or forked processes it is important to keep an instance
+of \fBmemcached_st\fP per process or thread. Without creating your own locking
+structures you can not share a single \fBmemcached_st\fP. You can though call
+memcached_quit(3) on a \fBmemcached_st\fP and then use the resulting cloned
+structure.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached_examples(3) libmemcached(1) memcat(1) memcp(1) memflush(1) memrm(1) memslap(1) memstat(1) memcached_fetch(3) memcached_replace(3) memcached_server_list_free(3) libmemcached_examples(3) memcached_clone(3) memcached_free(3) memcached_server_add(3) memcached_server_push(3) memcached_add(3) memcached_get(3) memcached_server_count(3) memcached_servers_parse(3) memcached_create(3) memcached_increment(3) memcached_server_list(3) memcached_set(3) memcached_decrement(3) memcached_mget(3) memcached_server_list_append(3) memcached_strerror(3) memcached_delete(3) memcached_quit(3) memcached_server_list_count(3) memcached_verbosity(3) memcached_server_add_unix_socket(3) memcached_result_create(3)  memcached_result_free(3)  memcached_result_key_value(3)  memcached_result_key_length(3)  memcached_result_value(3)  memcached_result_length(3)  memcached_result_flags(3)  memcached_result_cas(3) memcached_result_st(3) memcached_append(3) memcached_prepend(3) memcached_fetch_result(3) memerror(1) memcached_get_by_key(3) memcached_mget_by_key(3) memcached_delete_by_key(3) memcached_fetch_execute(3) memcached_callback_get(3) memcached_callback_set(3) memcached_version(3) memcached_lib_version(3) memcached_result_set_value(3) memcached_dump(3) memdump(1) memcached_set_memory_allocators(3) memcached_get_memory_allocators(3) memcached_get_user_data(3) memcached_set_user_data(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/libmemcached_examples.3 b/docs/man/libmemcached_examples.3
new file mode 100644 (file)
index 0000000..621116d
--- /dev/null
@@ -0,0 +1,156 @@
+.TH "LIBMEMCACHED_EXAMPLES" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+libmemcached_examples \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Examples for libmemcached
+.SH DESCRIPTION
+.sp
+For full examples, test cases are found in tests/*.c in the main
+distribution. These are always up to date, and are used for each test run of
+the library.
+.SS Creating and Freeing structure
+.sp
+.nf
+.ft C
+memcached_st *memc;
+memcached_return_t rc;
+
+memc= memcached_create(NULL);
+\&...do stuff...
+memcached_free(memc);
+.ft P
+.fi
+.sp
+The above code would create a connection and then free the connection when
+finished.
+.SS Connecting to servers
+.sp
+.nf
+.ft C
+memcached_server_st *servers;
+memcached_st *memc= memcached_create(NULL);
+char servername[]= "0.example.com";
+
+servers= memcached_server_list_append(NULL, servername, 400, &rc);
+
+for (x= 0; x < 20; x++)
+{
+  char buffer[SMALL_STRING_LEN];
+
+  snprintf(buffer, SMALL_STRING_LEN, "%u.example.com", 400+x);
+  servers= memcached_server_list_append(servers, buffer, 401, &rc);
+}
+rc= memcached_server_push(memc, servers);
+memcached_server_free(servers);
+memcached_free(memc);
+.ft P
+.fi
+.sp
+In the above code you create a \fBmemcached_st\fP object that you then feed in a
+single host into. In the for loop you build a \fBmemcached_server_st\fPpointer that you then later feed via memcached_server_push() into the
+\fBmemcached_st\fP structure.
+.sp
+You can reuse the \fBmemcached_server_st\fP object with multile \fBmemcached_st\fPstructures.
+.SS Adding a value to the server
+.sp
+.nf
+.ft C
+char *key= "foo";
+char *value;
+size_t value_length= 8191;
+unsigned int x;
+
+value = (char*)malloc(value_length);
+assert(value);
+
+for (x= 0; x < value_length; x++)
+value[x] = (char) (x % 127);
+
+for (x= 0; x < 1; x++)
+{
+  rc= memcached_set(memc, key, strlen(key),
+  value, value_length,
+  (time_t)0, (uint32_t)0);
+  assert(rc == MEMCACHED_SUCCESS);
+}
+
+free(value);
+.ft P
+.fi
+.sp
+It is best practice to always look at the return value of any operation.
+.SS Fetching multiple values
+.sp
+.nf
+.ft C
+memcached_return_t rc;
+char *keys[]= {"fudge", "son", "food"};
+size_t key_length[]= {5, 3, 4};
+unsigned int x;
+uint32_t flags;
+
+char return_key[MEMCACHED_MAX_KEY];
+size_t return_key_length;
+char *return_value;
+size_t return_value_length;
+
+rc= memcached_mget(memc, keys, key_length, 3);
+
+x= 0;
+while ((return_value= memcached_fetch(memc, return_key, &return_key_length,
+                                      &return_value_length, &flags, &rc)))
+{
+  free(return_value);
+  x++;
+}
+.ft P
+.fi
+.sp
+Notice that you freed values returned from memcached_fetch(). The define
+\fBMEMCACHED_MAX_KEY\fP is provided for usage.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/libmemcachedutil.3 b/docs/man/libmemcachedutil.3
new file mode 100644 (file)
index 0000000..ab0d7ea
--- /dev/null
@@ -0,0 +1,73 @@
+.TH "LIBMEMCACHEDUTIL" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+libmemcachedutil \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+libmemcachedutil \- Utility library for libmemcached
+.SH LIBRARY
+.sp
+C Client Library containing utility functions for libmemcached (libmemcachedutil, \-lmemcachedutil)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+cc [ flag ... ] file ... \-lmemcachedutil
+
+#include <libmemcached/memcached_util.h>
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+\fBlibmemcachedutil\fP is a small and thread\-safe client library that provides
+extra functionality built on top of \fBlibmemcached\fP.
+.SH THREADS
+.sp
+Do not try to access an instance of \fBmemcached_st\fP from multiple threads
+at the same time. If you want to access memcached from multiple threads
+you should either clone the \fBmemcached_st\fP, or use the memcached pool
+implementation. see memcached_pool_create(3).
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+libmemcached(3) memcached_pool_create(3) memcached_pool_destroy(3) memcached_pool_pop(3) memcached_pool_push(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_add.3 b/docs/man/memcached_add.3
new file mode 100644 (file)
index 0000000..7457d38
--- /dev/null
@@ -0,0 +1,216 @@
+.TH "MEMCACHED_ADD" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_add \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Store value on server
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_set (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 const char *value, size_t value_length,
+                 time_t expiration,
+                 uint32_t flags);
+
+memcached_return_t
+  memcached_add (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 const char *value, size_t value_length,
+                 time_t expiration,
+                 uint32_t flags);
+
+memcached_return_t
+  memcached_replace (memcached_st *ptr,
+                     const char *key, size_t key_length,
+                     const char *value, size_t value_length,
+                     time_t expiration,
+                     uint32_t flags);
+
+memcached_return_t
+  memcached_prepend(memcached_st *ptr,
+                    const char *key, size_t key_length,
+                    const char *value, size_t value_length,
+                    time_t expiration,
+                    uint32_t flags)
+
+memcached_return_t
+  memcached_append(memcached_st *ptr,
+                   const char *key, size_t key_length,
+                    const char *value, size_t value_length,
+                    time_t expiration,
+                    uint32_t flags)
+memcached_return_t
+  memcached_cas(memcached_st *ptr,
+                const char *key, size_t key_length,
+                const char *value, size_t value_length,
+                time_t expiration,
+                uint32_t flags,
+                uint64_t cas);
+
+memcached_return_t
+  memcached_set_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags);
+
+memcached_return_t
+  memcached_add_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags);
+
+memcached_return_t
+  memcached_replace_by_key(memcached_st *ptr,
+                           const char *master_key, size_t master_key_length,
+                           const char *key, size_t key_length,
+                           const char *value, size_t value_length,
+                           time_t expiration,
+                           uint32_t flags);
+
+memcached_return_t
+  memcached_prepend_by_key(memcached_st *ptr,
+                           const char *master_key, size_t master_key_length,
+                           const char *key, size_t key_length,
+                           const char *value, size_t value_length,
+                           time_t expiration,
+                           uint32_t flags);
+
+memcached_return_t
+  memcached_append_by_key(memcached_st *ptr,
+                          const char *master_key, size_t master_key_length,
+                          const char *key, size_t key_length,
+                          const char *value, size_t value_length,
+                          time_t expiration,
+                          uint32_t flags);
+
+memcached_return_t
+  memcached_cas_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags,
+                       uint64_t cas);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_set(), memcached_add(), and memcached_replace() are all used to
+store information on the server. All methods take a key, and its length to
+store the object. Keys are currently limited to 250 characters by the
+memcached(1) server. You must also supply a value and a length. Optionally you
+may support an expiration time for the object and a 16 byte value (it is
+meant to be used as a bitmap).
+.sp
+memcached_set() will write an object to the server. If an object already
+exists it will overwrite what is in the server. If the object does not exist
+it will be written. If you are using the non\-blocking mode this function
+will always return true unless a network error occurs.
+.sp
+memcached_replace() replaces an object on the server. If the object is not
+found on the server an error occurs.
+.sp
+memcached_add() adds an object to the server. If the object is found on the
+server an error occurs, otherwise the value is stored.
+.sp
+memcached_prepend() places a segment of data before the last piece of data
+stored. Currently expiration and key are not used in the server.
+.sp
+memcached_append() places a segment of data at the end of the last piece of
+data stored. Currently expiration and key are not used in the server.
+.sp
+memcached_cas() overwrites data in the server as long as the "cas" value is
+still the same in the server. You can get the cas value of a result by
+calling memcached_result_cas() on a memcached_result_st(3) structure. At the point
+that this note was written cas is still buggy in memached. Turning on support
+for it in libmemcached(3) is optional. Please see memcached_set() for
+information on how to do this.
+.sp
+memcached_set_by_key(), memcached_add_by_key(), memcached_replace_by_key(),
+memcached_prepend_by_key(), memcached_append_by_key_by_key(),
+memcached_cas_by_key() methods all behave in a similar method as the non key
+methods. The difference is that they use their master_key parameter to map
+objects to particular servers.
+.sp
+If you are looking for performance, memcached_set() with non\-blocking IO is
+the fastest way to store data on the server.
+.sp
+All of the above functions are supported with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPbehavior enabled. But when using these operations with this behavior on, there
+are limits to the size of the payload being sent to the server.  The reason for
+these limits is that the Memcahed Server does not allow multi\-datagram requests
+and the current server implementation sets a datagram size to 1400 bytes. Due
+to protocol overhead, the actual limit of the user supplied data is less than
+1400 bytes and depends on the protocol in use as well as the operation being
+executed. When running with the binary protocol, \(ga\(ga MEMCACHED_BEHAVIOR_BINARY_PROTOCOL\(ga\(ga,
+the size of the key,value, flags and expiry combined may not exceed 1368 bytes.
+When running with the ASCII protocol, the exact limit fluctuates depending on
+which function is being executed and whether the function is a cas operation
+or not. For non\-cas ASCII set operations, there are at least 1335 bytes available
+to split among the key, key_prefix, and value; for cas ASCII operations there are
+at least 1318 bytes available to split among the key, key_prefix and value. If the
+total size of the command, including overhead, exceeds 1400 bytes, a \fBMEMCACHED_WRITE_FAILURE\fPwill be returned.
+.SH RETURN
+.sp
+All methods return a value of type \fBmemcached_return_t\fP.
+On success the value will be \fBMEMCACHED_SUCCESS\fP.
+Use memcached_strerror() to translate this value to a printable string.
+.sp
+For memcached_replace() and memcached_add(), \fBMEMCACHED_NOTSTORED\fP is a
+legitmate error in the case of a collision.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_add_by_key.3 b/docs/man/memcached_add_by_key.3
new file mode 100644 (file)
index 0000000..15bdbca
--- /dev/null
@@ -0,0 +1,216 @@
+.TH "MEMCACHED_ADD_BY_KEY" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_add_by_key \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Store value on server
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_set (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 const char *value, size_t value_length,
+                 time_t expiration,
+                 uint32_t flags);
+
+memcached_return_t
+  memcached_add (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 const char *value, size_t value_length,
+                 time_t expiration,
+                 uint32_t flags);
+
+memcached_return_t
+  memcached_replace (memcached_st *ptr,
+                     const char *key, size_t key_length,
+                     const char *value, size_t value_length,
+                     time_t expiration,
+                     uint32_t flags);
+
+memcached_return_t
+  memcached_prepend(memcached_st *ptr,
+                    const char *key, size_t key_length,
+                    const char *value, size_t value_length,
+                    time_t expiration,
+                    uint32_t flags)
+
+memcached_return_t
+  memcached_append(memcached_st *ptr,
+                   const char *key, size_t key_length,
+                    const char *value, size_t value_length,
+                    time_t expiration,
+                    uint32_t flags)
+memcached_return_t
+  memcached_cas(memcached_st *ptr,
+                const char *key, size_t key_length,
+                const char *value, size_t value_length,
+                time_t expiration,
+                uint32_t flags,
+                uint64_t cas);
+
+memcached_return_t
+  memcached_set_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags);
+
+memcached_return_t
+  memcached_add_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags);
+
+memcached_return_t
+  memcached_replace_by_key(memcached_st *ptr,
+                           const char *master_key, size_t master_key_length,
+                           const char *key, size_t key_length,
+                           const char *value, size_t value_length,
+                           time_t expiration,
+                           uint32_t flags);
+
+memcached_return_t
+  memcached_prepend_by_key(memcached_st *ptr,
+                           const char *master_key, size_t master_key_length,
+                           const char *key, size_t key_length,
+                           const char *value, size_t value_length,
+                           time_t expiration,
+                           uint32_t flags);
+
+memcached_return_t
+  memcached_append_by_key(memcached_st *ptr,
+                          const char *master_key, size_t master_key_length,
+                          const char *key, size_t key_length,
+                          const char *value, size_t value_length,
+                          time_t expiration,
+                          uint32_t flags);
+
+memcached_return_t
+  memcached_cas_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags,
+                       uint64_t cas);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_set(), memcached_add(), and memcached_replace() are all used to
+store information on the server. All methods take a key, and its length to
+store the object. Keys are currently limited to 250 characters by the
+memcached(1) server. You must also supply a value and a length. Optionally you
+may support an expiration time for the object and a 16 byte value (it is
+meant to be used as a bitmap).
+.sp
+memcached_set() will write an object to the server. If an object already
+exists it will overwrite what is in the server. If the object does not exist
+it will be written. If you are using the non\-blocking mode this function
+will always return true unless a network error occurs.
+.sp
+memcached_replace() replaces an object on the server. If the object is not
+found on the server an error occurs.
+.sp
+memcached_add() adds an object to the server. If the object is found on the
+server an error occurs, otherwise the value is stored.
+.sp
+memcached_prepend() places a segment of data before the last piece of data
+stored. Currently expiration and key are not used in the server.
+.sp
+memcached_append() places a segment of data at the end of the last piece of
+data stored. Currently expiration and key are not used in the server.
+.sp
+memcached_cas() overwrites data in the server as long as the "cas" value is
+still the same in the server. You can get the cas value of a result by
+calling memcached_result_cas() on a memcached_result_st(3) structure. At the point
+that this note was written cas is still buggy in memached. Turning on support
+for it in libmemcached(3) is optional. Please see memcached_set() for
+information on how to do this.
+.sp
+memcached_set_by_key(), memcached_add_by_key(), memcached_replace_by_key(),
+memcached_prepend_by_key(), memcached_append_by_key_by_key(),
+memcached_cas_by_key() methods all behave in a similar method as the non key
+methods. The difference is that they use their master_key parameter to map
+objects to particular servers.
+.sp
+If you are looking for performance, memcached_set() with non\-blocking IO is
+the fastest way to store data on the server.
+.sp
+All of the above functions are supported with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPbehavior enabled. But when using these operations with this behavior on, there
+are limits to the size of the payload being sent to the server.  The reason for
+these limits is that the Memcahed Server does not allow multi\-datagram requests
+and the current server implementation sets a datagram size to 1400 bytes. Due
+to protocol overhead, the actual limit of the user supplied data is less than
+1400 bytes and depends on the protocol in use as well as the operation being
+executed. When running with the binary protocol, \(ga\(ga MEMCACHED_BEHAVIOR_BINARY_PROTOCOL\(ga\(ga,
+the size of the key,value, flags and expiry combined may not exceed 1368 bytes.
+When running with the ASCII protocol, the exact limit fluctuates depending on
+which function is being executed and whether the function is a cas operation
+or not. For non\-cas ASCII set operations, there are at least 1335 bytes available
+to split among the key, key_prefix, and value; for cas ASCII operations there are
+at least 1318 bytes available to split among the key, key_prefix and value. If the
+total size of the command, including overhead, exceeds 1400 bytes, a \fBMEMCACHED_WRITE_FAILURE\fPwill be returned.
+.SH RETURN
+.sp
+All methods return a value of type \fBmemcached_return_t\fP.
+On success the value will be \fBMEMCACHED_SUCCESS\fP.
+Use memcached_strerror() to translate this value to a printable string.
+.sp
+For memcached_replace() and memcached_add(), \fBMEMCACHED_NOTSTORED\fP is a
+legitmate error in the case of a collision.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_analyze.3 b/docs/man/memcached_analyze.3
new file mode 100644 (file)
index 0000000..fef3988
--- /dev/null
@@ -0,0 +1,86 @@
+.TH "MEMCACHED_ANALYZE" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_analyze \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Analyze server information
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_analysis_st *
+  memcached_analyze (memcached_st *ptr,
+                     memcached_stat_st *stat,
+                     memcached_return_t *error);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) has the ability to query a memcached server (or collection
+of servers) for their current state. Queries to find state return a
+\fBmemcached_analysis_st\fP structure. You are responsible for freeing this structure.
+.sp
+memcached_analyze() analyzes useful information based on the provided servers
+and sets the result to the \fBmemcached_analysis_st\fP structure. The return value
+must be freed by the calling application.
+.sp
+A command line tool, memstat(1) with the option \-\-analyze, is provided so that
+you do not have to write an application to use this method.
+.SH RETURN
+.sp
+A pointer to the allocated \fBmemcached_analysis_st\fP structure on success and
+a NULL pointer on failure. You may inspect the error detail by checking the
+\fBmemcached_return_t\fP value.
+.sp
+Any method returning a \fBmemcached_analysis_st\fP expects you to free the
+memory allocated for it.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Toru Maesaka, <\fI\%dev@torum.net\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_append.3 b/docs/man/memcached_append.3
new file mode 100644 (file)
index 0000000..b7c0e4a
--- /dev/null
@@ -0,0 +1,216 @@
+.TH "MEMCACHED_APPEND" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_append \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Store value on server
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_set (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 const char *value, size_t value_length,
+                 time_t expiration,
+                 uint32_t flags);
+
+memcached_return_t
+  memcached_add (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 const char *value, size_t value_length,
+                 time_t expiration,
+                 uint32_t flags);
+
+memcached_return_t
+  memcached_replace (memcached_st *ptr,
+                     const char *key, size_t key_length,
+                     const char *value, size_t value_length,
+                     time_t expiration,
+                     uint32_t flags);
+
+memcached_return_t
+  memcached_prepend(memcached_st *ptr,
+                    const char *key, size_t key_length,
+                    const char *value, size_t value_length,
+                    time_t expiration,
+                    uint32_t flags)
+
+memcached_return_t
+  memcached_append(memcached_st *ptr,
+                   const char *key, size_t key_length,
+                    const char *value, size_t value_length,
+                    time_t expiration,
+                    uint32_t flags)
+memcached_return_t
+  memcached_cas(memcached_st *ptr,
+                const char *key, size_t key_length,
+                const char *value, size_t value_length,
+                time_t expiration,
+                uint32_t flags,
+                uint64_t cas);
+
+memcached_return_t
+  memcached_set_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags);
+
+memcached_return_t
+  memcached_add_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags);
+
+memcached_return_t
+  memcached_replace_by_key(memcached_st *ptr,
+                           const char *master_key, size_t master_key_length,
+                           const char *key, size_t key_length,
+                           const char *value, size_t value_length,
+                           time_t expiration,
+                           uint32_t flags);
+
+memcached_return_t
+  memcached_prepend_by_key(memcached_st *ptr,
+                           const char *master_key, size_t master_key_length,
+                           const char *key, size_t key_length,
+                           const char *value, size_t value_length,
+                           time_t expiration,
+                           uint32_t flags);
+
+memcached_return_t
+  memcached_append_by_key(memcached_st *ptr,
+                          const char *master_key, size_t master_key_length,
+                          const char *key, size_t key_length,
+                          const char *value, size_t value_length,
+                          time_t expiration,
+                          uint32_t flags);
+
+memcached_return_t
+  memcached_cas_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags,
+                       uint64_t cas);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_set(), memcached_add(), and memcached_replace() are all used to
+store information on the server. All methods take a key, and its length to
+store the object. Keys are currently limited to 250 characters by the
+memcached(1) server. You must also supply a value and a length. Optionally you
+may support an expiration time for the object and a 16 byte value (it is
+meant to be used as a bitmap).
+.sp
+memcached_set() will write an object to the server. If an object already
+exists it will overwrite what is in the server. If the object does not exist
+it will be written. If you are using the non\-blocking mode this function
+will always return true unless a network error occurs.
+.sp
+memcached_replace() replaces an object on the server. If the object is not
+found on the server an error occurs.
+.sp
+memcached_add() adds an object to the server. If the object is found on the
+server an error occurs, otherwise the value is stored.
+.sp
+memcached_prepend() places a segment of data before the last piece of data
+stored. Currently expiration and key are not used in the server.
+.sp
+memcached_append() places a segment of data at the end of the last piece of
+data stored. Currently expiration and key are not used in the server.
+.sp
+memcached_cas() overwrites data in the server as long as the "cas" value is
+still the same in the server. You can get the cas value of a result by
+calling memcached_result_cas() on a memcached_result_st(3) structure. At the point
+that this note was written cas is still buggy in memached. Turning on support
+for it in libmemcached(3) is optional. Please see memcached_set() for
+information on how to do this.
+.sp
+memcached_set_by_key(), memcached_add_by_key(), memcached_replace_by_key(),
+memcached_prepend_by_key(), memcached_append_by_key_by_key(),
+memcached_cas_by_key() methods all behave in a similar method as the non key
+methods. The difference is that they use their master_key parameter to map
+objects to particular servers.
+.sp
+If you are looking for performance, memcached_set() with non\-blocking IO is
+the fastest way to store data on the server.
+.sp
+All of the above functions are supported with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPbehavior enabled. But when using these operations with this behavior on, there
+are limits to the size of the payload being sent to the server.  The reason for
+these limits is that the Memcahed Server does not allow multi\-datagram requests
+and the current server implementation sets a datagram size to 1400 bytes. Due
+to protocol overhead, the actual limit of the user supplied data is less than
+1400 bytes and depends on the protocol in use as well as the operation being
+executed. When running with the binary protocol, \(ga\(ga MEMCACHED_BEHAVIOR_BINARY_PROTOCOL\(ga\(ga,
+the size of the key,value, flags and expiry combined may not exceed 1368 bytes.
+When running with the ASCII protocol, the exact limit fluctuates depending on
+which function is being executed and whether the function is a cas operation
+or not. For non\-cas ASCII set operations, there are at least 1335 bytes available
+to split among the key, key_prefix, and value; for cas ASCII operations there are
+at least 1318 bytes available to split among the key, key_prefix and value. If the
+total size of the command, including overhead, exceeds 1400 bytes, a \fBMEMCACHED_WRITE_FAILURE\fPwill be returned.
+.SH RETURN
+.sp
+All methods return a value of type \fBmemcached_return_t\fP.
+On success the value will be \fBMEMCACHED_SUCCESS\fP.
+Use memcached_strerror() to translate this value to a printable string.
+.sp
+For memcached_replace() and memcached_add(), \fBMEMCACHED_NOTSTORED\fP is a
+legitmate error in the case of a collision.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_append_by_key.3 b/docs/man/memcached_append_by_key.3
new file mode 100644 (file)
index 0000000..0958b1e
--- /dev/null
@@ -0,0 +1,216 @@
+.TH "MEMCACHED_APPEND_BY_KEY" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_append_by_key \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Store value on server
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_set (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 const char *value, size_t value_length,
+                 time_t expiration,
+                 uint32_t flags);
+
+memcached_return_t
+  memcached_add (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 const char *value, size_t value_length,
+                 time_t expiration,
+                 uint32_t flags);
+
+memcached_return_t
+  memcached_replace (memcached_st *ptr,
+                     const char *key, size_t key_length,
+                     const char *value, size_t value_length,
+                     time_t expiration,
+                     uint32_t flags);
+
+memcached_return_t
+  memcached_prepend(memcached_st *ptr,
+                    const char *key, size_t key_length,
+                    const char *value, size_t value_length,
+                    time_t expiration,
+                    uint32_t flags)
+
+memcached_return_t
+  memcached_append(memcached_st *ptr,
+                   const char *key, size_t key_length,
+                    const char *value, size_t value_length,
+                    time_t expiration,
+                    uint32_t flags)
+memcached_return_t
+  memcached_cas(memcached_st *ptr,
+                const char *key, size_t key_length,
+                const char *value, size_t value_length,
+                time_t expiration,
+                uint32_t flags,
+                uint64_t cas);
+
+memcached_return_t
+  memcached_set_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags);
+
+memcached_return_t
+  memcached_add_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags);
+
+memcached_return_t
+  memcached_replace_by_key(memcached_st *ptr,
+                           const char *master_key, size_t master_key_length,
+                           const char *key, size_t key_length,
+                           const char *value, size_t value_length,
+                           time_t expiration,
+                           uint32_t flags);
+
+memcached_return_t
+  memcached_prepend_by_key(memcached_st *ptr,
+                           const char *master_key, size_t master_key_length,
+                           const char *key, size_t key_length,
+                           const char *value, size_t value_length,
+                           time_t expiration,
+                           uint32_t flags);
+
+memcached_return_t
+  memcached_append_by_key(memcached_st *ptr,
+                          const char *master_key, size_t master_key_length,
+                          const char *key, size_t key_length,
+                          const char *value, size_t value_length,
+                          time_t expiration,
+                          uint32_t flags);
+
+memcached_return_t
+  memcached_cas_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags,
+                       uint64_t cas);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_set(), memcached_add(), and memcached_replace() are all used to
+store information on the server. All methods take a key, and its length to
+store the object. Keys are currently limited to 250 characters by the
+memcached(1) server. You must also supply a value and a length. Optionally you
+may support an expiration time for the object and a 16 byte value (it is
+meant to be used as a bitmap).
+.sp
+memcached_set() will write an object to the server. If an object already
+exists it will overwrite what is in the server. If the object does not exist
+it will be written. If you are using the non\-blocking mode this function
+will always return true unless a network error occurs.
+.sp
+memcached_replace() replaces an object on the server. If the object is not
+found on the server an error occurs.
+.sp
+memcached_add() adds an object to the server. If the object is found on the
+server an error occurs, otherwise the value is stored.
+.sp
+memcached_prepend() places a segment of data before the last piece of data
+stored. Currently expiration and key are not used in the server.
+.sp
+memcached_append() places a segment of data at the end of the last piece of
+data stored. Currently expiration and key are not used in the server.
+.sp
+memcached_cas() overwrites data in the server as long as the "cas" value is
+still the same in the server. You can get the cas value of a result by
+calling memcached_result_cas() on a memcached_result_st(3) structure. At the point
+that this note was written cas is still buggy in memached. Turning on support
+for it in libmemcached(3) is optional. Please see memcached_set() for
+information on how to do this.
+.sp
+memcached_set_by_key(), memcached_add_by_key(), memcached_replace_by_key(),
+memcached_prepend_by_key(), memcached_append_by_key_by_key(),
+memcached_cas_by_key() methods all behave in a similar method as the non key
+methods. The difference is that they use their master_key parameter to map
+objects to particular servers.
+.sp
+If you are looking for performance, memcached_set() with non\-blocking IO is
+the fastest way to store data on the server.
+.sp
+All of the above functions are supported with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPbehavior enabled. But when using these operations with this behavior on, there
+are limits to the size of the payload being sent to the server.  The reason for
+these limits is that the Memcahed Server does not allow multi\-datagram requests
+and the current server implementation sets a datagram size to 1400 bytes. Due
+to protocol overhead, the actual limit of the user supplied data is less than
+1400 bytes and depends on the protocol in use as well as the operation being
+executed. When running with the binary protocol, \(ga\(ga MEMCACHED_BEHAVIOR_BINARY_PROTOCOL\(ga\(ga,
+the size of the key,value, flags and expiry combined may not exceed 1368 bytes.
+When running with the ASCII protocol, the exact limit fluctuates depending on
+which function is being executed and whether the function is a cas operation
+or not. For non\-cas ASCII set operations, there are at least 1335 bytes available
+to split among the key, key_prefix, and value; for cas ASCII operations there are
+at least 1318 bytes available to split among the key, key_prefix and value. If the
+total size of the command, including overhead, exceeds 1400 bytes, a \fBMEMCACHED_WRITE_FAILURE\fPwill be returned.
+.SH RETURN
+.sp
+All methods return a value of type \fBmemcached_return_t\fP.
+On success the value will be \fBMEMCACHED_SUCCESS\fP.
+Use memcached_strerror() to translate this value to a printable string.
+.sp
+For memcached_replace() and memcached_add(), \fBMEMCACHED_NOTSTORED\fP is a
+legitmate error in the case of a collision.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_auto.3 b/docs/man/memcached_auto.3
new file mode 100644 (file)
index 0000000..a88df62
--- /dev/null
@@ -0,0 +1,168 @@
+.TH "MEMCACHED_AUTO" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_auto \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manipulate counters
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_increment (memcached_st *ptr,
+                       const char *key, size_t key_length,
+                       unsigned int offset,
+                       uint64_t *value);
+
+memcached_return_t
+  memcached_decrement (memcached_st *ptr,
+                       const char *key, size_t key_length,
+                       unsigned int offset,
+                       uint64_t *value);
+
+memcached_return_t
+  memcached_increment_with_initial (memcached_st *ptr,
+                                    const char *key,
+                                    size_t key_length,
+                                    uint64_t offset,
+                                    uint64_t initial,
+                                    time_t expiration,
+                                    uint64_t *value);
+
+memcached_return_t
+  memcached_decrement_with_initial (memcached_st *ptr,
+                                    const char *key,
+                                    size_t key_length,
+                                    uint64_t offset,
+                                    uint64_t initial,
+                                    time_t expiration,
+                                    uint64_t *value);
+
+memcached_return_t
+  memcached_increment_by_key (memcached_st *ptr,
+                              const char *master_key, size_t master_key_length,
+                              const char *key, size_t key_length,
+                              unsigned int offset,
+                              uint64_t *value);
+
+memcached_return_t
+  memcached_decrement_by_key (memcached_st *ptr,
+                              const char *master_key, size_t master_key_length,
+                              const char *key, size_t key_length,
+                              unsigned int offset,
+                              uint64_t *value);
+
+memcached_return_t
+  memcached_increment_with_initial_by_key (memcached_st *ptr,
+                                           const char *master_key,
+                                           size_t master_key_length,
+                                           const char *key,
+                                           size_t key_length,
+                                           uint64_t offset,
+                                           uint64_t initial,
+                                           time_t expiration,
+                                           uint64_t *value);
+
+memcached_return_t
+  memcached_decrement_with_initial_by_key (memcached_st *ptr,
+                                           const char *master_key,
+                                           size_t master_key_length,
+                                           const char *key,
+                                           size_t key_length,
+                                           uint64_t offset,
+                                           uint64_t initial,
+                                           time_t expiration,
+                                           uint64_t *value);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached(1) servers have the ability to increment and decrement keys
+(overflow and underflow are not detected). This gives you the ability to use
+memcached to generate shared sequences of values.
+.sp
+memcached_increment() takes a key and keylength and increments the value by
+the offset passed to it. The value is then returned via the unsigned int
+value pointer you pass to it.
+.sp
+memcached_decrement() takes a key and keylength and decrements the value by
+the offset passed to it. The value is then returned via the unsigned int
+value pointer you pass to it.
+.sp
+memcached_increment_with_initial() takes a key and keylength and increments
+the value by the offset passed to it. If the object specified by key does
+not exist, one of two things may happen: If the expiration value is
+MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all other
+expiration values, the operation will succeed by seeding the value for that
+key with a initial value to expire with the provided expiration time. The
+flags will be set to zero.The value is then returned via the unsigned int
+value pointer you pass to it.
+.sp
+memcached_decrement_with_initial() takes a key and keylength and decrements
+the value by the offset passed to it. If the object specified by key does
+not exist, one of two things may happen: If the expiration value is
+MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all other
+expiration values, the operation will succeed by seeding the value for that
+key with a initial value to expire with the provided expiration time. The
+flags will be set to zero.The value is then returned via the unsigned int
+value pointer you pass to it.
+.sp
+memcached_increment_by_key(), memcached_decrement_by_key(),
+memcached_increment_with_initial_by_key(), and
+memcached_decrement_with_initial_by_key() are master key equivalents of the
+above.
+.SH RETURN
+.sp
+A value of type \fBmemcached_return_t\fP is returned.
+On success that value will be \fBMEMCACHED_SUCCESS\fP.
+Use memcached_strerror() to translate this value to a printable string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_behavior.3 b/docs/man/memcached_behavior.3
new file mode 100644 (file)
index 0000000..d93e685
--- /dev/null
@@ -0,0 +1,468 @@
+.TH "MEMCACHED_BEHAVIOR" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_behavior \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manipulate behavior
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+uint64_t
+  memcached_behavior_get (memcached_st *ptr,
+                          memcached_behavior flag);
+
+memcached_return_t
+  memcached_behavior_set (memcached_st *ptr,
+                          memcached_behavior flag,
+                          uint64_t data);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) behavior can be modified by use memcached_behavior_set().
+Default behavior is the library strives to be quick and accurate. Some
+behavior, while being faster, can also result in not entirely accurate
+behavior (for instance, memcached_set() will always respond with
+\fBMEMCACHED_SUCCESS\fP).
+.sp
+memcached_behavior_get() takes a behavior flag and returns whether or not
+that behavior is currently enabled in the client.
+.sp
+memcached_behavior_set() changes the value of a particular option of the
+client. It takes both a flag (listed below) and a value. For simple on or
+off options you just need to pass in a value of 1. Calls to
+memcached_behavior_set() will flush and reset all connections.
+.sp
+MEMCACHED_BEHAVIOR_USE_UDP
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Causes libmemcached(3) to use the UDP transport when communicating
+with a memcached server. Not all I/O operations are supported
+when this behavior is enababled. The following operations will return
+\fBMEMCACHED_NOT_SUPPORTED\fP when executed with the MEMCACHED_BEHAVIOR_USE_UDP
+enabled: memcached_version(), memcached_stat(), memcached_get(),
+memcached_get_by_key(), memcached_mget(), memcached_mget_by_key(),
+memcached_fetch(), memcached_fetch_result(), memcached_value_fetch().
+.sp
+All other operations are supported but are executed in a \(aqfire\-and\-forget\(aq
+mode, in which once the client has executed the operation, no attempt
+will be made to ensure the operation has been received and acted on by the
+server.
+.sp
+libmemcached(3) does not allow TCP and UDP servers to be shared within
+the same libmemached(3) client \(aqinstance\(aq. An attempt to add a TCP server
+when this behavior is enabled will result in a \fBMEMCACHED_INVALID_HOST_PROTOCOL\fP,
+as will attempting to add a UDP server when this behavior has not been enabled.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_NO_BLOCK
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Causes libmemcached(3) to use asychronous IO. This is the fastest transport
+available for storage functions.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_SND_TIMEOUT
+.INDENT 0.0
+.INDENT 3.5
+.sp
+This sets the microsecond behavior of the socket against the SO_SNDTIMEO flag.
+In cases where you cannot use non\-blocking IO this will allow you to still have
+timeouts on the sending of data.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_RCV_TIMEOUT
+.INDENT 0.0
+.INDENT 3.5
+.sp
+This sets the microsecond behavior of the socket against the SO_RCVTIMEO flag.
+In cases where you cannot use non\-blocking IO this will allow you to still have
+timeouts on the reading of data.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_TCP_NODELAY
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Turns on the no\-delay feature for connecting sockets (may be faster in some
+environments).
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_HASH
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Makes the default hashing algorithm for keys use MD5. The value can be set
+to either MEMCACHED_HASH_DEFAULT, MEMCACHED_HASH_MD5, MEMCACHED_HASH_CRC, MEMCACHED_HASH_FNV1_64, MEMCACHED_HASH_FNV1A_64, MEMCACHED_HASH_FNV1_32, MEMCACHED_HASH_FNV1A_32, MEMCACHED_HASH_JENKINS, MEMCACHED_HASH_HSIEH, and MEMCACHED_HASH_MURMUR.
+Each hash has it\(aqs advantages and it\(aqs weaknesses. If you don\(aqt know or don\(aqt care, just go with the default.
+Support for MEMCACHED_HASH_HSIEH is a compile time option that is disabled by default. To enable support for this hashing algorithm, configure and build libmemcached with the \-\-enable\-hash_hsieh.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_DISTRIBUTION
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Using this you can enable different means of distributing values to servers.
+The default method is MEMCACHED_DISTRIBUTION_MODULA. You can enable
+consistent hashing by setting MEMCACHED_DISTRIBUTION_CONSISTENT.
+Consistent hashing delivers better distribution and allows servers to be
+added to the cluster with minimal cache losses. Currently
+MEMCACHED_DISTRIBUTION_CONSISTENT is an alias for the value
+MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_CACHE_LOOKUPS
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Memcached can cache named lookups so that DNS lookups are made only once.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_SUPPORT_CAS
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Support CAS operations (this is not enabled by default at this point in the server since it imposes a slight performance penalty).
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_KETAMA
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Sets the default distribution to MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA
+and the hash to MEMCACHED_HASH_MD5.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Sets the default distribution to MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA with the weighted support.
+and the hash to MEMCACHED_HASH_MD5.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_KETAMA_HASH
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Sets the hashing algorithm for host mapping on continuum. The value can be set
+to either MEMCACHED_HASH_DEFAULT, MEMCACHED_HASH_MD5, MEMCACHED_HASH_CRC, MEMCACHED_HASH_FNV1_64, MEMCACHED_HASH_FNV1A_64, MEMCACHED_HASH_FNV1_32, and MEMCACHED_HASH_FNV1A_32.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_KETAMA_COMPAT
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Sets the compatibility mode. The value can be set to either
+MEMCACHED_KETAMA_COMPAT_LIBMEMCACHED (this is the default) or
+MEMCACHED_KETAMA_COMPAT_SPY to be compatible with the SPY Memcached client
+for Java.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_POLL_TIMEOUT
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Modify the timeout value that is used by poll(). The default value is \-1. An signed int pointer must be passed to memcached_behavior_set() to change this value. For memcached_behavior_get() a signed int value will be cast and returned as the unsigned long long.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_USER_DATA
+.INDENT 0.0
+.INDENT 3.5
+.sp
+This allows you to store a pointer to a specifc piece of data. This can be
+retrieved from inside of memcached_fetch_execute(). Cloning a memcached_st
+.sp
+will copy the pointer to the clone. This was deprecated in 0.14 in favor
+of memcached_callback_set(3). This will be removed in 0.15.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_BUFFER_REQUESTS
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Enabling buffered IO causes commands to "buffer" instead of being sent. Any
+action that gets data causes this buffer to be be sent to the remote
+connection. Quiting the connection or closing down the connection will also
+cause the buffered data to be pushed to the remote connection.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_VERIFY_KEY
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Enabling this will cause libmemcached(3) to test all keys to verify that they
+are valid keys.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_SORT_HOSTS
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Enabling this will cause hosts that are added to be placed in the host list in
+sorted order. This will defeat consisten hashing.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT
+.INDENT 0.0
+.INDENT 3.5
+.sp
+In non\-blocking mode this changes the value of the timeout during socket
+connection.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_BINARY_PROTOCOL
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Enable the use of the binary protocol. Please note that you cannot toggle
+this flag on an open connection.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Set this value to enable the server be removed after continuous MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+times connection failure.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Set this value to tune the number of messages that may be sent before
+libmemcached should start to automatically drain the input queue. Setting
+this value to high, may cause libmemcached to deadlock (trying to send data,
+but the send will block because the input buffer in the kernel is full).
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Set this value to tune the number of bytes that may be sent before
+libmemcached should start to automatically drain the input queue (need
+at least 10 IO requests sent without reading the input buffer). Setting
+this value to high, may cause libmemcached to deadlock (trying to send
+data, but the send will block because the input buffer in the kernel is full).
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH
+.INDENT 0.0
+.INDENT 3.5
+.sp
+The binary protocol works a bit different than the textual protocol in
+that a multiget is implemented as a pipe of single get\-operations which
+are sent to the server in a chunk. If you are using large multigets from
+your application, you may improve the latency of the gets by setting
+this value so you send out the first chunk of requests when you hit the
+specified limit.  It allows the servers to start processing the requests
+to send the data back while the rest of the requests are created and
+sent to the server.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_NOREPLY
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Set this value to specify that you really don\(aqt care about the result
+from your storage commands (set, add, replace, append, prepend).
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS
+.INDENT 0.0
+.INDENT 3.5
+.sp
+If you just want "a poor mans HA", you may specify the numbers of
+replicas libmemcached should store of each item (on different servers).
+This replication does not dedicate certain memcached servers to store the
+replicas in, but instead it will store the replicas together with all of the
+other objects (on the \(aqn\(aq next servers specified in your server list).
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Allows randomizing the replica reads starting point. Normally the read is
+done from primary server and in case of miss the read is done from primary
++ 1, then primary + 2 all the way to \(aqn\(aq replicas. If this option is set
+on the starting point of the replica reads is randomized between the servers.
+This allows distributing read load to multiple servers with the expense of
+more write traffic.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_CORK
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Enable TCP_CORK behavior. This is only available as an option Linux.
+MEMCACHED_NO_SERVERS is returned if no servers are available to test with.
+MEMCACHED_NOT_SUPPORTED is returned if we were not able to determine
+if support was available. All other responses then MEMCACHED_SUCCESS
+report an error of some sort. This behavior also enables
+MEMCACHED_BEHAVIOR_TCP_NODELAY when set.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_KEEPALIVE
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Enable TCP_KEEPALIVE behavior.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_KEEPALIVE_IDLE
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Specify time, in seconds, to mark a connection as idle. This is only available as an option Linux.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Find the current size of SO_SNDBUF. A value of 0 means either an error
+occured or no hosts were available. It is safe to assume system default
+if this occurs. If an error occurs you can checked the last cached errno statement to find the specific error.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Find the current size of SO_RCVBUF. A value of 0 means either an error
+occured or no hosts were available. It is safe to assume system default
+if this occurs. If an error occurs you can checked the last cached errno statement to find the specific error.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+.INDENT 0.0
+.INDENT 3.5
+.sp
+This number of times a host can have an error before it is disabled.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS
+.INDENT 0.0
+.INDENT 3.5
+.sp
+If enabled any hosts which have been flagged as disabled will be removed
+from the list of servers in the memcached_st structure. This must be used
+in combination with MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_RETRY_TIMEOUT
+.INDENT 0.0
+.INDENT 3.5
+.sp
+When enabled a host which is problematic will only be checked for usage
+based on the amount of time set by this behavior.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY
+.INDENT 0.0
+.INDENT 3.5
+.sp
+When enabled the prefix key will be added to the key when determining
+server by hash.
+.UNINDENT
+.UNINDENT
+.SH RETURN
+.sp
+memcached_behavior_get() returns either the current value of the get, or 0
+or 1 on simple flag behaviors (1 being enabled). memcached_behavior_set()
+returns failure or success.
+.SH NOTES
+.sp
+memcached_behavior_set() in version .17 was changed from taking a pointer
+to data value, to taking a uin64_t.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_behavior_get.3 b/docs/man/memcached_behavior_get.3
new file mode 100644 (file)
index 0000000..8109c9f
--- /dev/null
@@ -0,0 +1,468 @@
+.TH "MEMCACHED_BEHAVIOR_GET" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_behavior_get \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manipulate behavior
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+uint64_t
+  memcached_behavior_get (memcached_st *ptr,
+                          memcached_behavior flag);
+
+memcached_return_t
+  memcached_behavior_set (memcached_st *ptr,
+                          memcached_behavior flag,
+                          uint64_t data);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) behavior can be modified by use memcached_behavior_set().
+Default behavior is the library strives to be quick and accurate. Some
+behavior, while being faster, can also result in not entirely accurate
+behavior (for instance, memcached_set() will always respond with
+\fBMEMCACHED_SUCCESS\fP).
+.sp
+memcached_behavior_get() takes a behavior flag and returns whether or not
+that behavior is currently enabled in the client.
+.sp
+memcached_behavior_set() changes the value of a particular option of the
+client. It takes both a flag (listed below) and a value. For simple on or
+off options you just need to pass in a value of 1. Calls to
+memcached_behavior_set() will flush and reset all connections.
+.sp
+MEMCACHED_BEHAVIOR_USE_UDP
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Causes libmemcached(3) to use the UDP transport when communicating
+with a memcached server. Not all I/O operations are supported
+when this behavior is enababled. The following operations will return
+\fBMEMCACHED_NOT_SUPPORTED\fP when executed with the MEMCACHED_BEHAVIOR_USE_UDP
+enabled: memcached_version(), memcached_stat(), memcached_get(),
+memcached_get_by_key(), memcached_mget(), memcached_mget_by_key(),
+memcached_fetch(), memcached_fetch_result(), memcached_value_fetch().
+.sp
+All other operations are supported but are executed in a \(aqfire\-and\-forget\(aq
+mode, in which once the client has executed the operation, no attempt
+will be made to ensure the operation has been received and acted on by the
+server.
+.sp
+libmemcached(3) does not allow TCP and UDP servers to be shared within
+the same libmemached(3) client \(aqinstance\(aq. An attempt to add a TCP server
+when this behavior is enabled will result in a \fBMEMCACHED_INVALID_HOST_PROTOCOL\fP,
+as will attempting to add a UDP server when this behavior has not been enabled.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_NO_BLOCK
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Causes libmemcached(3) to use asychronous IO. This is the fastest transport
+available for storage functions.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_SND_TIMEOUT
+.INDENT 0.0
+.INDENT 3.5
+.sp
+This sets the microsecond behavior of the socket against the SO_SNDTIMEO flag.
+In cases where you cannot use non\-blocking IO this will allow you to still have
+timeouts on the sending of data.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_RCV_TIMEOUT
+.INDENT 0.0
+.INDENT 3.5
+.sp
+This sets the microsecond behavior of the socket against the SO_RCVTIMEO flag.
+In cases where you cannot use non\-blocking IO this will allow you to still have
+timeouts on the reading of data.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_TCP_NODELAY
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Turns on the no\-delay feature for connecting sockets (may be faster in some
+environments).
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_HASH
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Makes the default hashing algorithm for keys use MD5. The value can be set
+to either MEMCACHED_HASH_DEFAULT, MEMCACHED_HASH_MD5, MEMCACHED_HASH_CRC, MEMCACHED_HASH_FNV1_64, MEMCACHED_HASH_FNV1A_64, MEMCACHED_HASH_FNV1_32, MEMCACHED_HASH_FNV1A_32, MEMCACHED_HASH_JENKINS, MEMCACHED_HASH_HSIEH, and MEMCACHED_HASH_MURMUR.
+Each hash has it\(aqs advantages and it\(aqs weaknesses. If you don\(aqt know or don\(aqt care, just go with the default.
+Support for MEMCACHED_HASH_HSIEH is a compile time option that is disabled by default. To enable support for this hashing algorithm, configure and build libmemcached with the \-\-enable\-hash_hsieh.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_DISTRIBUTION
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Using this you can enable different means of distributing values to servers.
+The default method is MEMCACHED_DISTRIBUTION_MODULA. You can enable
+consistent hashing by setting MEMCACHED_DISTRIBUTION_CONSISTENT.
+Consistent hashing delivers better distribution and allows servers to be
+added to the cluster with minimal cache losses. Currently
+MEMCACHED_DISTRIBUTION_CONSISTENT is an alias for the value
+MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_CACHE_LOOKUPS
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Memcached can cache named lookups so that DNS lookups are made only once.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_SUPPORT_CAS
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Support CAS operations (this is not enabled by default at this point in the server since it imposes a slight performance penalty).
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_KETAMA
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Sets the default distribution to MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA
+and the hash to MEMCACHED_HASH_MD5.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Sets the default distribution to MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA with the weighted support.
+and the hash to MEMCACHED_HASH_MD5.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_KETAMA_HASH
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Sets the hashing algorithm for host mapping on continuum. The value can be set
+to either MEMCACHED_HASH_DEFAULT, MEMCACHED_HASH_MD5, MEMCACHED_HASH_CRC, MEMCACHED_HASH_FNV1_64, MEMCACHED_HASH_FNV1A_64, MEMCACHED_HASH_FNV1_32, and MEMCACHED_HASH_FNV1A_32.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_KETAMA_COMPAT
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Sets the compatibility mode. The value can be set to either
+MEMCACHED_KETAMA_COMPAT_LIBMEMCACHED (this is the default) or
+MEMCACHED_KETAMA_COMPAT_SPY to be compatible with the SPY Memcached client
+for Java.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_POLL_TIMEOUT
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Modify the timeout value that is used by poll(). The default value is \-1. An signed int pointer must be passed to memcached_behavior_set() to change this value. For memcached_behavior_get() a signed int value will be cast and returned as the unsigned long long.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_USER_DATA
+.INDENT 0.0
+.INDENT 3.5
+.sp
+This allows you to store a pointer to a specifc piece of data. This can be
+retrieved from inside of memcached_fetch_execute(). Cloning a memcached_st
+.sp
+will copy the pointer to the clone. This was deprecated in 0.14 in favor
+of memcached_callback_set(3). This will be removed in 0.15.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_BUFFER_REQUESTS
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Enabling buffered IO causes commands to "buffer" instead of being sent. Any
+action that gets data causes this buffer to be be sent to the remote
+connection. Quiting the connection or closing down the connection will also
+cause the buffered data to be pushed to the remote connection.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_VERIFY_KEY
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Enabling this will cause libmemcached(3) to test all keys to verify that they
+are valid keys.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_SORT_HOSTS
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Enabling this will cause hosts that are added to be placed in the host list in
+sorted order. This will defeat consisten hashing.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT
+.INDENT 0.0
+.INDENT 3.5
+.sp
+In non\-blocking mode this changes the value of the timeout during socket
+connection.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_BINARY_PROTOCOL
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Enable the use of the binary protocol. Please note that you cannot toggle
+this flag on an open connection.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Set this value to enable the server be removed after continuous MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+times connection failure.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Set this value to tune the number of messages that may be sent before
+libmemcached should start to automatically drain the input queue. Setting
+this value to high, may cause libmemcached to deadlock (trying to send data,
+but the send will block because the input buffer in the kernel is full).
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Set this value to tune the number of bytes that may be sent before
+libmemcached should start to automatically drain the input queue (need
+at least 10 IO requests sent without reading the input buffer). Setting
+this value to high, may cause libmemcached to deadlock (trying to send
+data, but the send will block because the input buffer in the kernel is full).
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH
+.INDENT 0.0
+.INDENT 3.5
+.sp
+The binary protocol works a bit different than the textual protocol in
+that a multiget is implemented as a pipe of single get\-operations which
+are sent to the server in a chunk. If you are using large multigets from
+your application, you may improve the latency of the gets by setting
+this value so you send out the first chunk of requests when you hit the
+specified limit.  It allows the servers to start processing the requests
+to send the data back while the rest of the requests are created and
+sent to the server.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_NOREPLY
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Set this value to specify that you really don\(aqt care about the result
+from your storage commands (set, add, replace, append, prepend).
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS
+.INDENT 0.0
+.INDENT 3.5
+.sp
+If you just want "a poor mans HA", you may specify the numbers of
+replicas libmemcached should store of each item (on different servers).
+This replication does not dedicate certain memcached servers to store the
+replicas in, but instead it will store the replicas together with all of the
+other objects (on the \(aqn\(aq next servers specified in your server list).
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Allows randomizing the replica reads starting point. Normally the read is
+done from primary server and in case of miss the read is done from primary
++ 1, then primary + 2 all the way to \(aqn\(aq replicas. If this option is set
+on the starting point of the replica reads is randomized between the servers.
+This allows distributing read load to multiple servers with the expense of
+more write traffic.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_CORK
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Enable TCP_CORK behavior. This is only available as an option Linux.
+MEMCACHED_NO_SERVERS is returned if no servers are available to test with.
+MEMCACHED_NOT_SUPPORTED is returned if we were not able to determine
+if support was available. All other responses then MEMCACHED_SUCCESS
+report an error of some sort. This behavior also enables
+MEMCACHED_BEHAVIOR_TCP_NODELAY when set.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_KEEPALIVE
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Enable TCP_KEEPALIVE behavior.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_KEEPALIVE_IDLE
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Specify time, in seconds, to mark a connection as idle. This is only available as an option Linux.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Find the current size of SO_SNDBUF. A value of 0 means either an error
+occured or no hosts were available. It is safe to assume system default
+if this occurs. If an error occurs you can checked the last cached errno statement to find the specific error.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Find the current size of SO_RCVBUF. A value of 0 means either an error
+occured or no hosts were available. It is safe to assume system default
+if this occurs. If an error occurs you can checked the last cached errno statement to find the specific error.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+.INDENT 0.0
+.INDENT 3.5
+.sp
+This number of times a host can have an error before it is disabled.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS
+.INDENT 0.0
+.INDENT 3.5
+.sp
+If enabled any hosts which have been flagged as disabled will be removed
+from the list of servers in the memcached_st structure. This must be used
+in combination with MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_RETRY_TIMEOUT
+.INDENT 0.0
+.INDENT 3.5
+.sp
+When enabled a host which is problematic will only be checked for usage
+based on the amount of time set by this behavior.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY
+.INDENT 0.0
+.INDENT 3.5
+.sp
+When enabled the prefix key will be added to the key when determining
+server by hash.
+.UNINDENT
+.UNINDENT
+.SH RETURN
+.sp
+memcached_behavior_get() returns either the current value of the get, or 0
+or 1 on simple flag behaviors (1 being enabled). memcached_behavior_set()
+returns failure or success.
+.SH NOTES
+.sp
+memcached_behavior_set() in version .17 was changed from taking a pointer
+to data value, to taking a uin64_t.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_behavior_set.3 b/docs/man/memcached_behavior_set.3
new file mode 100644 (file)
index 0000000..e4b65fe
--- /dev/null
@@ -0,0 +1,468 @@
+.TH "MEMCACHED_BEHAVIOR_SET" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_behavior_set \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manipulate behavior
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+uint64_t
+  memcached_behavior_get (memcached_st *ptr,
+                          memcached_behavior flag);
+
+memcached_return_t
+  memcached_behavior_set (memcached_st *ptr,
+                          memcached_behavior flag,
+                          uint64_t data);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) behavior can be modified by use memcached_behavior_set().
+Default behavior is the library strives to be quick and accurate. Some
+behavior, while being faster, can also result in not entirely accurate
+behavior (for instance, memcached_set() will always respond with
+\fBMEMCACHED_SUCCESS\fP).
+.sp
+memcached_behavior_get() takes a behavior flag and returns whether or not
+that behavior is currently enabled in the client.
+.sp
+memcached_behavior_set() changes the value of a particular option of the
+client. It takes both a flag (listed below) and a value. For simple on or
+off options you just need to pass in a value of 1. Calls to
+memcached_behavior_set() will flush and reset all connections.
+.sp
+MEMCACHED_BEHAVIOR_USE_UDP
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Causes libmemcached(3) to use the UDP transport when communicating
+with a memcached server. Not all I/O operations are supported
+when this behavior is enababled. The following operations will return
+\fBMEMCACHED_NOT_SUPPORTED\fP when executed with the MEMCACHED_BEHAVIOR_USE_UDP
+enabled: memcached_version(), memcached_stat(), memcached_get(),
+memcached_get_by_key(), memcached_mget(), memcached_mget_by_key(),
+memcached_fetch(), memcached_fetch_result(), memcached_value_fetch().
+.sp
+All other operations are supported but are executed in a \(aqfire\-and\-forget\(aq
+mode, in which once the client has executed the operation, no attempt
+will be made to ensure the operation has been received and acted on by the
+server.
+.sp
+libmemcached(3) does not allow TCP and UDP servers to be shared within
+the same libmemached(3) client \(aqinstance\(aq. An attempt to add a TCP server
+when this behavior is enabled will result in a \fBMEMCACHED_INVALID_HOST_PROTOCOL\fP,
+as will attempting to add a UDP server when this behavior has not been enabled.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_NO_BLOCK
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Causes libmemcached(3) to use asychronous IO. This is the fastest transport
+available for storage functions.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_SND_TIMEOUT
+.INDENT 0.0
+.INDENT 3.5
+.sp
+This sets the microsecond behavior of the socket against the SO_SNDTIMEO flag.
+In cases where you cannot use non\-blocking IO this will allow you to still have
+timeouts on the sending of data.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_RCV_TIMEOUT
+.INDENT 0.0
+.INDENT 3.5
+.sp
+This sets the microsecond behavior of the socket against the SO_RCVTIMEO flag.
+In cases where you cannot use non\-blocking IO this will allow you to still have
+timeouts on the reading of data.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_TCP_NODELAY
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Turns on the no\-delay feature for connecting sockets (may be faster in some
+environments).
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_HASH
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Makes the default hashing algorithm for keys use MD5. The value can be set
+to either MEMCACHED_HASH_DEFAULT, MEMCACHED_HASH_MD5, MEMCACHED_HASH_CRC, MEMCACHED_HASH_FNV1_64, MEMCACHED_HASH_FNV1A_64, MEMCACHED_HASH_FNV1_32, MEMCACHED_HASH_FNV1A_32, MEMCACHED_HASH_JENKINS, MEMCACHED_HASH_HSIEH, and MEMCACHED_HASH_MURMUR.
+Each hash has it\(aqs advantages and it\(aqs weaknesses. If you don\(aqt know or don\(aqt care, just go with the default.
+Support for MEMCACHED_HASH_HSIEH is a compile time option that is disabled by default. To enable support for this hashing algorithm, configure and build libmemcached with the \-\-enable\-hash_hsieh.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_DISTRIBUTION
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Using this you can enable different means of distributing values to servers.
+The default method is MEMCACHED_DISTRIBUTION_MODULA. You can enable
+consistent hashing by setting MEMCACHED_DISTRIBUTION_CONSISTENT.
+Consistent hashing delivers better distribution and allows servers to be
+added to the cluster with minimal cache losses. Currently
+MEMCACHED_DISTRIBUTION_CONSISTENT is an alias for the value
+MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_CACHE_LOOKUPS
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Memcached can cache named lookups so that DNS lookups are made only once.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_SUPPORT_CAS
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Support CAS operations (this is not enabled by default at this point in the server since it imposes a slight performance penalty).
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_KETAMA
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Sets the default distribution to MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA
+and the hash to MEMCACHED_HASH_MD5.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Sets the default distribution to MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA with the weighted support.
+and the hash to MEMCACHED_HASH_MD5.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_KETAMA_HASH
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Sets the hashing algorithm for host mapping on continuum. The value can be set
+to either MEMCACHED_HASH_DEFAULT, MEMCACHED_HASH_MD5, MEMCACHED_HASH_CRC, MEMCACHED_HASH_FNV1_64, MEMCACHED_HASH_FNV1A_64, MEMCACHED_HASH_FNV1_32, and MEMCACHED_HASH_FNV1A_32.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_KETAMA_COMPAT
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Sets the compatibility mode. The value can be set to either
+MEMCACHED_KETAMA_COMPAT_LIBMEMCACHED (this is the default) or
+MEMCACHED_KETAMA_COMPAT_SPY to be compatible with the SPY Memcached client
+for Java.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_POLL_TIMEOUT
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Modify the timeout value that is used by poll(). The default value is \-1. An signed int pointer must be passed to memcached_behavior_set() to change this value. For memcached_behavior_get() a signed int value will be cast and returned as the unsigned long long.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_USER_DATA
+.INDENT 0.0
+.INDENT 3.5
+.sp
+This allows you to store a pointer to a specifc piece of data. This can be
+retrieved from inside of memcached_fetch_execute(). Cloning a memcached_st
+.sp
+will copy the pointer to the clone. This was deprecated in 0.14 in favor
+of memcached_callback_set(3). This will be removed in 0.15.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_BUFFER_REQUESTS
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Enabling buffered IO causes commands to "buffer" instead of being sent. Any
+action that gets data causes this buffer to be be sent to the remote
+connection. Quiting the connection or closing down the connection will also
+cause the buffered data to be pushed to the remote connection.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_VERIFY_KEY
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Enabling this will cause libmemcached(3) to test all keys to verify that they
+are valid keys.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_SORT_HOSTS
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Enabling this will cause hosts that are added to be placed in the host list in
+sorted order. This will defeat consisten hashing.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT
+.INDENT 0.0
+.INDENT 3.5
+.sp
+In non\-blocking mode this changes the value of the timeout during socket
+connection.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_BINARY_PROTOCOL
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Enable the use of the binary protocol. Please note that you cannot toggle
+this flag on an open connection.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Set this value to enable the server be removed after continuous MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+times connection failure.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Set this value to tune the number of messages that may be sent before
+libmemcached should start to automatically drain the input queue. Setting
+this value to high, may cause libmemcached to deadlock (trying to send data,
+but the send will block because the input buffer in the kernel is full).
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Set this value to tune the number of bytes that may be sent before
+libmemcached should start to automatically drain the input queue (need
+at least 10 IO requests sent without reading the input buffer). Setting
+this value to high, may cause libmemcached to deadlock (trying to send
+data, but the send will block because the input buffer in the kernel is full).
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH
+.INDENT 0.0
+.INDENT 3.5
+.sp
+The binary protocol works a bit different than the textual protocol in
+that a multiget is implemented as a pipe of single get\-operations which
+are sent to the server in a chunk. If you are using large multigets from
+your application, you may improve the latency of the gets by setting
+this value so you send out the first chunk of requests when you hit the
+specified limit.  It allows the servers to start processing the requests
+to send the data back while the rest of the requests are created and
+sent to the server.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_NOREPLY
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Set this value to specify that you really don\(aqt care about the result
+from your storage commands (set, add, replace, append, prepend).
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS
+.INDENT 0.0
+.INDENT 3.5
+.sp
+If you just want "a poor mans HA", you may specify the numbers of
+replicas libmemcached should store of each item (on different servers).
+This replication does not dedicate certain memcached servers to store the
+replicas in, but instead it will store the replicas together with all of the
+other objects (on the \(aqn\(aq next servers specified in your server list).
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Allows randomizing the replica reads starting point. Normally the read is
+done from primary server and in case of miss the read is done from primary
++ 1, then primary + 2 all the way to \(aqn\(aq replicas. If this option is set
+on the starting point of the replica reads is randomized between the servers.
+This allows distributing read load to multiple servers with the expense of
+more write traffic.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_CORK
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Enable TCP_CORK behavior. This is only available as an option Linux.
+MEMCACHED_NO_SERVERS is returned if no servers are available to test with.
+MEMCACHED_NOT_SUPPORTED is returned if we were not able to determine
+if support was available. All other responses then MEMCACHED_SUCCESS
+report an error of some sort. This behavior also enables
+MEMCACHED_BEHAVIOR_TCP_NODELAY when set.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_KEEPALIVE
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Enable TCP_KEEPALIVE behavior.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_KEEPALIVE_IDLE
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Specify time, in seconds, to mark a connection as idle. This is only available as an option Linux.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Find the current size of SO_SNDBUF. A value of 0 means either an error
+occured or no hosts were available. It is safe to assume system default
+if this occurs. If an error occurs you can checked the last cached errno statement to find the specific error.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Find the current size of SO_RCVBUF. A value of 0 means either an error
+occured or no hosts were available. It is safe to assume system default
+if this occurs. If an error occurs you can checked the last cached errno statement to find the specific error.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+.INDENT 0.0
+.INDENT 3.5
+.sp
+This number of times a host can have an error before it is disabled.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS
+.INDENT 0.0
+.INDENT 3.5
+.sp
+If enabled any hosts which have been flagged as disabled will be removed
+from the list of servers in the memcached_st structure. This must be used
+in combination with MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_RETRY_TIMEOUT
+.INDENT 0.0
+.INDENT 3.5
+.sp
+When enabled a host which is problematic will only be checked for usage
+based on the amount of time set by this behavior.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY
+.INDENT 0.0
+.INDENT 3.5
+.sp
+When enabled the prefix key will be added to the key when determining
+server by hash.
+.UNINDENT
+.UNINDENT
+.SH RETURN
+.sp
+memcached_behavior_get() returns either the current value of the get, or 0
+or 1 on simple flag behaviors (1 being enabled). memcached_behavior_set()
+returns failure or success.
+.SH NOTES
+.sp
+memcached_behavior_set() in version .17 was changed from taking a pointer
+to data value, to taking a uin64_t.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_callback.3 b/docs/man/memcached_callback.3
new file mode 100644 (file)
index 0000000..d44493b
--- /dev/null
@@ -0,0 +1,188 @@
+.TH "MEMCACHED_CALLBACK" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_callback \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Get and set a callback
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_callback_set (memcached_st *ptr,
+                          memcached_callback_t flag,
+                          void *data);
+
+void *
+  memcached_callback_get (memcached_st *ptr,
+                          memcached_callback_t flag,
+                          memcached_return_t *error);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) can have callbacks set key execution points. These either
+provide function calls at points in the code, or return pointers to
+structures for particular usages.
+.sp
+memcached_callback_get() takes a callback flag and returns the structure or
+function set by memcached_callback_set().
+.sp
+memcached_callback_set() changes the function/structure assigned by a
+callback flag. No connections are reset.
+.sp
+You can use MEMCACHED_CALLBACK_USER_DATA to provide custom context if required for any
+of the callbacks
+.sp
+MEMCACHED_CALLBACK_CLEANUP_FUNCTION
+.INDENT 0.0
+.INDENT 3.5
+.sp
+When memcached_delete() is called this function will be excuted. At the
+point of its execution all connections have been closed.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_CALLBACK_CLONE_FUNCTION
+.INDENT 0.0
+.INDENT 3.5
+.sp
+When memcached_delete() is called this function will be excuted. At the
+point of its execution all connections have been closed.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_CALLBACK_PREFIX_KEY
+.INDENT 0.0
+.INDENT 3.5
+.sp
+You can set a value which will be used to create a domain for your keys.
+The value specified here will be prefixed to each of your keys. The value can not
+be greater then MEMCACHED_PREFIX_KEY_MAX_SIZE \- 1 and will reduce MEMCACHED_MAX_KEY by
+the value of your key. The prefix key is only applied to the primary key,
+not the master key. MEMCACHED_FAILURE will be returned if no key is set. In the case
+of a key which is too long MEMCACHED_BAD_KEY_PROVIDED will be returned.
+.sp
+If you set a value with the value being NULL then the prefix key is disabled.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_CALLBACK_USER_DATA
+.INDENT 0.0
+.INDENT 3.5
+.sp
+This allows you to store a pointer to a specifc piece of data. This can be
+retrieved from inside of memcached_fetch_execute(). Cloning a memcached_st
+will copy the pointer to the clone.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_CALLBACK_MALLOC_FUNCTION
+.INDENT 0.0
+.INDENT 3.5
+.sp
+DEPRECATED: use memcached_set_memory_allocators instead.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_CALLBACK_REALLOC_FUNCTION
+.INDENT 0.0
+.INDENT 3.5
+.sp
+DEPRECATED: use memcached_set_memory_allocators instead.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_CALLBACK_FREE_FUNCTION
+.INDENT 0.0
+.INDENT 3.5
+.sp
+DEPRECATED: use memcached_set_memory_allocators instead.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_CALLBACK_GET_FAILURE
+.INDENT 0.0
+.INDENT 3.5
+.sp
+This function implements the read through cache behavior. On failure of retrieval this callback will be called.
+You are responsible for populating the result object provided. This result object will then be stored in the server and
+returned to the calling process. You must clone the memcached_st in order to
+make use of it. The value will be stored only if you return
+MEMCACHED_SUCCESS or MEMCACHED_BUFFERED. Returning MEMCACHED_BUFFERED will
+cause the object to be buffered and not sent immediatly (if this is the default behavior based on your connection setup this will happen automatically).
+.sp
+The prototype for this is:
+memcached_return_t (*memcached_trigger_key)(memcached_st *ptr, char *key, size_t key_length, memcached_result_st *result);
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_CALLBACK_DELETE_TRIGGER
+.INDENT 0.0
+.INDENT 3.5
+.sp
+This function implements a trigger upon successful deletion of a key. The memcached_st structure will need to be cloned
+in order to make use of it.
+.sp
+The prototype for this is:
+typedef memcached_return_t (*memcached_trigger_delete_key)(memcached_st *ptr, char *key, size_t key_length);
+.UNINDENT
+.UNINDENT
+.SH RETURN
+.sp
+memcached_callback_get() return the function or structure that was provided.
+Upon error, nothing is set, null is returned, and the memcached_return_t
+argument is set to MEMCACHED_FAILURE.
+.sp
+memcached_callback_set() returns MEMCACHED_SUCCESS upon successful setting,
+otherwise MEMCACHED_FAILURE on error.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_callback_get.3 b/docs/man/memcached_callback_get.3
new file mode 100644 (file)
index 0000000..2db8cfb
--- /dev/null
@@ -0,0 +1,188 @@
+.TH "MEMCACHED_CALLBACK_GET" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_callback_get \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Get and set a callback
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_callback_set (memcached_st *ptr,
+                          memcached_callback_t flag,
+                          void *data);
+
+void *
+  memcached_callback_get (memcached_st *ptr,
+                          memcached_callback_t flag,
+                          memcached_return_t *error);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) can have callbacks set key execution points. These either
+provide function calls at points in the code, or return pointers to
+structures for particular usages.
+.sp
+memcached_callback_get() takes a callback flag and returns the structure or
+function set by memcached_callback_set().
+.sp
+memcached_callback_set() changes the function/structure assigned by a
+callback flag. No connections are reset.
+.sp
+You can use MEMCACHED_CALLBACK_USER_DATA to provide custom context if required for any
+of the callbacks
+.sp
+MEMCACHED_CALLBACK_CLEANUP_FUNCTION
+.INDENT 0.0
+.INDENT 3.5
+.sp
+When memcached_delete() is called this function will be excuted. At the
+point of its execution all connections have been closed.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_CALLBACK_CLONE_FUNCTION
+.INDENT 0.0
+.INDENT 3.5
+.sp
+When memcached_delete() is called this function will be excuted. At the
+point of its execution all connections have been closed.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_CALLBACK_PREFIX_KEY
+.INDENT 0.0
+.INDENT 3.5
+.sp
+You can set a value which will be used to create a domain for your keys.
+The value specified here will be prefixed to each of your keys. The value can not
+be greater then MEMCACHED_PREFIX_KEY_MAX_SIZE \- 1 and will reduce MEMCACHED_MAX_KEY by
+the value of your key. The prefix key is only applied to the primary key,
+not the master key. MEMCACHED_FAILURE will be returned if no key is set. In the case
+of a key which is too long MEMCACHED_BAD_KEY_PROVIDED will be returned.
+.sp
+If you set a value with the value being NULL then the prefix key is disabled.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_CALLBACK_USER_DATA
+.INDENT 0.0
+.INDENT 3.5
+.sp
+This allows you to store a pointer to a specifc piece of data. This can be
+retrieved from inside of memcached_fetch_execute(). Cloning a memcached_st
+will copy the pointer to the clone.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_CALLBACK_MALLOC_FUNCTION
+.INDENT 0.0
+.INDENT 3.5
+.sp
+DEPRECATED: use memcached_set_memory_allocators instead.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_CALLBACK_REALLOC_FUNCTION
+.INDENT 0.0
+.INDENT 3.5
+.sp
+DEPRECATED: use memcached_set_memory_allocators instead.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_CALLBACK_FREE_FUNCTION
+.INDENT 0.0
+.INDENT 3.5
+.sp
+DEPRECATED: use memcached_set_memory_allocators instead.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_CALLBACK_GET_FAILURE
+.INDENT 0.0
+.INDENT 3.5
+.sp
+This function implements the read through cache behavior. On failure of retrieval this callback will be called.
+You are responsible for populating the result object provided. This result object will then be stored in the server and
+returned to the calling process. You must clone the memcached_st in order to
+make use of it. The value will be stored only if you return
+MEMCACHED_SUCCESS or MEMCACHED_BUFFERED. Returning MEMCACHED_BUFFERED will
+cause the object to be buffered and not sent immediatly (if this is the default behavior based on your connection setup this will happen automatically).
+.sp
+The prototype for this is:
+memcached_return_t (*memcached_trigger_key)(memcached_st *ptr, char *key, size_t key_length, memcached_result_st *result);
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_CALLBACK_DELETE_TRIGGER
+.INDENT 0.0
+.INDENT 3.5
+.sp
+This function implements a trigger upon successful deletion of a key. The memcached_st structure will need to be cloned
+in order to make use of it.
+.sp
+The prototype for this is:
+typedef memcached_return_t (*memcached_trigger_delete_key)(memcached_st *ptr, char *key, size_t key_length);
+.UNINDENT
+.UNINDENT
+.SH RETURN
+.sp
+memcached_callback_get() return the function or structure that was provided.
+Upon error, nothing is set, null is returned, and the memcached_return_t
+argument is set to MEMCACHED_FAILURE.
+.sp
+memcached_callback_set() returns MEMCACHED_SUCCESS upon successful setting,
+otherwise MEMCACHED_FAILURE on error.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_callback_set.3 b/docs/man/memcached_callback_set.3
new file mode 100644 (file)
index 0000000..d7d2112
--- /dev/null
@@ -0,0 +1,188 @@
+.TH "MEMCACHED_CALLBACK_SET" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_callback_set \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Get and set a callback
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_callback_set (memcached_st *ptr,
+                          memcached_callback_t flag,
+                          void *data);
+
+void *
+  memcached_callback_get (memcached_st *ptr,
+                          memcached_callback_t flag,
+                          memcached_return_t *error);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) can have callbacks set key execution points. These either
+provide function calls at points in the code, or return pointers to
+structures for particular usages.
+.sp
+memcached_callback_get() takes a callback flag and returns the structure or
+function set by memcached_callback_set().
+.sp
+memcached_callback_set() changes the function/structure assigned by a
+callback flag. No connections are reset.
+.sp
+You can use MEMCACHED_CALLBACK_USER_DATA to provide custom context if required for any
+of the callbacks
+.sp
+MEMCACHED_CALLBACK_CLEANUP_FUNCTION
+.INDENT 0.0
+.INDENT 3.5
+.sp
+When memcached_delete() is called this function will be excuted. At the
+point of its execution all connections have been closed.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_CALLBACK_CLONE_FUNCTION
+.INDENT 0.0
+.INDENT 3.5
+.sp
+When memcached_delete() is called this function will be excuted. At the
+point of its execution all connections have been closed.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_CALLBACK_PREFIX_KEY
+.INDENT 0.0
+.INDENT 3.5
+.sp
+You can set a value which will be used to create a domain for your keys.
+The value specified here will be prefixed to each of your keys. The value can not
+be greater then MEMCACHED_PREFIX_KEY_MAX_SIZE \- 1 and will reduce MEMCACHED_MAX_KEY by
+the value of your key. The prefix key is only applied to the primary key,
+not the master key. MEMCACHED_FAILURE will be returned if no key is set. In the case
+of a key which is too long MEMCACHED_BAD_KEY_PROVIDED will be returned.
+.sp
+If you set a value with the value being NULL then the prefix key is disabled.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_CALLBACK_USER_DATA
+.INDENT 0.0
+.INDENT 3.5
+.sp
+This allows you to store a pointer to a specifc piece of data. This can be
+retrieved from inside of memcached_fetch_execute(). Cloning a memcached_st
+will copy the pointer to the clone.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_CALLBACK_MALLOC_FUNCTION
+.INDENT 0.0
+.INDENT 3.5
+.sp
+DEPRECATED: use memcached_set_memory_allocators instead.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_CALLBACK_REALLOC_FUNCTION
+.INDENT 0.0
+.INDENT 3.5
+.sp
+DEPRECATED: use memcached_set_memory_allocators instead.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_CALLBACK_FREE_FUNCTION
+.INDENT 0.0
+.INDENT 3.5
+.sp
+DEPRECATED: use memcached_set_memory_allocators instead.
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_CALLBACK_GET_FAILURE
+.INDENT 0.0
+.INDENT 3.5
+.sp
+This function implements the read through cache behavior. On failure of retrieval this callback will be called.
+You are responsible for populating the result object provided. This result object will then be stored in the server and
+returned to the calling process. You must clone the memcached_st in order to
+make use of it. The value will be stored only if you return
+MEMCACHED_SUCCESS or MEMCACHED_BUFFERED. Returning MEMCACHED_BUFFERED will
+cause the object to be buffered and not sent immediatly (if this is the default behavior based on your connection setup this will happen automatically).
+.sp
+The prototype for this is:
+memcached_return_t (*memcached_trigger_key)(memcached_st *ptr, char *key, size_t key_length, memcached_result_st *result);
+.UNINDENT
+.UNINDENT
+.sp
+MEMCACHED_CALLBACK_DELETE_TRIGGER
+.INDENT 0.0
+.INDENT 3.5
+.sp
+This function implements a trigger upon successful deletion of a key. The memcached_st structure will need to be cloned
+in order to make use of it.
+.sp
+The prototype for this is:
+typedef memcached_return_t (*memcached_trigger_delete_key)(memcached_st *ptr, char *key, size_t key_length);
+.UNINDENT
+.UNINDENT
+.SH RETURN
+.sp
+memcached_callback_get() return the function or structure that was provided.
+Upon error, nothing is set, null is returned, and the memcached_return_t
+argument is set to MEMCACHED_FAILURE.
+.sp
+memcached_callback_set() returns MEMCACHED_SUCCESS upon successful setting,
+otherwise MEMCACHED_FAILURE on error.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_cas.3 b/docs/man/memcached_cas.3
new file mode 100644 (file)
index 0000000..0c68e49
--- /dev/null
@@ -0,0 +1,216 @@
+.TH "MEMCACHED_CAS" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_cas \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Store value on server
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_set (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 const char *value, size_t value_length,
+                 time_t expiration,
+                 uint32_t flags);
+
+memcached_return_t
+  memcached_add (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 const char *value, size_t value_length,
+                 time_t expiration,
+                 uint32_t flags);
+
+memcached_return_t
+  memcached_replace (memcached_st *ptr,
+                     const char *key, size_t key_length,
+                     const char *value, size_t value_length,
+                     time_t expiration,
+                     uint32_t flags);
+
+memcached_return_t
+  memcached_prepend(memcached_st *ptr,
+                    const char *key, size_t key_length,
+                    const char *value, size_t value_length,
+                    time_t expiration,
+                    uint32_t flags)
+
+memcached_return_t
+  memcached_append(memcached_st *ptr,
+                   const char *key, size_t key_length,
+                    const char *value, size_t value_length,
+                    time_t expiration,
+                    uint32_t flags)
+memcached_return_t
+  memcached_cas(memcached_st *ptr,
+                const char *key, size_t key_length,
+                const char *value, size_t value_length,
+                time_t expiration,
+                uint32_t flags,
+                uint64_t cas);
+
+memcached_return_t
+  memcached_set_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags);
+
+memcached_return_t
+  memcached_add_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags);
+
+memcached_return_t
+  memcached_replace_by_key(memcached_st *ptr,
+                           const char *master_key, size_t master_key_length,
+                           const char *key, size_t key_length,
+                           const char *value, size_t value_length,
+                           time_t expiration,
+                           uint32_t flags);
+
+memcached_return_t
+  memcached_prepend_by_key(memcached_st *ptr,
+                           const char *master_key, size_t master_key_length,
+                           const char *key, size_t key_length,
+                           const char *value, size_t value_length,
+                           time_t expiration,
+                           uint32_t flags);
+
+memcached_return_t
+  memcached_append_by_key(memcached_st *ptr,
+                          const char *master_key, size_t master_key_length,
+                          const char *key, size_t key_length,
+                          const char *value, size_t value_length,
+                          time_t expiration,
+                          uint32_t flags);
+
+memcached_return_t
+  memcached_cas_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags,
+                       uint64_t cas);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_set(), memcached_add(), and memcached_replace() are all used to
+store information on the server. All methods take a key, and its length to
+store the object. Keys are currently limited to 250 characters by the
+memcached(1) server. You must also supply a value and a length. Optionally you
+may support an expiration time for the object and a 16 byte value (it is
+meant to be used as a bitmap).
+.sp
+memcached_set() will write an object to the server. If an object already
+exists it will overwrite what is in the server. If the object does not exist
+it will be written. If you are using the non\-blocking mode this function
+will always return true unless a network error occurs.
+.sp
+memcached_replace() replaces an object on the server. If the object is not
+found on the server an error occurs.
+.sp
+memcached_add() adds an object to the server. If the object is found on the
+server an error occurs, otherwise the value is stored.
+.sp
+memcached_prepend() places a segment of data before the last piece of data
+stored. Currently expiration and key are not used in the server.
+.sp
+memcached_append() places a segment of data at the end of the last piece of
+data stored. Currently expiration and key are not used in the server.
+.sp
+memcached_cas() overwrites data in the server as long as the "cas" value is
+still the same in the server. You can get the cas value of a result by
+calling memcached_result_cas() on a memcached_result_st(3) structure. At the point
+that this note was written cas is still buggy in memached. Turning on support
+for it in libmemcached(3) is optional. Please see memcached_set() for
+information on how to do this.
+.sp
+memcached_set_by_key(), memcached_add_by_key(), memcached_replace_by_key(),
+memcached_prepend_by_key(), memcached_append_by_key_by_key(),
+memcached_cas_by_key() methods all behave in a similar method as the non key
+methods. The difference is that they use their master_key parameter to map
+objects to particular servers.
+.sp
+If you are looking for performance, memcached_set() with non\-blocking IO is
+the fastest way to store data on the server.
+.sp
+All of the above functions are supported with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPbehavior enabled. But when using these operations with this behavior on, there
+are limits to the size of the payload being sent to the server.  The reason for
+these limits is that the Memcahed Server does not allow multi\-datagram requests
+and the current server implementation sets a datagram size to 1400 bytes. Due
+to protocol overhead, the actual limit of the user supplied data is less than
+1400 bytes and depends on the protocol in use as well as the operation being
+executed. When running with the binary protocol, \(ga\(ga MEMCACHED_BEHAVIOR_BINARY_PROTOCOL\(ga\(ga,
+the size of the key,value, flags and expiry combined may not exceed 1368 bytes.
+When running with the ASCII protocol, the exact limit fluctuates depending on
+which function is being executed and whether the function is a cas operation
+or not. For non\-cas ASCII set operations, there are at least 1335 bytes available
+to split among the key, key_prefix, and value; for cas ASCII operations there are
+at least 1318 bytes available to split among the key, key_prefix and value. If the
+total size of the command, including overhead, exceeds 1400 bytes, a \fBMEMCACHED_WRITE_FAILURE\fPwill be returned.
+.SH RETURN
+.sp
+All methods return a value of type \fBmemcached_return_t\fP.
+On success the value will be \fBMEMCACHED_SUCCESS\fP.
+Use memcached_strerror() to translate this value to a printable string.
+.sp
+For memcached_replace() and memcached_add(), \fBMEMCACHED_NOTSTORED\fP is a
+legitmate error in the case of a collision.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_cas_by_key.3 b/docs/man/memcached_cas_by_key.3
new file mode 100644 (file)
index 0000000..b60ef23
--- /dev/null
@@ -0,0 +1,216 @@
+.TH "MEMCACHED_CAS_BY_KEY" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_cas_by_key \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Store value on server
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_set (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 const char *value, size_t value_length,
+                 time_t expiration,
+                 uint32_t flags);
+
+memcached_return_t
+  memcached_add (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 const char *value, size_t value_length,
+                 time_t expiration,
+                 uint32_t flags);
+
+memcached_return_t
+  memcached_replace (memcached_st *ptr,
+                     const char *key, size_t key_length,
+                     const char *value, size_t value_length,
+                     time_t expiration,
+                     uint32_t flags);
+
+memcached_return_t
+  memcached_prepend(memcached_st *ptr,
+                    const char *key, size_t key_length,
+                    const char *value, size_t value_length,
+                    time_t expiration,
+                    uint32_t flags)
+
+memcached_return_t
+  memcached_append(memcached_st *ptr,
+                   const char *key, size_t key_length,
+                    const char *value, size_t value_length,
+                    time_t expiration,
+                    uint32_t flags)
+memcached_return_t
+  memcached_cas(memcached_st *ptr,
+                const char *key, size_t key_length,
+                const char *value, size_t value_length,
+                time_t expiration,
+                uint32_t flags,
+                uint64_t cas);
+
+memcached_return_t
+  memcached_set_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags);
+
+memcached_return_t
+  memcached_add_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags);
+
+memcached_return_t
+  memcached_replace_by_key(memcached_st *ptr,
+                           const char *master_key, size_t master_key_length,
+                           const char *key, size_t key_length,
+                           const char *value, size_t value_length,
+                           time_t expiration,
+                           uint32_t flags);
+
+memcached_return_t
+  memcached_prepend_by_key(memcached_st *ptr,
+                           const char *master_key, size_t master_key_length,
+                           const char *key, size_t key_length,
+                           const char *value, size_t value_length,
+                           time_t expiration,
+                           uint32_t flags);
+
+memcached_return_t
+  memcached_append_by_key(memcached_st *ptr,
+                          const char *master_key, size_t master_key_length,
+                          const char *key, size_t key_length,
+                          const char *value, size_t value_length,
+                          time_t expiration,
+                          uint32_t flags);
+
+memcached_return_t
+  memcached_cas_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags,
+                       uint64_t cas);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_set(), memcached_add(), and memcached_replace() are all used to
+store information on the server. All methods take a key, and its length to
+store the object. Keys are currently limited to 250 characters by the
+memcached(1) server. You must also supply a value and a length. Optionally you
+may support an expiration time for the object and a 16 byte value (it is
+meant to be used as a bitmap).
+.sp
+memcached_set() will write an object to the server. If an object already
+exists it will overwrite what is in the server. If the object does not exist
+it will be written. If you are using the non\-blocking mode this function
+will always return true unless a network error occurs.
+.sp
+memcached_replace() replaces an object on the server. If the object is not
+found on the server an error occurs.
+.sp
+memcached_add() adds an object to the server. If the object is found on the
+server an error occurs, otherwise the value is stored.
+.sp
+memcached_prepend() places a segment of data before the last piece of data
+stored. Currently expiration and key are not used in the server.
+.sp
+memcached_append() places a segment of data at the end of the last piece of
+data stored. Currently expiration and key are not used in the server.
+.sp
+memcached_cas() overwrites data in the server as long as the "cas" value is
+still the same in the server. You can get the cas value of a result by
+calling memcached_result_cas() on a memcached_result_st(3) structure. At the point
+that this note was written cas is still buggy in memached. Turning on support
+for it in libmemcached(3) is optional. Please see memcached_set() for
+information on how to do this.
+.sp
+memcached_set_by_key(), memcached_add_by_key(), memcached_replace_by_key(),
+memcached_prepend_by_key(), memcached_append_by_key_by_key(),
+memcached_cas_by_key() methods all behave in a similar method as the non key
+methods. The difference is that they use their master_key parameter to map
+objects to particular servers.
+.sp
+If you are looking for performance, memcached_set() with non\-blocking IO is
+the fastest way to store data on the server.
+.sp
+All of the above functions are supported with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPbehavior enabled. But when using these operations with this behavior on, there
+are limits to the size of the payload being sent to the server.  The reason for
+these limits is that the Memcahed Server does not allow multi\-datagram requests
+and the current server implementation sets a datagram size to 1400 bytes. Due
+to protocol overhead, the actual limit of the user supplied data is less than
+1400 bytes and depends on the protocol in use as well as the operation being
+executed. When running with the binary protocol, \(ga\(ga MEMCACHED_BEHAVIOR_BINARY_PROTOCOL\(ga\(ga,
+the size of the key,value, flags and expiry combined may not exceed 1368 bytes.
+When running with the ASCII protocol, the exact limit fluctuates depending on
+which function is being executed and whether the function is a cas operation
+or not. For non\-cas ASCII set operations, there are at least 1335 bytes available
+to split among the key, key_prefix, and value; for cas ASCII operations there are
+at least 1318 bytes available to split among the key, key_prefix and value. If the
+total size of the command, including overhead, exceeds 1400 bytes, a \fBMEMCACHED_WRITE_FAILURE\fPwill be returned.
+.SH RETURN
+.sp
+All methods return a value of type \fBmemcached_return_t\fP.
+On success the value will be \fBMEMCACHED_SUCCESS\fP.
+Use memcached_strerror() to translate this value to a printable string.
+.sp
+For memcached_replace() and memcached_add(), \fBMEMCACHED_NOTSTORED\fP is a
+legitmate error in the case of a collision.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_clone.3 b/docs/man/memcached_clone.3
new file mode 100644 (file)
index 0000000..76e11da
--- /dev/null
@@ -0,0 +1,99 @@
+.TH "MEMCACHED_CLONE" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_clone \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Create a memcached_st structure
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_st *memcached_create (memcached_st *ptr);
+
+void memcached_free (memcached_st *ptr);
+
+memcached_st *memcached_clone (memcached_st *destination, memcached_st *source);
+
+void memcached_servers_reset(memcached_st);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_create() is used to create a \fBmemcached_st\fP structure that will then
+be used by other libmemcached(3) functions to communicate with the server. You
+should either pass a statically declared \fBmemcached_st\fP to memcached_create() or
+a NULL. If a NULL passed in then a structure is allocated for you.
+.sp
+memcached_clone() is similar to memcached_create(3) but it copies the
+defaults and list of servers from the source \fBmemcached_st\fP. If you pass a null as
+the argument for the source to clone, it is the same as a call to memcached_create().
+If the destination argument is NULL a \fBmemcached_st\fP will be allocated for you.
+.sp
+memcached_servers_reset() allows you to zero out the list of servers that
+the memcached_st has.
+.sp
+To clean up memory associated with a \fBmemcached_st\fP structure you should pass
+it to memcached_free() when you are finished using it. memcached_free() is
+the only way to make sure all memory is deallocated when you finish using
+the structure.
+.sp
+You may wish to avoid using memcached_create(3) or memcached_clone(3) with a
+stack based allocation. The most common issues related to ABI safety involve
+heap allocated structures.
+.SH RETURN
+.sp
+memcached_create() returns a pointer to the memcached_st that was created
+(or initialized). On an allocation failure, it returns NULL.
+.sp
+memcached_clone() returns a pointer to the memcached_st that was created
+(or initialized). On an allocation failure, it returns NULL.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_create.3 b/docs/man/memcached_create.3
new file mode 100644 (file)
index 0000000..1cd0b8c
--- /dev/null
@@ -0,0 +1,99 @@
+.TH "MEMCACHED_CREATE" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_create \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Create a memcached_st structure
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_st *memcached_create (memcached_st *ptr);
+
+void memcached_free (memcached_st *ptr);
+
+memcached_st *memcached_clone (memcached_st *destination, memcached_st *source);
+
+void memcached_servers_reset(memcached_st);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_create() is used to create a \fBmemcached_st\fP structure that will then
+be used by other libmemcached(3) functions to communicate with the server. You
+should either pass a statically declared \fBmemcached_st\fP to memcached_create() or
+a NULL. If a NULL passed in then a structure is allocated for you.
+.sp
+memcached_clone() is similar to memcached_create(3) but it copies the
+defaults and list of servers from the source \fBmemcached_st\fP. If you pass a null as
+the argument for the source to clone, it is the same as a call to memcached_create().
+If the destination argument is NULL a \fBmemcached_st\fP will be allocated for you.
+.sp
+memcached_servers_reset() allows you to zero out the list of servers that
+the memcached_st has.
+.sp
+To clean up memory associated with a \fBmemcached_st\fP structure you should pass
+it to memcached_free() when you are finished using it. memcached_free() is
+the only way to make sure all memory is deallocated when you finish using
+the structure.
+.sp
+You may wish to avoid using memcached_create(3) or memcached_clone(3) with a
+stack based allocation. The most common issues related to ABI safety involve
+heap allocated structures.
+.SH RETURN
+.sp
+memcached_create() returns a pointer to the memcached_st that was created
+(or initialized). On an allocation failure, it returns NULL.
+.sp
+memcached_clone() returns a pointer to the memcached_st that was created
+(or initialized). On an allocation failure, it returns NULL.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_decrement.3 b/docs/man/memcached_decrement.3
new file mode 100644 (file)
index 0000000..5124a83
--- /dev/null
@@ -0,0 +1,168 @@
+.TH "MEMCACHED_DECREMENT" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_decrement \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manipulate counters
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_increment (memcached_st *ptr,
+                       const char *key, size_t key_length,
+                       unsigned int offset,
+                       uint64_t *value);
+
+memcached_return_t
+  memcached_decrement (memcached_st *ptr,
+                       const char *key, size_t key_length,
+                       unsigned int offset,
+                       uint64_t *value);
+
+memcached_return_t
+  memcached_increment_with_initial (memcached_st *ptr,
+                                    const char *key,
+                                    size_t key_length,
+                                    uint64_t offset,
+                                    uint64_t initial,
+                                    time_t expiration,
+                                    uint64_t *value);
+
+memcached_return_t
+  memcached_decrement_with_initial (memcached_st *ptr,
+                                    const char *key,
+                                    size_t key_length,
+                                    uint64_t offset,
+                                    uint64_t initial,
+                                    time_t expiration,
+                                    uint64_t *value);
+
+memcached_return_t
+  memcached_increment_by_key (memcached_st *ptr,
+                              const char *master_key, size_t master_key_length,
+                              const char *key, size_t key_length,
+                              unsigned int offset,
+                              uint64_t *value);
+
+memcached_return_t
+  memcached_decrement_by_key (memcached_st *ptr,
+                              const char *master_key, size_t master_key_length,
+                              const char *key, size_t key_length,
+                              unsigned int offset,
+                              uint64_t *value);
+
+memcached_return_t
+  memcached_increment_with_initial_by_key (memcached_st *ptr,
+                                           const char *master_key,
+                                           size_t master_key_length,
+                                           const char *key,
+                                           size_t key_length,
+                                           uint64_t offset,
+                                           uint64_t initial,
+                                           time_t expiration,
+                                           uint64_t *value);
+
+memcached_return_t
+  memcached_decrement_with_initial_by_key (memcached_st *ptr,
+                                           const char *master_key,
+                                           size_t master_key_length,
+                                           const char *key,
+                                           size_t key_length,
+                                           uint64_t offset,
+                                           uint64_t initial,
+                                           time_t expiration,
+                                           uint64_t *value);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached(1) servers have the ability to increment and decrement keys
+(overflow and underflow are not detected). This gives you the ability to use
+memcached to generate shared sequences of values.
+.sp
+memcached_increment() takes a key and keylength and increments the value by
+the offset passed to it. The value is then returned via the unsigned int
+value pointer you pass to it.
+.sp
+memcached_decrement() takes a key and keylength and decrements the value by
+the offset passed to it. The value is then returned via the unsigned int
+value pointer you pass to it.
+.sp
+memcached_increment_with_initial() takes a key and keylength and increments
+the value by the offset passed to it. If the object specified by key does
+not exist, one of two things may happen: If the expiration value is
+MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all other
+expiration values, the operation will succeed by seeding the value for that
+key with a initial value to expire with the provided expiration time. The
+flags will be set to zero.The value is then returned via the unsigned int
+value pointer you pass to it.
+.sp
+memcached_decrement_with_initial() takes a key and keylength and decrements
+the value by the offset passed to it. If the object specified by key does
+not exist, one of two things may happen: If the expiration value is
+MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all other
+expiration values, the operation will succeed by seeding the value for that
+key with a initial value to expire with the provided expiration time. The
+flags will be set to zero.The value is then returned via the unsigned int
+value pointer you pass to it.
+.sp
+memcached_increment_by_key(), memcached_decrement_by_key(),
+memcached_increment_with_initial_by_key(), and
+memcached_decrement_with_initial_by_key() are master key equivalents of the
+above.
+.SH RETURN
+.sp
+A value of type \fBmemcached_return_t\fP is returned.
+On success that value will be \fBMEMCACHED_SUCCESS\fP.
+Use memcached_strerror() to translate this value to a printable string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_decrement_with_initial.3 b/docs/man/memcached_decrement_with_initial.3
new file mode 100644 (file)
index 0000000..cadf76d
--- /dev/null
@@ -0,0 +1,168 @@
+.TH "MEMCACHED_DECREMENT_WITH_INITIAL" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_decrement_with_initial \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manipulate counters
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_increment (memcached_st *ptr,
+                       const char *key, size_t key_length,
+                       unsigned int offset,
+                       uint64_t *value);
+
+memcached_return_t
+  memcached_decrement (memcached_st *ptr,
+                       const char *key, size_t key_length,
+                       unsigned int offset,
+                       uint64_t *value);
+
+memcached_return_t
+  memcached_increment_with_initial (memcached_st *ptr,
+                                    const char *key,
+                                    size_t key_length,
+                                    uint64_t offset,
+                                    uint64_t initial,
+                                    time_t expiration,
+                                    uint64_t *value);
+
+memcached_return_t
+  memcached_decrement_with_initial (memcached_st *ptr,
+                                    const char *key,
+                                    size_t key_length,
+                                    uint64_t offset,
+                                    uint64_t initial,
+                                    time_t expiration,
+                                    uint64_t *value);
+
+memcached_return_t
+  memcached_increment_by_key (memcached_st *ptr,
+                              const char *master_key, size_t master_key_length,
+                              const char *key, size_t key_length,
+                              unsigned int offset,
+                              uint64_t *value);
+
+memcached_return_t
+  memcached_decrement_by_key (memcached_st *ptr,
+                              const char *master_key, size_t master_key_length,
+                              const char *key, size_t key_length,
+                              unsigned int offset,
+                              uint64_t *value);
+
+memcached_return_t
+  memcached_increment_with_initial_by_key (memcached_st *ptr,
+                                           const char *master_key,
+                                           size_t master_key_length,
+                                           const char *key,
+                                           size_t key_length,
+                                           uint64_t offset,
+                                           uint64_t initial,
+                                           time_t expiration,
+                                           uint64_t *value);
+
+memcached_return_t
+  memcached_decrement_with_initial_by_key (memcached_st *ptr,
+                                           const char *master_key,
+                                           size_t master_key_length,
+                                           const char *key,
+                                           size_t key_length,
+                                           uint64_t offset,
+                                           uint64_t initial,
+                                           time_t expiration,
+                                           uint64_t *value);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached(1) servers have the ability to increment and decrement keys
+(overflow and underflow are not detected). This gives you the ability to use
+memcached to generate shared sequences of values.
+.sp
+memcached_increment() takes a key and keylength and increments the value by
+the offset passed to it. The value is then returned via the unsigned int
+value pointer you pass to it.
+.sp
+memcached_decrement() takes a key and keylength and decrements the value by
+the offset passed to it. The value is then returned via the unsigned int
+value pointer you pass to it.
+.sp
+memcached_increment_with_initial() takes a key and keylength and increments
+the value by the offset passed to it. If the object specified by key does
+not exist, one of two things may happen: If the expiration value is
+MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all other
+expiration values, the operation will succeed by seeding the value for that
+key with a initial value to expire with the provided expiration time. The
+flags will be set to zero.The value is then returned via the unsigned int
+value pointer you pass to it.
+.sp
+memcached_decrement_with_initial() takes a key and keylength and decrements
+the value by the offset passed to it. If the object specified by key does
+not exist, one of two things may happen: If the expiration value is
+MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all other
+expiration values, the operation will succeed by seeding the value for that
+key with a initial value to expire with the provided expiration time. The
+flags will be set to zero.The value is then returned via the unsigned int
+value pointer you pass to it.
+.sp
+memcached_increment_by_key(), memcached_decrement_by_key(),
+memcached_increment_with_initial_by_key(), and
+memcached_decrement_with_initial_by_key() are master key equivalents of the
+above.
+.SH RETURN
+.sp
+A value of type \fBmemcached_return_t\fP is returned.
+On success that value will be \fBMEMCACHED_SUCCESS\fP.
+Use memcached_strerror() to translate this value to a printable string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_delete.3 b/docs/man/memcached_delete.3
new file mode 100644 (file)
index 0000000..51da4a3
--- /dev/null
@@ -0,0 +1,93 @@
+.TH "MEMCACHED_DELETE" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_delete \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Delete a key
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_delete (memcached_st *ptr,
+                    const char *key, size_t key_length,
+                    time_t expiration);
+
+memcached_return_t
+memcached_delete_by_key (memcached_st *ptr,
+                         const char *master_key, size_t master_key_length,
+                         const char *key, size_t key_length,
+                         time_t expiration);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_delete() is used to delete a particular key.
+memcached_delete_by_key() works the same, but it takes a master key to
+find the given value.
+.sp
+Expiration works by placing the item into a delete queue, which means that
+it won\(aqt possible to retrieve it by the "get" command, but "add" and
+"replace" command with this key will also fail (the "set" command will
+succeed, however). After the time passes, the item is finally deleted from server memory.
+.sp
+Please note the the Danga memcached server removed support for expiration in
+the 1.4 version.
+.SH RETURN
+.sp
+A value of type \fBmemcached_return_t\fP is returned
+On success that value will be \fBMEMCACHED_SUCCESS\fP.
+Use memcached_strerror() to translate this value to a printable string.
+.sp
+If you are using the non\-blocking mode of the library, success only
+means that the message was queued for delivery.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_delete_by_key.3 b/docs/man/memcached_delete_by_key.3
new file mode 100644 (file)
index 0000000..e2bf847
--- /dev/null
@@ -0,0 +1,93 @@
+.TH "MEMCACHED_DELETE_BY_KEY" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_delete_by_key \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Delete a key
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_delete (memcached_st *ptr,
+                    const char *key, size_t key_length,
+                    time_t expiration);
+
+memcached_return_t
+memcached_delete_by_key (memcached_st *ptr,
+                         const char *master_key, size_t master_key_length,
+                         const char *key, size_t key_length,
+                         time_t expiration);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_delete() is used to delete a particular key.
+memcached_delete_by_key() works the same, but it takes a master key to
+find the given value.
+.sp
+Expiration works by placing the item into a delete queue, which means that
+it won\(aqt possible to retrieve it by the "get" command, but "add" and
+"replace" command with this key will also fail (the "set" command will
+succeed, however). After the time passes, the item is finally deleted from server memory.
+.sp
+Please note the the Danga memcached server removed support for expiration in
+the 1.4 version.
+.SH RETURN
+.sp
+A value of type \fBmemcached_return_t\fP is returned
+On success that value will be \fBMEMCACHED_SUCCESS\fP.
+Use memcached_strerror() to translate this value to a printable string.
+.sp
+If you are using the non\-blocking mode of the library, success only
+means that the message was queued for delivery.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_destroy_sasl_auth_data.3 b/docs/man/memcached_destroy_sasl_auth_data.3
new file mode 100644 (file)
index 0000000..65504e5
--- /dev/null
@@ -0,0 +1,94 @@
+.TH "MEMCACHED_DESTROY_SASL_AUTH_DATA" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_destroy_sasl_auth_data \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+SASL support
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+void memcached_set_sasl_callbacks(memcached_st *ptr,
+                                  const sasl_callback_t *callbacks)
+
+const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st *ptr)
+
+memcached_return memcached_set_sasl_auth_data(memcached_st *ptr,
+                                              const char *username,
+                                              const char *password)
+memcached_return memcached_destroy_sasl_auth_data(memcached_st *ptr)
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) allows you to plug in your own callbacks function used by
+libsasl to perform SASL authentication.
+.sp
+Please note that SASL requires the memcached binary protocol, and you have
+to specify the callbacks before you connect to the server.
+.sp
+memcached_set_sasl_auth_data() is a helper function for you defining
+the basic functionality for you, but it will store the username and password
+in memory. If you choose to use this method you have to call
+memcached_destroy_sasl_auth_data before calling memcached_free to avoid
+a memory leak. You should NOT call memcached_destroy_sasl_auth_data if you
+specify your own callback function with memcached_set_sasl_callbacks().
+.sp
+You as a client user have to initialize libsasl by using sasl_client_init
+before enabling it in libmemcached, and you have to shut down libsasl by
+calling sasl_done() when you are done using SASL from libmemcached.
+.SH RETURN
+.sp
+memcached_get_sasl_callbacks() returns the callbacks currently used
+by this memcached handle.
+memcached_get_sasl_set_auth_data() returns MEMCACHED_SUCCESS upon success.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_dump.3 b/docs/man/memcached_dump.3
new file mode 100644 (file)
index 0000000..599c8a1
--- /dev/null
@@ -0,0 +1,85 @@
+.TH "MEMCACHED_DUMP" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_dump \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Get a list of keys found on memcached servers
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_dump (memcached_st *ptr,
+                  memcached_dump_fn *function,
+                  void *context,
+                  uint32_t number_of_callbacks);
+
+typedef memcached_return_t (*memcached_dump_fn)(memcached_st *ptr,
+                                                const char *key,
+                                                size_t key_length,
+                                                void *context);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_dump() is used to get a list of keys found  memcached(1) servers.
+Because memcached(1) does not guarentee to dump all keys you can not assume
+you have fetched all keys from the server. The function takes an array
+of callbacks that it will use to execute on keys as they are found.
+.sp
+Currently the binar protocol is not supported.
+.SH RETURN
+.sp
+A value of type \fBmemcached_return_t\fP is returned
+On success that value will be \fBMEMCACHED_SUCCESS\fP.
+Use memcached_strerror() to translate this value to a printable string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_fetch.3 b/docs/man/memcached_fetch.3
new file mode 100644 (file)
index 0000000..d901605
--- /dev/null
@@ -0,0 +1,206 @@
+.TH "MEMCACHED_FETCH" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_fetch \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Get a value
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_result_st *
+  memcached_fetch_result (memcached_st *ptr,
+                          memcached_result_st *result,
+                          memcached_return_t *error);
+
+char *
+  memcached_get (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 size_t *value_length,
+                 uint32_t *flags,
+                 memcached_return_t *error);
+
+memcached_return_t
+  memcached_mget (memcached_st *ptr,
+                const char * const *keys,
+                const size_t *key_length,
+                size_t number_of_keys);
+char *
+  memcached_get_by_key (memcached_st *ptr,
+                        const char *master_key, size_t master_key_length,
+                        const char *key, size_t key_length,
+                        size_t *value_length,
+                        uint32_t *flags,
+                        memcached_return_t *error);
+
+memcached_return_t
+  memcached_mget_by_key (memcached_st *ptr,
+                         const char *master_key, size_t master_key_length,
+                         const char * const *keys,
+                         const size_t *key_length,
+                         size_t number_of_keys);
+
+char *
+  memcached_fetch (memcached_st *ptr,
+                   char *key, size_t *key_length,
+                   size_t *value_length,
+                   uint32_t *flags,
+                   memcached_return_t *error);
+
+memcached_return_t
+  memcached_fetch_execute (memcached_st *ptr,
+                           memcached_execute_fn *callback,
+                           void *context,
+                           uint32_t number_of_callbacks);
+
+
+memcached_return_t
+  memcached_mget_execute (memcached_st *ptr,
+                          const char * const *keys,
+                          const size_t *key_length,
+                          size_t number_of_keys,
+                          memcached_execute_fn *callback,
+                          void *context,
+                          uint32_t number_of_callbacks);
+
+memcached_return_t
+  memcached_mget_execute_by_key (memcached_st *ptr,
+                                 const char *master_key,
+                                 size_t master_key_length,
+                                 const char * const *keys,
+                                 const size_t *key_length,
+                                 size_t number_of_keys,
+                                 memcached_execute_fn *callback,
+                                 void *context,
+                                 uint32_t number_of_callbacks);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_get() is used to fetch an individual value from the server. You
+must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A uint32_t pointer to contain whatever flags you stored with the value,
+a size_t pointer which will be filled with size of of the object, and a
+memcached_return_t pointer to hold any error. The object will be returned
+upon success and NULL will be returned on failure. Any object returned by
+memcached_get() must be released by the caller application.
+.sp
+memcached_mget() is used to select multiple keys at once. For multiple key
+operations it is always faster to use this function. This function always
+works asynchronously. memcached_fetch() is then used to retrieve any keys
+found. No error is given on keys that are not found. You must call either
+memcached_fetch() or memcached_fetch_result() after a successful call to
+memcached_mget(). You should continue to call these functions until they
+return NULL (aka no more values). If you need to quit in the middle of a
+memcached_get() call, execute a memcached_quit(). After you do this, you can
+issue new queries against the server.
+.sp
+memcached_fetch() is used to fetch an individual value from the server.
+memcached_mget() must always be called before using this method.  You
+must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A uint32_t pointer to contain whatever flags you stored with the value,
+a size_t pointer which will be filled with size of of the object, and a
+memcached_return_t pointer to hold any error. The object will be returned
+upon success and NULL will be returned on failure. MEMCACHD_END is returned
+by the *error value when all objects that have been found are returned.
+The final value upon MEMCACHED_END is null. Values returned by
+memcached_fetch() musted be free\(aqed by the caller. memcached_fetch() will
+be DEPRECATED in the near future, memcached_fetch_result() should be used
+instead.
+.sp
+memcached_fetch_result() is used to return a memcached_result_st(3) structure
+from a memcached server. The result object is forward compatible with changes
+to the server. For more information please refer to the memcached_result_st(3)
+help. This function will dynamically allocate a result structure for you
+if you do not pass one to the function.
+.sp
+memcached_fetch_execute() is a callback function for result sets. Instead
+of returning the results to you for processing, it passes each of the
+result sets to the list of functions you provide. It passes to the function
+a memcached_st that can be cloned for use in the called function (it can not
+be used directly). It also passes a result set which does not need to be freed.
+Finally it passes a "context". This is just a pointer to a memory reference
+you supply the calling function. Currently only one value is being passed
+to each function call. In the future there will be an option to allow this
+to be an array.
+.sp
+memcached_mget_execute() and memcached_mget_execute_by_key() is
+similar to memcached_mget(), but it may trigger the supplied callbacks
+with result sets while sending out the queries. If you try to perform
+a really large multiget with memcached_mget() you may encounter a
+deadlock in the OS kernel (we fail to write data to the socket because
+the input buffer is full). memcached_mget_execute() solves this
+problem by processing some of the results before continuing sending
+out requests. Please note that this function is only available in the
+binary protocol.
+.sp
+memcached_get_by_key() and memcached_mget_by_key() behave in a similar nature
+as memcached_get() and memcached_mget(). The difference is that they take
+a master key that is used for determining which server an object was stored
+if key partitioning was used for storage.
+.sp
+All of the above functions are not supported when the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPhas been set. Executing any of these functions with this behavior on will result in
+\fBMEMCACHED_NOT_SUPPORTED\fP being returned or, for those functions which do not return
+a \fBmemcached_return_t\fP, the error function parameter will be set to
+\fBMEMCACHED_NOT_SUPPORTED\fP.
+.SH RETURN
+.sp
+All objects returned must be freed by the calling application.
+memcached_get() and memcached_fetch() will return NULL on error. You must
+look at the value of error to determine what the actual error was.
+.sp
+MEMCACHED_KEY_TOO_BIG is set to error whenever memcached_fetch() was used
+and the key was set larger then MEMCACHED_MAX_KEY, which was the largest
+key allowed for the original memcached ascii server.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_fetch_execute.3 b/docs/man/memcached_fetch_execute.3
new file mode 100644 (file)
index 0000000..5d73721
--- /dev/null
@@ -0,0 +1,206 @@
+.TH "MEMCACHED_FETCH_EXECUTE" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_fetch_execute \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Get a value
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_result_st *
+  memcached_fetch_result (memcached_st *ptr,
+                          memcached_result_st *result,
+                          memcached_return_t *error);
+
+char *
+  memcached_get (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 size_t *value_length,
+                 uint32_t *flags,
+                 memcached_return_t *error);
+
+memcached_return_t
+  memcached_mget (memcached_st *ptr,
+                const char * const *keys,
+                const size_t *key_length,
+                size_t number_of_keys);
+char *
+  memcached_get_by_key (memcached_st *ptr,
+                        const char *master_key, size_t master_key_length,
+                        const char *key, size_t key_length,
+                        size_t *value_length,
+                        uint32_t *flags,
+                        memcached_return_t *error);
+
+memcached_return_t
+  memcached_mget_by_key (memcached_st *ptr,
+                         const char *master_key, size_t master_key_length,
+                         const char * const *keys,
+                         const size_t *key_length,
+                         size_t number_of_keys);
+
+char *
+  memcached_fetch (memcached_st *ptr,
+                   char *key, size_t *key_length,
+                   size_t *value_length,
+                   uint32_t *flags,
+                   memcached_return_t *error);
+
+memcached_return_t
+  memcached_fetch_execute (memcached_st *ptr,
+                           memcached_execute_fn *callback,
+                           void *context,
+                           uint32_t number_of_callbacks);
+
+
+memcached_return_t
+  memcached_mget_execute (memcached_st *ptr,
+                          const char * const *keys,
+                          const size_t *key_length,
+                          size_t number_of_keys,
+                          memcached_execute_fn *callback,
+                          void *context,
+                          uint32_t number_of_callbacks);
+
+memcached_return_t
+  memcached_mget_execute_by_key (memcached_st *ptr,
+                                 const char *master_key,
+                                 size_t master_key_length,
+                                 const char * const *keys,
+                                 const size_t *key_length,
+                                 size_t number_of_keys,
+                                 memcached_execute_fn *callback,
+                                 void *context,
+                                 uint32_t number_of_callbacks);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_get() is used to fetch an individual value from the server. You
+must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A uint32_t pointer to contain whatever flags you stored with the value,
+a size_t pointer which will be filled with size of of the object, and a
+memcached_return_t pointer to hold any error. The object will be returned
+upon success and NULL will be returned on failure. Any object returned by
+memcached_get() must be released by the caller application.
+.sp
+memcached_mget() is used to select multiple keys at once. For multiple key
+operations it is always faster to use this function. This function always
+works asynchronously. memcached_fetch() is then used to retrieve any keys
+found. No error is given on keys that are not found. You must call either
+memcached_fetch() or memcached_fetch_result() after a successful call to
+memcached_mget(). You should continue to call these functions until they
+return NULL (aka no more values). If you need to quit in the middle of a
+memcached_get() call, execute a memcached_quit(). After you do this, you can
+issue new queries against the server.
+.sp
+memcached_fetch() is used to fetch an individual value from the server.
+memcached_mget() must always be called before using this method.  You
+must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A uint32_t pointer to contain whatever flags you stored with the value,
+a size_t pointer which will be filled with size of of the object, and a
+memcached_return_t pointer to hold any error. The object will be returned
+upon success and NULL will be returned on failure. MEMCACHD_END is returned
+by the *error value when all objects that have been found are returned.
+The final value upon MEMCACHED_END is null. Values returned by
+memcached_fetch() musted be free\(aqed by the caller. memcached_fetch() will
+be DEPRECATED in the near future, memcached_fetch_result() should be used
+instead.
+.sp
+memcached_fetch_result() is used to return a memcached_result_st(3) structure
+from a memcached server. The result object is forward compatible with changes
+to the server. For more information please refer to the memcached_result_st(3)
+help. This function will dynamically allocate a result structure for you
+if you do not pass one to the function.
+.sp
+memcached_fetch_execute() is a callback function for result sets. Instead
+of returning the results to you for processing, it passes each of the
+result sets to the list of functions you provide. It passes to the function
+a memcached_st that can be cloned for use in the called function (it can not
+be used directly). It also passes a result set which does not need to be freed.
+Finally it passes a "context". This is just a pointer to a memory reference
+you supply the calling function. Currently only one value is being passed
+to each function call. In the future there will be an option to allow this
+to be an array.
+.sp
+memcached_mget_execute() and memcached_mget_execute_by_key() is
+similar to memcached_mget(), but it may trigger the supplied callbacks
+with result sets while sending out the queries. If you try to perform
+a really large multiget with memcached_mget() you may encounter a
+deadlock in the OS kernel (we fail to write data to the socket because
+the input buffer is full). memcached_mget_execute() solves this
+problem by processing some of the results before continuing sending
+out requests. Please note that this function is only available in the
+binary protocol.
+.sp
+memcached_get_by_key() and memcached_mget_by_key() behave in a similar nature
+as memcached_get() and memcached_mget(). The difference is that they take
+a master key that is used for determining which server an object was stored
+if key partitioning was used for storage.
+.sp
+All of the above functions are not supported when the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPhas been set. Executing any of these functions with this behavior on will result in
+\fBMEMCACHED_NOT_SUPPORTED\fP being returned or, for those functions which do not return
+a \fBmemcached_return_t\fP, the error function parameter will be set to
+\fBMEMCACHED_NOT_SUPPORTED\fP.
+.SH RETURN
+.sp
+All objects returned must be freed by the calling application.
+memcached_get() and memcached_fetch() will return NULL on error. You must
+look at the value of error to determine what the actual error was.
+.sp
+MEMCACHED_KEY_TOO_BIG is set to error whenever memcached_fetch() was used
+and the key was set larger then MEMCACHED_MAX_KEY, which was the largest
+key allowed for the original memcached ascii server.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_fetch_result.3 b/docs/man/memcached_fetch_result.3
new file mode 100644 (file)
index 0000000..fc6c844
--- /dev/null
@@ -0,0 +1,206 @@
+.TH "MEMCACHED_FETCH_RESULT" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_fetch_result \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Get a value
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_result_st *
+  memcached_fetch_result (memcached_st *ptr,
+                          memcached_result_st *result,
+                          memcached_return_t *error);
+
+char *
+  memcached_get (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 size_t *value_length,
+                 uint32_t *flags,
+                 memcached_return_t *error);
+
+memcached_return_t
+  memcached_mget (memcached_st *ptr,
+                const char * const *keys,
+                const size_t *key_length,
+                size_t number_of_keys);
+char *
+  memcached_get_by_key (memcached_st *ptr,
+                        const char *master_key, size_t master_key_length,
+                        const char *key, size_t key_length,
+                        size_t *value_length,
+                        uint32_t *flags,
+                        memcached_return_t *error);
+
+memcached_return_t
+  memcached_mget_by_key (memcached_st *ptr,
+                         const char *master_key, size_t master_key_length,
+                         const char * const *keys,
+                         const size_t *key_length,
+                         size_t number_of_keys);
+
+char *
+  memcached_fetch (memcached_st *ptr,
+                   char *key, size_t *key_length,
+                   size_t *value_length,
+                   uint32_t *flags,
+                   memcached_return_t *error);
+
+memcached_return_t
+  memcached_fetch_execute (memcached_st *ptr,
+                           memcached_execute_fn *callback,
+                           void *context,
+                           uint32_t number_of_callbacks);
+
+
+memcached_return_t
+  memcached_mget_execute (memcached_st *ptr,
+                          const char * const *keys,
+                          const size_t *key_length,
+                          size_t number_of_keys,
+                          memcached_execute_fn *callback,
+                          void *context,
+                          uint32_t number_of_callbacks);
+
+memcached_return_t
+  memcached_mget_execute_by_key (memcached_st *ptr,
+                                 const char *master_key,
+                                 size_t master_key_length,
+                                 const char * const *keys,
+                                 const size_t *key_length,
+                                 size_t number_of_keys,
+                                 memcached_execute_fn *callback,
+                                 void *context,
+                                 uint32_t number_of_callbacks);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_get() is used to fetch an individual value from the server. You
+must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A uint32_t pointer to contain whatever flags you stored with the value,
+a size_t pointer which will be filled with size of of the object, and a
+memcached_return_t pointer to hold any error. The object will be returned
+upon success and NULL will be returned on failure. Any object returned by
+memcached_get() must be released by the caller application.
+.sp
+memcached_mget() is used to select multiple keys at once. For multiple key
+operations it is always faster to use this function. This function always
+works asynchronously. memcached_fetch() is then used to retrieve any keys
+found. No error is given on keys that are not found. You must call either
+memcached_fetch() or memcached_fetch_result() after a successful call to
+memcached_mget(). You should continue to call these functions until they
+return NULL (aka no more values). If you need to quit in the middle of a
+memcached_get() call, execute a memcached_quit(). After you do this, you can
+issue new queries against the server.
+.sp
+memcached_fetch() is used to fetch an individual value from the server.
+memcached_mget() must always be called before using this method.  You
+must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A uint32_t pointer to contain whatever flags you stored with the value,
+a size_t pointer which will be filled with size of of the object, and a
+memcached_return_t pointer to hold any error. The object will be returned
+upon success and NULL will be returned on failure. MEMCACHD_END is returned
+by the *error value when all objects that have been found are returned.
+The final value upon MEMCACHED_END is null. Values returned by
+memcached_fetch() musted be free\(aqed by the caller. memcached_fetch() will
+be DEPRECATED in the near future, memcached_fetch_result() should be used
+instead.
+.sp
+memcached_fetch_result() is used to return a memcached_result_st(3) structure
+from a memcached server. The result object is forward compatible with changes
+to the server. For more information please refer to the memcached_result_st(3)
+help. This function will dynamically allocate a result structure for you
+if you do not pass one to the function.
+.sp
+memcached_fetch_execute() is a callback function for result sets. Instead
+of returning the results to you for processing, it passes each of the
+result sets to the list of functions you provide. It passes to the function
+a memcached_st that can be cloned for use in the called function (it can not
+be used directly). It also passes a result set which does not need to be freed.
+Finally it passes a "context". This is just a pointer to a memory reference
+you supply the calling function. Currently only one value is being passed
+to each function call. In the future there will be an option to allow this
+to be an array.
+.sp
+memcached_mget_execute() and memcached_mget_execute_by_key() is
+similar to memcached_mget(), but it may trigger the supplied callbacks
+with result sets while sending out the queries. If you try to perform
+a really large multiget with memcached_mget() you may encounter a
+deadlock in the OS kernel (we fail to write data to the socket because
+the input buffer is full). memcached_mget_execute() solves this
+problem by processing some of the results before continuing sending
+out requests. Please note that this function is only available in the
+binary protocol.
+.sp
+memcached_get_by_key() and memcached_mget_by_key() behave in a similar nature
+as memcached_get() and memcached_mget(). The difference is that they take
+a master key that is used for determining which server an object was stored
+if key partitioning was used for storage.
+.sp
+All of the above functions are not supported when the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPhas been set. Executing any of these functions with this behavior on will result in
+\fBMEMCACHED_NOT_SUPPORTED\fP being returned or, for those functions which do not return
+a \fBmemcached_return_t\fP, the error function parameter will be set to
+\fBMEMCACHED_NOT_SUPPORTED\fP.
+.SH RETURN
+.sp
+All objects returned must be freed by the calling application.
+memcached_get() and memcached_fetch() will return NULL on error. You must
+look at the value of error to determine what the actual error was.
+.sp
+MEMCACHED_KEY_TOO_BIG is set to error whenever memcached_fetch() was used
+and the key was set larger then MEMCACHED_MAX_KEY, which was the largest
+key allowed for the original memcached ascii server.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_flush.3 b/docs/man/memcached_flush.3
new file mode 100644 (file)
index 0000000..9ef4144
--- /dev/null
@@ -0,0 +1,78 @@
+.TH "MEMCACHED_FLUSH" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_flush \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Wipe contents of memcached servers
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_flush (memcached_st *ptr,
+                   time_t expiration);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_flush() is used to wipe clean the contents of memcached(1) servers.
+It will either do this immediately or expire the content based on the
+expiration time passed to the method (a value of zero causes an immediate
+flush). The operation is not atomic to multiple servers, just atomic to a
+single server. That is, it will flush the servers in the order that they were
+added.
+.SH RETURN
+.sp
+A value of type \fBmemcached_return_t\fP is returned
+On success that value will be \fBMEMCACHED_SUCCESS\fP.
+Use memcached_strerror() to translate this value to a printable string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_flush_buffers.3 b/docs/man/memcached_flush_buffers.3
new file mode 100644 (file)
index 0000000..f57262c
--- /dev/null
@@ -0,0 +1,74 @@
+.TH "MEMCACHED_FLUSH_BUFFERS" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_flush_buffers \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Flush buffers and send buffered commands
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_flush_buffers (memcached_st *ptr);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_flush_buffers() is used in conjunction with
+MEMCACHED_BEHAVIOR_BUFFER_REQUESTS (see memcached_behavior(3)) to flush
+all buffers by sending the buffered commands to the server for processing.
+.SH RETURN
+.sp
+A value of type \fBmemcached_return_t\fP is returned
+On success that value will be \fBMEMCACHED_SUCCESS\fP.
+Use memcached_strerror() to translate this value to a printable string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3) memcached_behavior(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_free.3 b/docs/man/memcached_free.3
new file mode 100644 (file)
index 0000000..d169176
--- /dev/null
@@ -0,0 +1,99 @@
+.TH "MEMCACHED_FREE" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_free \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Create a memcached_st structure
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_st *memcached_create (memcached_st *ptr);
+
+void memcached_free (memcached_st *ptr);
+
+memcached_st *memcached_clone (memcached_st *destination, memcached_st *source);
+
+void memcached_servers_reset(memcached_st);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_create() is used to create a \fBmemcached_st\fP structure that will then
+be used by other libmemcached(3) functions to communicate with the server. You
+should either pass a statically declared \fBmemcached_st\fP to memcached_create() or
+a NULL. If a NULL passed in then a structure is allocated for you.
+.sp
+memcached_clone() is similar to memcached_create(3) but it copies the
+defaults and list of servers from the source \fBmemcached_st\fP. If you pass a null as
+the argument for the source to clone, it is the same as a call to memcached_create().
+If the destination argument is NULL a \fBmemcached_st\fP will be allocated for you.
+.sp
+memcached_servers_reset() allows you to zero out the list of servers that
+the memcached_st has.
+.sp
+To clean up memory associated with a \fBmemcached_st\fP structure you should pass
+it to memcached_free() when you are finished using it. memcached_free() is
+the only way to make sure all memory is deallocated when you finish using
+the structure.
+.sp
+You may wish to avoid using memcached_create(3) or memcached_clone(3) with a
+stack based allocation. The most common issues related to ABI safety involve
+heap allocated structures.
+.SH RETURN
+.sp
+memcached_create() returns a pointer to the memcached_st that was created
+(or initialized). On an allocation failure, it returns NULL.
+.sp
+memcached_clone() returns a pointer to the memcached_st that was created
+(or initialized). On an allocation failure, it returns NULL.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_generate_hash_value.3 b/docs/man/memcached_generate_hash_value.3
new file mode 100644 (file)
index 0000000..21ce63b
--- /dev/null
@@ -0,0 +1,92 @@
+.TH "MEMCACHED_GENERATE_HASH_VALUE" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_generate_hash_value \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Hash a key value
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+uint32_t
+  memcached_generate_hash_value (const char *key,
+                                 size_t key_length,
+                                 memcached_hash_t hash_algorithm);
+
+uint32_t
+  memcached_generate_hash (memcached_st *ptr,
+                           const char *key,
+                           size_t key_length);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_generate_hash_value() allows you to hash a key using one of
+the hash functions defined in the library. This method is provided for
+the convenience of higher\-level language bindings and is not necessary
+for normal memcache operations.
+.sp
+The allowed hash algorithm constants are listed in the manpage for
+memcached_behavior_set().
+.sp
+memcached_generate_hash() takes a memcached_st struture and produces
+the hash value that would have been generated based on the defaults
+of the memcached_st structure.
+.sp
+As of version 0.36 all hash methods have been placed into the library
+libhashkit(3) which is linked with libmemcached(3).
+.SH RETURN
+.sp
+A 32\-bit integer which is the result of hashing the given key.
+For 64\-bit hash algorithms, only the least\-significant 32 bits are
+returned.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_behavior_set(3) libhashkit(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_get.3 b/docs/man/memcached_get.3
new file mode 100644 (file)
index 0000000..580206b
--- /dev/null
@@ -0,0 +1,206 @@
+.TH "MEMCACHED_GET" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_get \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Get a value
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_result_st *
+  memcached_fetch_result (memcached_st *ptr,
+                          memcached_result_st *result,
+                          memcached_return_t *error);
+
+char *
+  memcached_get (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 size_t *value_length,
+                 uint32_t *flags,
+                 memcached_return_t *error);
+
+memcached_return_t
+  memcached_mget (memcached_st *ptr,
+                const char * const *keys,
+                const size_t *key_length,
+                size_t number_of_keys);
+char *
+  memcached_get_by_key (memcached_st *ptr,
+                        const char *master_key, size_t master_key_length,
+                        const char *key, size_t key_length,
+                        size_t *value_length,
+                        uint32_t *flags,
+                        memcached_return_t *error);
+
+memcached_return_t
+  memcached_mget_by_key (memcached_st *ptr,
+                         const char *master_key, size_t master_key_length,
+                         const char * const *keys,
+                         const size_t *key_length,
+                         size_t number_of_keys);
+
+char *
+  memcached_fetch (memcached_st *ptr,
+                   char *key, size_t *key_length,
+                   size_t *value_length,
+                   uint32_t *flags,
+                   memcached_return_t *error);
+
+memcached_return_t
+  memcached_fetch_execute (memcached_st *ptr,
+                           memcached_execute_fn *callback,
+                           void *context,
+                           uint32_t number_of_callbacks);
+
+
+memcached_return_t
+  memcached_mget_execute (memcached_st *ptr,
+                          const char * const *keys,
+                          const size_t *key_length,
+                          size_t number_of_keys,
+                          memcached_execute_fn *callback,
+                          void *context,
+                          uint32_t number_of_callbacks);
+
+memcached_return_t
+  memcached_mget_execute_by_key (memcached_st *ptr,
+                                 const char *master_key,
+                                 size_t master_key_length,
+                                 const char * const *keys,
+                                 const size_t *key_length,
+                                 size_t number_of_keys,
+                                 memcached_execute_fn *callback,
+                                 void *context,
+                                 uint32_t number_of_callbacks);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_get() is used to fetch an individual value from the server. You
+must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A uint32_t pointer to contain whatever flags you stored with the value,
+a size_t pointer which will be filled with size of of the object, and a
+memcached_return_t pointer to hold any error. The object will be returned
+upon success and NULL will be returned on failure. Any object returned by
+memcached_get() must be released by the caller application.
+.sp
+memcached_mget() is used to select multiple keys at once. For multiple key
+operations it is always faster to use this function. This function always
+works asynchronously. memcached_fetch() is then used to retrieve any keys
+found. No error is given on keys that are not found. You must call either
+memcached_fetch() or memcached_fetch_result() after a successful call to
+memcached_mget(). You should continue to call these functions until they
+return NULL (aka no more values). If you need to quit in the middle of a
+memcached_get() call, execute a memcached_quit(). After you do this, you can
+issue new queries against the server.
+.sp
+memcached_fetch() is used to fetch an individual value from the server.
+memcached_mget() must always be called before using this method.  You
+must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A uint32_t pointer to contain whatever flags you stored with the value,
+a size_t pointer which will be filled with size of of the object, and a
+memcached_return_t pointer to hold any error. The object will be returned
+upon success and NULL will be returned on failure. MEMCACHD_END is returned
+by the *error value when all objects that have been found are returned.
+The final value upon MEMCACHED_END is null. Values returned by
+memcached_fetch() musted be free\(aqed by the caller. memcached_fetch() will
+be DEPRECATED in the near future, memcached_fetch_result() should be used
+instead.
+.sp
+memcached_fetch_result() is used to return a memcached_result_st(3) structure
+from a memcached server. The result object is forward compatible with changes
+to the server. For more information please refer to the memcached_result_st(3)
+help. This function will dynamically allocate a result structure for you
+if you do not pass one to the function.
+.sp
+memcached_fetch_execute() is a callback function for result sets. Instead
+of returning the results to you for processing, it passes each of the
+result sets to the list of functions you provide. It passes to the function
+a memcached_st that can be cloned for use in the called function (it can not
+be used directly). It also passes a result set which does not need to be freed.
+Finally it passes a "context". This is just a pointer to a memory reference
+you supply the calling function. Currently only one value is being passed
+to each function call. In the future there will be an option to allow this
+to be an array.
+.sp
+memcached_mget_execute() and memcached_mget_execute_by_key() is
+similar to memcached_mget(), but it may trigger the supplied callbacks
+with result sets while sending out the queries. If you try to perform
+a really large multiget with memcached_mget() you may encounter a
+deadlock in the OS kernel (we fail to write data to the socket because
+the input buffer is full). memcached_mget_execute() solves this
+problem by processing some of the results before continuing sending
+out requests. Please note that this function is only available in the
+binary protocol.
+.sp
+memcached_get_by_key() and memcached_mget_by_key() behave in a similar nature
+as memcached_get() and memcached_mget(). The difference is that they take
+a master key that is used for determining which server an object was stored
+if key partitioning was used for storage.
+.sp
+All of the above functions are not supported when the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPhas been set. Executing any of these functions with this behavior on will result in
+\fBMEMCACHED_NOT_SUPPORTED\fP being returned or, for those functions which do not return
+a \fBmemcached_return_t\fP, the error function parameter will be set to
+\fBMEMCACHED_NOT_SUPPORTED\fP.
+.SH RETURN
+.sp
+All objects returned must be freed by the calling application.
+memcached_get() and memcached_fetch() will return NULL on error. You must
+look at the value of error to determine what the actual error was.
+.sp
+MEMCACHED_KEY_TOO_BIG is set to error whenever memcached_fetch() was used
+and the key was set larger then MEMCACHED_MAX_KEY, which was the largest
+key allowed for the original memcached ascii server.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_get_by_key.3 b/docs/man/memcached_get_by_key.3
new file mode 100644 (file)
index 0000000..91a4c6a
--- /dev/null
@@ -0,0 +1,206 @@
+.TH "MEMCACHED_GET_BY_KEY" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_get_by_key \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Get a value
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_result_st *
+  memcached_fetch_result (memcached_st *ptr,
+                          memcached_result_st *result,
+                          memcached_return_t *error);
+
+char *
+  memcached_get (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 size_t *value_length,
+                 uint32_t *flags,
+                 memcached_return_t *error);
+
+memcached_return_t
+  memcached_mget (memcached_st *ptr,
+                const char * const *keys,
+                const size_t *key_length,
+                size_t number_of_keys);
+char *
+  memcached_get_by_key (memcached_st *ptr,
+                        const char *master_key, size_t master_key_length,
+                        const char *key, size_t key_length,
+                        size_t *value_length,
+                        uint32_t *flags,
+                        memcached_return_t *error);
+
+memcached_return_t
+  memcached_mget_by_key (memcached_st *ptr,
+                         const char *master_key, size_t master_key_length,
+                         const char * const *keys,
+                         const size_t *key_length,
+                         size_t number_of_keys);
+
+char *
+  memcached_fetch (memcached_st *ptr,
+                   char *key, size_t *key_length,
+                   size_t *value_length,
+                   uint32_t *flags,
+                   memcached_return_t *error);
+
+memcached_return_t
+  memcached_fetch_execute (memcached_st *ptr,
+                           memcached_execute_fn *callback,
+                           void *context,
+                           uint32_t number_of_callbacks);
+
+
+memcached_return_t
+  memcached_mget_execute (memcached_st *ptr,
+                          const char * const *keys,
+                          const size_t *key_length,
+                          size_t number_of_keys,
+                          memcached_execute_fn *callback,
+                          void *context,
+                          uint32_t number_of_callbacks);
+
+memcached_return_t
+  memcached_mget_execute_by_key (memcached_st *ptr,
+                                 const char *master_key,
+                                 size_t master_key_length,
+                                 const char * const *keys,
+                                 const size_t *key_length,
+                                 size_t number_of_keys,
+                                 memcached_execute_fn *callback,
+                                 void *context,
+                                 uint32_t number_of_callbacks);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_get() is used to fetch an individual value from the server. You
+must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A uint32_t pointer to contain whatever flags you stored with the value,
+a size_t pointer which will be filled with size of of the object, and a
+memcached_return_t pointer to hold any error. The object will be returned
+upon success and NULL will be returned on failure. Any object returned by
+memcached_get() must be released by the caller application.
+.sp
+memcached_mget() is used to select multiple keys at once. For multiple key
+operations it is always faster to use this function. This function always
+works asynchronously. memcached_fetch() is then used to retrieve any keys
+found. No error is given on keys that are not found. You must call either
+memcached_fetch() or memcached_fetch_result() after a successful call to
+memcached_mget(). You should continue to call these functions until they
+return NULL (aka no more values). If you need to quit in the middle of a
+memcached_get() call, execute a memcached_quit(). After you do this, you can
+issue new queries against the server.
+.sp
+memcached_fetch() is used to fetch an individual value from the server.
+memcached_mget() must always be called before using this method.  You
+must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A uint32_t pointer to contain whatever flags you stored with the value,
+a size_t pointer which will be filled with size of of the object, and a
+memcached_return_t pointer to hold any error. The object will be returned
+upon success and NULL will be returned on failure. MEMCACHD_END is returned
+by the *error value when all objects that have been found are returned.
+The final value upon MEMCACHED_END is null. Values returned by
+memcached_fetch() musted be free\(aqed by the caller. memcached_fetch() will
+be DEPRECATED in the near future, memcached_fetch_result() should be used
+instead.
+.sp
+memcached_fetch_result() is used to return a memcached_result_st(3) structure
+from a memcached server. The result object is forward compatible with changes
+to the server. For more information please refer to the memcached_result_st(3)
+help. This function will dynamically allocate a result structure for you
+if you do not pass one to the function.
+.sp
+memcached_fetch_execute() is a callback function for result sets. Instead
+of returning the results to you for processing, it passes each of the
+result sets to the list of functions you provide. It passes to the function
+a memcached_st that can be cloned for use in the called function (it can not
+be used directly). It also passes a result set which does not need to be freed.
+Finally it passes a "context". This is just a pointer to a memory reference
+you supply the calling function. Currently only one value is being passed
+to each function call. In the future there will be an option to allow this
+to be an array.
+.sp
+memcached_mget_execute() and memcached_mget_execute_by_key() is
+similar to memcached_mget(), but it may trigger the supplied callbacks
+with result sets while sending out the queries. If you try to perform
+a really large multiget with memcached_mget() you may encounter a
+deadlock in the OS kernel (we fail to write data to the socket because
+the input buffer is full). memcached_mget_execute() solves this
+problem by processing some of the results before continuing sending
+out requests. Please note that this function is only available in the
+binary protocol.
+.sp
+memcached_get_by_key() and memcached_mget_by_key() behave in a similar nature
+as memcached_get() and memcached_mget(). The difference is that they take
+a master key that is used for determining which server an object was stored
+if key partitioning was used for storage.
+.sp
+All of the above functions are not supported when the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPhas been set. Executing any of these functions with this behavior on will result in
+\fBMEMCACHED_NOT_SUPPORTED\fP being returned or, for those functions which do not return
+a \fBmemcached_return_t\fP, the error function parameter will be set to
+\fBMEMCACHED_NOT_SUPPORTED\fP.
+.SH RETURN
+.sp
+All objects returned must be freed by the calling application.
+memcached_get() and memcached_fetch() will return NULL on error. You must
+look at the value of error to determine what the actual error was.
+.sp
+MEMCACHED_KEY_TOO_BIG is set to error whenever memcached_fetch() was used
+and the key was set larger then MEMCACHED_MAX_KEY, which was the largest
+key allowed for the original memcached ascii server.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_get_memory_allocators.3 b/docs/man/memcached_get_memory_allocators.3
new file mode 100644 (file)
index 0000000..13847e6
--- /dev/null
@@ -0,0 +1,129 @@
+.TH "MEMCACHED_GET_MEMORY_ALLOCATORS" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_get_memory_allocators \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manage memory allocator functions
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_set_memory_allocators (memcached_st *ptr,
+                                   memcached_malloc_fn mem_malloc,
+                                   memcached_free_fn mem_free,
+                                   memcached_realloc_fn mem_realloc,
+                                   memcached_calloc_fn mem_calloc,
+                                  void *context);
+
+void
+  memcached_get_memory_allocators (memcached_st *ptr,
+                                   memcached_malloc_fn *mem_malloc,
+                                   memcached_free_fn *mem_free,
+                                   memcached_realloc_fn *mem_realloc,
+                                   memcached_calloc_fn *mem_calloc);
+
+void *
+  memcached_get_memory_allocators_context(const memcached_st *ptr);
+
+void *
+  (*memcached_malloc_fn) (memcached_st *ptr, const size_t size,
+                         void *context);
+
+void *
+  (*memcached_realloc_fn) (memcached_st *ptr, void *mem,
+                           const size_t size,
+                          void *context);
+
+void
+  (*memcached_free_fn) (memcached_st *ptr, void *mem,
+                       void *context);
+
+void *
+(*memcached_calloc_fn) (memcached_st *ptr,
+                       size_t nelem,
+                        const size_t elsize,
+                       void *context);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) allows you to specify your own memory allocators optimized
+for your application.
+.sp
+memcached_set_memory_allocators() is used to set the memory allocators used
+by the memcached instance specified by ptr. Please note that you cannot
+override only one of the memory allocators, you have to specify a complete
+new set if you want to override one of them. All of the memory allocation
+functions should behave as specified in the C99 standard. Specify NULL as
+all functions to reset them to the default values.
+.sp
+memcached_get_memory_allocators() is used to get the currently used memory
+allocators by a mamcached handle.
+.sp
+memcached_get_memory_allocators_context() returns the void * that was
+passed in during the call to memcached_set_memory_allocators().
+.sp
+The first argument to the memory allocator functions is a pointer to a
+memcached structure, the is passed as const and you will need to clone
+it in order to make use of any operation which would modify it.
+.SH NOTES
+.sp
+In version 0.38 all functions were modified to have a context void pointer
+passed to them. This was so that customer allocators could have their
+own space for memory.
+.SH RETURN
+.sp
+memcached_set_memory_allocators() return MEMCACHED_SUCCESS upon success,
+and MEMCACHED_FAILURE if you don\(aqt pass a complete set of function pointers.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+Brian Aker, <\fI\%brian@tangent\fP.orf<gt>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_get_user_data(3) memcached_set_user_data(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_get_sasl_callbacks.3 b/docs/man/memcached_get_sasl_callbacks.3
new file mode 100644 (file)
index 0000000..e11eae2
--- /dev/null
@@ -0,0 +1,94 @@
+.TH "MEMCACHED_GET_SASL_CALLBACKS" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_get_sasl_callbacks \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+SASL support
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+void memcached_set_sasl_callbacks(memcached_st *ptr,
+                                  const sasl_callback_t *callbacks)
+
+const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st *ptr)
+
+memcached_return memcached_set_sasl_auth_data(memcached_st *ptr,
+                                              const char *username,
+                                              const char *password)
+memcached_return memcached_destroy_sasl_auth_data(memcached_st *ptr)
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) allows you to plug in your own callbacks function used by
+libsasl to perform SASL authentication.
+.sp
+Please note that SASL requires the memcached binary protocol, and you have
+to specify the callbacks before you connect to the server.
+.sp
+memcached_set_sasl_auth_data() is a helper function for you defining
+the basic functionality for you, but it will store the username and password
+in memory. If you choose to use this method you have to call
+memcached_destroy_sasl_auth_data before calling memcached_free to avoid
+a memory leak. You should NOT call memcached_destroy_sasl_auth_data if you
+specify your own callback function with memcached_set_sasl_callbacks().
+.sp
+You as a client user have to initialize libsasl by using sasl_client_init
+before enabling it in libmemcached, and you have to shut down libsasl by
+calling sasl_done() when you are done using SASL from libmemcached.
+.SH RETURN
+.sp
+memcached_get_sasl_callbacks() returns the callbacks currently used
+by this memcached handle.
+memcached_get_sasl_set_auth_data() returns MEMCACHED_SUCCESS upon success.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_get_user_data.3 b/docs/man/memcached_get_user_data.3
new file mode 100644 (file)
index 0000000..08c741e
--- /dev/null
@@ -0,0 +1,82 @@
+.TH "MEMCACHED_GET_USER_DATA" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_get_user_data \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manage user specific data
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+void *memcached_get_user_data (memcached_st *ptr);
+
+void *memcached_set_user_data (memcached_st *ptr, void *data);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) allows you to store a pointer to a user specific data inside
+the memcached_st structure.
+.sp
+memcached_set_user_data() is used to set the user specific data in the
+memcached_st structure.
+.sp
+memcached_get_user_data() is used to retrieve the user specific data in
+the memcached_st structure.
+.SH RETURN
+.sp
+memcached_set_user_data() returns the previous value of the user specific
+data.
+.sp
+memcached_get_user_data() returns the current value uf the user specific
+data.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_increment.3 b/docs/man/memcached_increment.3
new file mode 100644 (file)
index 0000000..070ff09
--- /dev/null
@@ -0,0 +1,168 @@
+.TH "MEMCACHED_INCREMENT" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_increment \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manipulate counters
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_increment (memcached_st *ptr,
+                       const char *key, size_t key_length,
+                       unsigned int offset,
+                       uint64_t *value);
+
+memcached_return_t
+  memcached_decrement (memcached_st *ptr,
+                       const char *key, size_t key_length,
+                       unsigned int offset,
+                       uint64_t *value);
+
+memcached_return_t
+  memcached_increment_with_initial (memcached_st *ptr,
+                                    const char *key,
+                                    size_t key_length,
+                                    uint64_t offset,
+                                    uint64_t initial,
+                                    time_t expiration,
+                                    uint64_t *value);
+
+memcached_return_t
+  memcached_decrement_with_initial (memcached_st *ptr,
+                                    const char *key,
+                                    size_t key_length,
+                                    uint64_t offset,
+                                    uint64_t initial,
+                                    time_t expiration,
+                                    uint64_t *value);
+
+memcached_return_t
+  memcached_increment_by_key (memcached_st *ptr,
+                              const char *master_key, size_t master_key_length,
+                              const char *key, size_t key_length,
+                              unsigned int offset,
+                              uint64_t *value);
+
+memcached_return_t
+  memcached_decrement_by_key (memcached_st *ptr,
+                              const char *master_key, size_t master_key_length,
+                              const char *key, size_t key_length,
+                              unsigned int offset,
+                              uint64_t *value);
+
+memcached_return_t
+  memcached_increment_with_initial_by_key (memcached_st *ptr,
+                                           const char *master_key,
+                                           size_t master_key_length,
+                                           const char *key,
+                                           size_t key_length,
+                                           uint64_t offset,
+                                           uint64_t initial,
+                                           time_t expiration,
+                                           uint64_t *value);
+
+memcached_return_t
+  memcached_decrement_with_initial_by_key (memcached_st *ptr,
+                                           const char *master_key,
+                                           size_t master_key_length,
+                                           const char *key,
+                                           size_t key_length,
+                                           uint64_t offset,
+                                           uint64_t initial,
+                                           time_t expiration,
+                                           uint64_t *value);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached(1) servers have the ability to increment and decrement keys
+(overflow and underflow are not detected). This gives you the ability to use
+memcached to generate shared sequences of values.
+.sp
+memcached_increment() takes a key and keylength and increments the value by
+the offset passed to it. The value is then returned via the unsigned int
+value pointer you pass to it.
+.sp
+memcached_decrement() takes a key and keylength and decrements the value by
+the offset passed to it. The value is then returned via the unsigned int
+value pointer you pass to it.
+.sp
+memcached_increment_with_initial() takes a key and keylength and increments
+the value by the offset passed to it. If the object specified by key does
+not exist, one of two things may happen: If the expiration value is
+MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all other
+expiration values, the operation will succeed by seeding the value for that
+key with a initial value to expire with the provided expiration time. The
+flags will be set to zero.The value is then returned via the unsigned int
+value pointer you pass to it.
+.sp
+memcached_decrement_with_initial() takes a key and keylength and decrements
+the value by the offset passed to it. If the object specified by key does
+not exist, one of two things may happen: If the expiration value is
+MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all other
+expiration values, the operation will succeed by seeding the value for that
+key with a initial value to expire with the provided expiration time. The
+flags will be set to zero.The value is then returned via the unsigned int
+value pointer you pass to it.
+.sp
+memcached_increment_by_key(), memcached_decrement_by_key(),
+memcached_increment_with_initial_by_key(), and
+memcached_decrement_with_initial_by_key() are master key equivalents of the
+above.
+.SH RETURN
+.sp
+A value of type \fBmemcached_return_t\fP is returned.
+On success that value will be \fBMEMCACHED_SUCCESS\fP.
+Use memcached_strerror() to translate this value to a printable string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_increment_with_initial.3 b/docs/man/memcached_increment_with_initial.3
new file mode 100644 (file)
index 0000000..e0992cc
--- /dev/null
@@ -0,0 +1,168 @@
+.TH "MEMCACHED_INCREMENT_WITH_INITIAL" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_increment_with_initial \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manipulate counters
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_increment (memcached_st *ptr,
+                       const char *key, size_t key_length,
+                       unsigned int offset,
+                       uint64_t *value);
+
+memcached_return_t
+  memcached_decrement (memcached_st *ptr,
+                       const char *key, size_t key_length,
+                       unsigned int offset,
+                       uint64_t *value);
+
+memcached_return_t
+  memcached_increment_with_initial (memcached_st *ptr,
+                                    const char *key,
+                                    size_t key_length,
+                                    uint64_t offset,
+                                    uint64_t initial,
+                                    time_t expiration,
+                                    uint64_t *value);
+
+memcached_return_t
+  memcached_decrement_with_initial (memcached_st *ptr,
+                                    const char *key,
+                                    size_t key_length,
+                                    uint64_t offset,
+                                    uint64_t initial,
+                                    time_t expiration,
+                                    uint64_t *value);
+
+memcached_return_t
+  memcached_increment_by_key (memcached_st *ptr,
+                              const char *master_key, size_t master_key_length,
+                              const char *key, size_t key_length,
+                              unsigned int offset,
+                              uint64_t *value);
+
+memcached_return_t
+  memcached_decrement_by_key (memcached_st *ptr,
+                              const char *master_key, size_t master_key_length,
+                              const char *key, size_t key_length,
+                              unsigned int offset,
+                              uint64_t *value);
+
+memcached_return_t
+  memcached_increment_with_initial_by_key (memcached_st *ptr,
+                                           const char *master_key,
+                                           size_t master_key_length,
+                                           const char *key,
+                                           size_t key_length,
+                                           uint64_t offset,
+                                           uint64_t initial,
+                                           time_t expiration,
+                                           uint64_t *value);
+
+memcached_return_t
+  memcached_decrement_with_initial_by_key (memcached_st *ptr,
+                                           const char *master_key,
+                                           size_t master_key_length,
+                                           const char *key,
+                                           size_t key_length,
+                                           uint64_t offset,
+                                           uint64_t initial,
+                                           time_t expiration,
+                                           uint64_t *value);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached(1) servers have the ability to increment and decrement keys
+(overflow and underflow are not detected). This gives you the ability to use
+memcached to generate shared sequences of values.
+.sp
+memcached_increment() takes a key and keylength and increments the value by
+the offset passed to it. The value is then returned via the unsigned int
+value pointer you pass to it.
+.sp
+memcached_decrement() takes a key and keylength and decrements the value by
+the offset passed to it. The value is then returned via the unsigned int
+value pointer you pass to it.
+.sp
+memcached_increment_with_initial() takes a key and keylength and increments
+the value by the offset passed to it. If the object specified by key does
+not exist, one of two things may happen: If the expiration value is
+MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all other
+expiration values, the operation will succeed by seeding the value for that
+key with a initial value to expire with the provided expiration time. The
+flags will be set to zero.The value is then returned via the unsigned int
+value pointer you pass to it.
+.sp
+memcached_decrement_with_initial() takes a key and keylength and decrements
+the value by the offset passed to it. If the object specified by key does
+not exist, one of two things may happen: If the expiration value is
+MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all other
+expiration values, the operation will succeed by seeding the value for that
+key with a initial value to expire with the provided expiration time. The
+flags will be set to zero.The value is then returned via the unsigned int
+value pointer you pass to it.
+.sp
+memcached_increment_by_key(), memcached_decrement_by_key(),
+memcached_increment_with_initial_by_key(), and
+memcached_decrement_with_initial_by_key() are master key equivalents of the
+above.
+.SH RETURN
+.sp
+A value of type \fBmemcached_return_t\fP is returned.
+On success that value will be \fBMEMCACHED_SUCCESS\fP.
+Use memcached_strerror() to translate this value to a printable string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_lib_version.3 b/docs/man/memcached_lib_version.3
new file mode 100644 (file)
index 0000000..53e09dd
--- /dev/null
@@ -0,0 +1,85 @@
+.TH "MEMCACHED_LIB_VERSION" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_lib_version \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Get library version
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+const char *
+  memcached_lib_version (void)
+
+
+memcached_return_t
+  memcached_version (memcached_st *ptr)
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_lib_version() is used to return a simple version string representing
+the libmemcached version (version of the client library, not server)
+.sp
+memcached_version() is used to set the major, minor, and micro versions of each
+memcached server being used by the memcached_st connection structure. It returns the
+memcached server return code.
+.SH RETURN
+.sp
+A string with the version of libmemcached driver is returned from
+memcached_lib_version()
+.sp
+A value of type \fBmemcached_return_t\fP is returned from memcached_version()
+On success that value will be \fBMEMCACHED_SUCCESS\fP. If called with the
+\fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set, the value \fBMEMCACHED_NOT_SUPPORTED\fPwill be returned. Use memcached_strerror() to translate this value to
+a printable string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_memory_allocators.3 b/docs/man/memcached_memory_allocators.3
new file mode 100644 (file)
index 0000000..49b1d07
--- /dev/null
@@ -0,0 +1,129 @@
+.TH "MEMCACHED_MEMORY_ALLOCATORS" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_memory_allocators \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manage memory allocator functions
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_set_memory_allocators (memcached_st *ptr,
+                                   memcached_malloc_fn mem_malloc,
+                                   memcached_free_fn mem_free,
+                                   memcached_realloc_fn mem_realloc,
+                                   memcached_calloc_fn mem_calloc,
+                                  void *context);
+
+void
+  memcached_get_memory_allocators (memcached_st *ptr,
+                                   memcached_malloc_fn *mem_malloc,
+                                   memcached_free_fn *mem_free,
+                                   memcached_realloc_fn *mem_realloc,
+                                   memcached_calloc_fn *mem_calloc);
+
+void *
+  memcached_get_memory_allocators_context(const memcached_st *ptr);
+
+void *
+  (*memcached_malloc_fn) (memcached_st *ptr, const size_t size,
+                         void *context);
+
+void *
+  (*memcached_realloc_fn) (memcached_st *ptr, void *mem,
+                           const size_t size,
+                          void *context);
+
+void
+  (*memcached_free_fn) (memcached_st *ptr, void *mem,
+                       void *context);
+
+void *
+(*memcached_calloc_fn) (memcached_st *ptr,
+                       size_t nelem,
+                        const size_t elsize,
+                       void *context);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) allows you to specify your own memory allocators optimized
+for your application.
+.sp
+memcached_set_memory_allocators() is used to set the memory allocators used
+by the memcached instance specified by ptr. Please note that you cannot
+override only one of the memory allocators, you have to specify a complete
+new set if you want to override one of them. All of the memory allocation
+functions should behave as specified in the C99 standard. Specify NULL as
+all functions to reset them to the default values.
+.sp
+memcached_get_memory_allocators() is used to get the currently used memory
+allocators by a mamcached handle.
+.sp
+memcached_get_memory_allocators_context() returns the void * that was
+passed in during the call to memcached_set_memory_allocators().
+.sp
+The first argument to the memory allocator functions is a pointer to a
+memcached structure, the is passed as const and you will need to clone
+it in order to make use of any operation which would modify it.
+.SH NOTES
+.sp
+In version 0.38 all functions were modified to have a context void pointer
+passed to them. This was so that customer allocators could have their
+own space for memory.
+.SH RETURN
+.sp
+memcached_set_memory_allocators() return MEMCACHED_SUCCESS upon success,
+and MEMCACHED_FAILURE if you don\(aqt pass a complete set of function pointers.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+Brian Aker, <\fI\%brian@tangent\fP.orf<gt>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_get_user_data(3) memcached_set_user_data(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_mget.3 b/docs/man/memcached_mget.3
new file mode 100644 (file)
index 0000000..6490fda
--- /dev/null
@@ -0,0 +1,206 @@
+.TH "MEMCACHED_MGET" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_mget \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Get a value
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_result_st *
+  memcached_fetch_result (memcached_st *ptr,
+                          memcached_result_st *result,
+                          memcached_return_t *error);
+
+char *
+  memcached_get (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 size_t *value_length,
+                 uint32_t *flags,
+                 memcached_return_t *error);
+
+memcached_return_t
+  memcached_mget (memcached_st *ptr,
+                const char * const *keys,
+                const size_t *key_length,
+                size_t number_of_keys);
+char *
+  memcached_get_by_key (memcached_st *ptr,
+                        const char *master_key, size_t master_key_length,
+                        const char *key, size_t key_length,
+                        size_t *value_length,
+                        uint32_t *flags,
+                        memcached_return_t *error);
+
+memcached_return_t
+  memcached_mget_by_key (memcached_st *ptr,
+                         const char *master_key, size_t master_key_length,
+                         const char * const *keys,
+                         const size_t *key_length,
+                         size_t number_of_keys);
+
+char *
+  memcached_fetch (memcached_st *ptr,
+                   char *key, size_t *key_length,
+                   size_t *value_length,
+                   uint32_t *flags,
+                   memcached_return_t *error);
+
+memcached_return_t
+  memcached_fetch_execute (memcached_st *ptr,
+                           memcached_execute_fn *callback,
+                           void *context,
+                           uint32_t number_of_callbacks);
+
+
+memcached_return_t
+  memcached_mget_execute (memcached_st *ptr,
+                          const char * const *keys,
+                          const size_t *key_length,
+                          size_t number_of_keys,
+                          memcached_execute_fn *callback,
+                          void *context,
+                          uint32_t number_of_callbacks);
+
+memcached_return_t
+  memcached_mget_execute_by_key (memcached_st *ptr,
+                                 const char *master_key,
+                                 size_t master_key_length,
+                                 const char * const *keys,
+                                 const size_t *key_length,
+                                 size_t number_of_keys,
+                                 memcached_execute_fn *callback,
+                                 void *context,
+                                 uint32_t number_of_callbacks);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_get() is used to fetch an individual value from the server. You
+must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A uint32_t pointer to contain whatever flags you stored with the value,
+a size_t pointer which will be filled with size of of the object, and a
+memcached_return_t pointer to hold any error. The object will be returned
+upon success and NULL will be returned on failure. Any object returned by
+memcached_get() must be released by the caller application.
+.sp
+memcached_mget() is used to select multiple keys at once. For multiple key
+operations it is always faster to use this function. This function always
+works asynchronously. memcached_fetch() is then used to retrieve any keys
+found. No error is given on keys that are not found. You must call either
+memcached_fetch() or memcached_fetch_result() after a successful call to
+memcached_mget(). You should continue to call these functions until they
+return NULL (aka no more values). If you need to quit in the middle of a
+memcached_get() call, execute a memcached_quit(). After you do this, you can
+issue new queries against the server.
+.sp
+memcached_fetch() is used to fetch an individual value from the server.
+memcached_mget() must always be called before using this method.  You
+must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A uint32_t pointer to contain whatever flags you stored with the value,
+a size_t pointer which will be filled with size of of the object, and a
+memcached_return_t pointer to hold any error. The object will be returned
+upon success and NULL will be returned on failure. MEMCACHD_END is returned
+by the *error value when all objects that have been found are returned.
+The final value upon MEMCACHED_END is null. Values returned by
+memcached_fetch() musted be free\(aqed by the caller. memcached_fetch() will
+be DEPRECATED in the near future, memcached_fetch_result() should be used
+instead.
+.sp
+memcached_fetch_result() is used to return a memcached_result_st(3) structure
+from a memcached server. The result object is forward compatible with changes
+to the server. For more information please refer to the memcached_result_st(3)
+help. This function will dynamically allocate a result structure for you
+if you do not pass one to the function.
+.sp
+memcached_fetch_execute() is a callback function for result sets. Instead
+of returning the results to you for processing, it passes each of the
+result sets to the list of functions you provide. It passes to the function
+a memcached_st that can be cloned for use in the called function (it can not
+be used directly). It also passes a result set which does not need to be freed.
+Finally it passes a "context". This is just a pointer to a memory reference
+you supply the calling function. Currently only one value is being passed
+to each function call. In the future there will be an option to allow this
+to be an array.
+.sp
+memcached_mget_execute() and memcached_mget_execute_by_key() is
+similar to memcached_mget(), but it may trigger the supplied callbacks
+with result sets while sending out the queries. If you try to perform
+a really large multiget with memcached_mget() you may encounter a
+deadlock in the OS kernel (we fail to write data to the socket because
+the input buffer is full). memcached_mget_execute() solves this
+problem by processing some of the results before continuing sending
+out requests. Please note that this function is only available in the
+binary protocol.
+.sp
+memcached_get_by_key() and memcached_mget_by_key() behave in a similar nature
+as memcached_get() and memcached_mget(). The difference is that they take
+a master key that is used for determining which server an object was stored
+if key partitioning was used for storage.
+.sp
+All of the above functions are not supported when the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPhas been set. Executing any of these functions with this behavior on will result in
+\fBMEMCACHED_NOT_SUPPORTED\fP being returned or, for those functions which do not return
+a \fBmemcached_return_t\fP, the error function parameter will be set to
+\fBMEMCACHED_NOT_SUPPORTED\fP.
+.SH RETURN
+.sp
+All objects returned must be freed by the calling application.
+memcached_get() and memcached_fetch() will return NULL on error. You must
+look at the value of error to determine what the actual error was.
+.sp
+MEMCACHED_KEY_TOO_BIG is set to error whenever memcached_fetch() was used
+and the key was set larger then MEMCACHED_MAX_KEY, which was the largest
+key allowed for the original memcached ascii server.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_mget_by_key.3 b/docs/man/memcached_mget_by_key.3
new file mode 100644 (file)
index 0000000..cb5b458
--- /dev/null
@@ -0,0 +1,206 @@
+.TH "MEMCACHED_MGET_BY_KEY" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_mget_by_key \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Get a value
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_result_st *
+  memcached_fetch_result (memcached_st *ptr,
+                          memcached_result_st *result,
+                          memcached_return_t *error);
+
+char *
+  memcached_get (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 size_t *value_length,
+                 uint32_t *flags,
+                 memcached_return_t *error);
+
+memcached_return_t
+  memcached_mget (memcached_st *ptr,
+                const char * const *keys,
+                const size_t *key_length,
+                size_t number_of_keys);
+char *
+  memcached_get_by_key (memcached_st *ptr,
+                        const char *master_key, size_t master_key_length,
+                        const char *key, size_t key_length,
+                        size_t *value_length,
+                        uint32_t *flags,
+                        memcached_return_t *error);
+
+memcached_return_t
+  memcached_mget_by_key (memcached_st *ptr,
+                         const char *master_key, size_t master_key_length,
+                         const char * const *keys,
+                         const size_t *key_length,
+                         size_t number_of_keys);
+
+char *
+  memcached_fetch (memcached_st *ptr,
+                   char *key, size_t *key_length,
+                   size_t *value_length,
+                   uint32_t *flags,
+                   memcached_return_t *error);
+
+memcached_return_t
+  memcached_fetch_execute (memcached_st *ptr,
+                           memcached_execute_fn *callback,
+                           void *context,
+                           uint32_t number_of_callbacks);
+
+
+memcached_return_t
+  memcached_mget_execute (memcached_st *ptr,
+                          const char * const *keys,
+                          const size_t *key_length,
+                          size_t number_of_keys,
+                          memcached_execute_fn *callback,
+                          void *context,
+                          uint32_t number_of_callbacks);
+
+memcached_return_t
+  memcached_mget_execute_by_key (memcached_st *ptr,
+                                 const char *master_key,
+                                 size_t master_key_length,
+                                 const char * const *keys,
+                                 const size_t *key_length,
+                                 size_t number_of_keys,
+                                 memcached_execute_fn *callback,
+                                 void *context,
+                                 uint32_t number_of_callbacks);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_get() is used to fetch an individual value from the server. You
+must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A uint32_t pointer to contain whatever flags you stored with the value,
+a size_t pointer which will be filled with size of of the object, and a
+memcached_return_t pointer to hold any error. The object will be returned
+upon success and NULL will be returned on failure. Any object returned by
+memcached_get() must be released by the caller application.
+.sp
+memcached_mget() is used to select multiple keys at once. For multiple key
+operations it is always faster to use this function. This function always
+works asynchronously. memcached_fetch() is then used to retrieve any keys
+found. No error is given on keys that are not found. You must call either
+memcached_fetch() or memcached_fetch_result() after a successful call to
+memcached_mget(). You should continue to call these functions until they
+return NULL (aka no more values). If you need to quit in the middle of a
+memcached_get() call, execute a memcached_quit(). After you do this, you can
+issue new queries against the server.
+.sp
+memcached_fetch() is used to fetch an individual value from the server.
+memcached_mget() must always be called before using this method.  You
+must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A uint32_t pointer to contain whatever flags you stored with the value,
+a size_t pointer which will be filled with size of of the object, and a
+memcached_return_t pointer to hold any error. The object will be returned
+upon success and NULL will be returned on failure. MEMCACHD_END is returned
+by the *error value when all objects that have been found are returned.
+The final value upon MEMCACHED_END is null. Values returned by
+memcached_fetch() musted be free\(aqed by the caller. memcached_fetch() will
+be DEPRECATED in the near future, memcached_fetch_result() should be used
+instead.
+.sp
+memcached_fetch_result() is used to return a memcached_result_st(3) structure
+from a memcached server. The result object is forward compatible with changes
+to the server. For more information please refer to the memcached_result_st(3)
+help. This function will dynamically allocate a result structure for you
+if you do not pass one to the function.
+.sp
+memcached_fetch_execute() is a callback function for result sets. Instead
+of returning the results to you for processing, it passes each of the
+result sets to the list of functions you provide. It passes to the function
+a memcached_st that can be cloned for use in the called function (it can not
+be used directly). It also passes a result set which does not need to be freed.
+Finally it passes a "context". This is just a pointer to a memory reference
+you supply the calling function. Currently only one value is being passed
+to each function call. In the future there will be an option to allow this
+to be an array.
+.sp
+memcached_mget_execute() and memcached_mget_execute_by_key() is
+similar to memcached_mget(), but it may trigger the supplied callbacks
+with result sets while sending out the queries. If you try to perform
+a really large multiget with memcached_mget() you may encounter a
+deadlock in the OS kernel (we fail to write data to the socket because
+the input buffer is full). memcached_mget_execute() solves this
+problem by processing some of the results before continuing sending
+out requests. Please note that this function is only available in the
+binary protocol.
+.sp
+memcached_get_by_key() and memcached_mget_by_key() behave in a similar nature
+as memcached_get() and memcached_mget(). The difference is that they take
+a master key that is used for determining which server an object was stored
+if key partitioning was used for storage.
+.sp
+All of the above functions are not supported when the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPhas been set. Executing any of these functions with this behavior on will result in
+\fBMEMCACHED_NOT_SUPPORTED\fP being returned or, for those functions which do not return
+a \fBmemcached_return_t\fP, the error function parameter will be set to
+\fBMEMCACHED_NOT_SUPPORTED\fP.
+.SH RETURN
+.sp
+All objects returned must be freed by the calling application.
+memcached_get() and memcached_fetch() will return NULL on error. You must
+look at the value of error to determine what the actual error was.
+.sp
+MEMCACHED_KEY_TOO_BIG is set to error whenever memcached_fetch() was used
+and the key was set larger then MEMCACHED_MAX_KEY, which was the largest
+key allowed for the original memcached ascii server.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_mget_execute.3 b/docs/man/memcached_mget_execute.3
new file mode 100644 (file)
index 0000000..79c667f
--- /dev/null
@@ -0,0 +1,206 @@
+.TH "MEMCACHED_MGET_EXECUTE" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_mget_execute \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Get a value
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_result_st *
+  memcached_fetch_result (memcached_st *ptr,
+                          memcached_result_st *result,
+                          memcached_return_t *error);
+
+char *
+  memcached_get (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 size_t *value_length,
+                 uint32_t *flags,
+                 memcached_return_t *error);
+
+memcached_return_t
+  memcached_mget (memcached_st *ptr,
+                const char * const *keys,
+                const size_t *key_length,
+                size_t number_of_keys);
+char *
+  memcached_get_by_key (memcached_st *ptr,
+                        const char *master_key, size_t master_key_length,
+                        const char *key, size_t key_length,
+                        size_t *value_length,
+                        uint32_t *flags,
+                        memcached_return_t *error);
+
+memcached_return_t
+  memcached_mget_by_key (memcached_st *ptr,
+                         const char *master_key, size_t master_key_length,
+                         const char * const *keys,
+                         const size_t *key_length,
+                         size_t number_of_keys);
+
+char *
+  memcached_fetch (memcached_st *ptr,
+                   char *key, size_t *key_length,
+                   size_t *value_length,
+                   uint32_t *flags,
+                   memcached_return_t *error);
+
+memcached_return_t
+  memcached_fetch_execute (memcached_st *ptr,
+                           memcached_execute_fn *callback,
+                           void *context,
+                           uint32_t number_of_callbacks);
+
+
+memcached_return_t
+  memcached_mget_execute (memcached_st *ptr,
+                          const char * const *keys,
+                          const size_t *key_length,
+                          size_t number_of_keys,
+                          memcached_execute_fn *callback,
+                          void *context,
+                          uint32_t number_of_callbacks);
+
+memcached_return_t
+  memcached_mget_execute_by_key (memcached_st *ptr,
+                                 const char *master_key,
+                                 size_t master_key_length,
+                                 const char * const *keys,
+                                 const size_t *key_length,
+                                 size_t number_of_keys,
+                                 memcached_execute_fn *callback,
+                                 void *context,
+                                 uint32_t number_of_callbacks);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_get() is used to fetch an individual value from the server. You
+must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A uint32_t pointer to contain whatever flags you stored with the value,
+a size_t pointer which will be filled with size of of the object, and a
+memcached_return_t pointer to hold any error. The object will be returned
+upon success and NULL will be returned on failure. Any object returned by
+memcached_get() must be released by the caller application.
+.sp
+memcached_mget() is used to select multiple keys at once. For multiple key
+operations it is always faster to use this function. This function always
+works asynchronously. memcached_fetch() is then used to retrieve any keys
+found. No error is given on keys that are not found. You must call either
+memcached_fetch() or memcached_fetch_result() after a successful call to
+memcached_mget(). You should continue to call these functions until they
+return NULL (aka no more values). If you need to quit in the middle of a
+memcached_get() call, execute a memcached_quit(). After you do this, you can
+issue new queries against the server.
+.sp
+memcached_fetch() is used to fetch an individual value from the server.
+memcached_mget() must always be called before using this method.  You
+must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A uint32_t pointer to contain whatever flags you stored with the value,
+a size_t pointer which will be filled with size of of the object, and a
+memcached_return_t pointer to hold any error. The object will be returned
+upon success and NULL will be returned on failure. MEMCACHD_END is returned
+by the *error value when all objects that have been found are returned.
+The final value upon MEMCACHED_END is null. Values returned by
+memcached_fetch() musted be free\(aqed by the caller. memcached_fetch() will
+be DEPRECATED in the near future, memcached_fetch_result() should be used
+instead.
+.sp
+memcached_fetch_result() is used to return a memcached_result_st(3) structure
+from a memcached server. The result object is forward compatible with changes
+to the server. For more information please refer to the memcached_result_st(3)
+help. This function will dynamically allocate a result structure for you
+if you do not pass one to the function.
+.sp
+memcached_fetch_execute() is a callback function for result sets. Instead
+of returning the results to you for processing, it passes each of the
+result sets to the list of functions you provide. It passes to the function
+a memcached_st that can be cloned for use in the called function (it can not
+be used directly). It also passes a result set which does not need to be freed.
+Finally it passes a "context". This is just a pointer to a memory reference
+you supply the calling function. Currently only one value is being passed
+to each function call. In the future there will be an option to allow this
+to be an array.
+.sp
+memcached_mget_execute() and memcached_mget_execute_by_key() is
+similar to memcached_mget(), but it may trigger the supplied callbacks
+with result sets while sending out the queries. If you try to perform
+a really large multiget with memcached_mget() you may encounter a
+deadlock in the OS kernel (we fail to write data to the socket because
+the input buffer is full). memcached_mget_execute() solves this
+problem by processing some of the results before continuing sending
+out requests. Please note that this function is only available in the
+binary protocol.
+.sp
+memcached_get_by_key() and memcached_mget_by_key() behave in a similar nature
+as memcached_get() and memcached_mget(). The difference is that they take
+a master key that is used for determining which server an object was stored
+if key partitioning was used for storage.
+.sp
+All of the above functions are not supported when the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPhas been set. Executing any of these functions with this behavior on will result in
+\fBMEMCACHED_NOT_SUPPORTED\fP being returned or, for those functions which do not return
+a \fBmemcached_return_t\fP, the error function parameter will be set to
+\fBMEMCACHED_NOT_SUPPORTED\fP.
+.SH RETURN
+.sp
+All objects returned must be freed by the calling application.
+memcached_get() and memcached_fetch() will return NULL on error. You must
+look at the value of error to determine what the actual error was.
+.sp
+MEMCACHED_KEY_TOO_BIG is set to error whenever memcached_fetch() was used
+and the key was set larger then MEMCACHED_MAX_KEY, which was the largest
+key allowed for the original memcached ascii server.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_mget_execute_by_key.3 b/docs/man/memcached_mget_execute_by_key.3
new file mode 100644 (file)
index 0000000..a7db7a1
--- /dev/null
@@ -0,0 +1,206 @@
+.TH "MEMCACHED_MGET_EXECUTE_BY_KEY" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_mget_execute_by_key \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Get a value
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_result_st *
+  memcached_fetch_result (memcached_st *ptr,
+                          memcached_result_st *result,
+                          memcached_return_t *error);
+
+char *
+  memcached_get (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 size_t *value_length,
+                 uint32_t *flags,
+                 memcached_return_t *error);
+
+memcached_return_t
+  memcached_mget (memcached_st *ptr,
+                const char * const *keys,
+                const size_t *key_length,
+                size_t number_of_keys);
+char *
+  memcached_get_by_key (memcached_st *ptr,
+                        const char *master_key, size_t master_key_length,
+                        const char *key, size_t key_length,
+                        size_t *value_length,
+                        uint32_t *flags,
+                        memcached_return_t *error);
+
+memcached_return_t
+  memcached_mget_by_key (memcached_st *ptr,
+                         const char *master_key, size_t master_key_length,
+                         const char * const *keys,
+                         const size_t *key_length,
+                         size_t number_of_keys);
+
+char *
+  memcached_fetch (memcached_st *ptr,
+                   char *key, size_t *key_length,
+                   size_t *value_length,
+                   uint32_t *flags,
+                   memcached_return_t *error);
+
+memcached_return_t
+  memcached_fetch_execute (memcached_st *ptr,
+                           memcached_execute_fn *callback,
+                           void *context,
+                           uint32_t number_of_callbacks);
+
+
+memcached_return_t
+  memcached_mget_execute (memcached_st *ptr,
+                          const char * const *keys,
+                          const size_t *key_length,
+                          size_t number_of_keys,
+                          memcached_execute_fn *callback,
+                          void *context,
+                          uint32_t number_of_callbacks);
+
+memcached_return_t
+  memcached_mget_execute_by_key (memcached_st *ptr,
+                                 const char *master_key,
+                                 size_t master_key_length,
+                                 const char * const *keys,
+                                 const size_t *key_length,
+                                 size_t number_of_keys,
+                                 memcached_execute_fn *callback,
+                                 void *context,
+                                 uint32_t number_of_callbacks);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_get() is used to fetch an individual value from the server. You
+must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A uint32_t pointer to contain whatever flags you stored with the value,
+a size_t pointer which will be filled with size of of the object, and a
+memcached_return_t pointer to hold any error. The object will be returned
+upon success and NULL will be returned on failure. Any object returned by
+memcached_get() must be released by the caller application.
+.sp
+memcached_mget() is used to select multiple keys at once. For multiple key
+operations it is always faster to use this function. This function always
+works asynchronously. memcached_fetch() is then used to retrieve any keys
+found. No error is given on keys that are not found. You must call either
+memcached_fetch() or memcached_fetch_result() after a successful call to
+memcached_mget(). You should continue to call these functions until they
+return NULL (aka no more values). If you need to quit in the middle of a
+memcached_get() call, execute a memcached_quit(). After you do this, you can
+issue new queries against the server.
+.sp
+memcached_fetch() is used to fetch an individual value from the server.
+memcached_mget() must always be called before using this method.  You
+must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A uint32_t pointer to contain whatever flags you stored with the value,
+a size_t pointer which will be filled with size of of the object, and a
+memcached_return_t pointer to hold any error. The object will be returned
+upon success and NULL will be returned on failure. MEMCACHD_END is returned
+by the *error value when all objects that have been found are returned.
+The final value upon MEMCACHED_END is null. Values returned by
+memcached_fetch() musted be free\(aqed by the caller. memcached_fetch() will
+be DEPRECATED in the near future, memcached_fetch_result() should be used
+instead.
+.sp
+memcached_fetch_result() is used to return a memcached_result_st(3) structure
+from a memcached server. The result object is forward compatible with changes
+to the server. For more information please refer to the memcached_result_st(3)
+help. This function will dynamically allocate a result structure for you
+if you do not pass one to the function.
+.sp
+memcached_fetch_execute() is a callback function for result sets. Instead
+of returning the results to you for processing, it passes each of the
+result sets to the list of functions you provide. It passes to the function
+a memcached_st that can be cloned for use in the called function (it can not
+be used directly). It also passes a result set which does not need to be freed.
+Finally it passes a "context". This is just a pointer to a memory reference
+you supply the calling function. Currently only one value is being passed
+to each function call. In the future there will be an option to allow this
+to be an array.
+.sp
+memcached_mget_execute() and memcached_mget_execute_by_key() is
+similar to memcached_mget(), but it may trigger the supplied callbacks
+with result sets while sending out the queries. If you try to perform
+a really large multiget with memcached_mget() you may encounter a
+deadlock in the OS kernel (we fail to write data to the socket because
+the input buffer is full). memcached_mget_execute() solves this
+problem by processing some of the results before continuing sending
+out requests. Please note that this function is only available in the
+binary protocol.
+.sp
+memcached_get_by_key() and memcached_mget_by_key() behave in a similar nature
+as memcached_get() and memcached_mget(). The difference is that they take
+a master key that is used for determining which server an object was stored
+if key partitioning was used for storage.
+.sp
+All of the above functions are not supported when the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPhas been set. Executing any of these functions with this behavior on will result in
+\fBMEMCACHED_NOT_SUPPORTED\fP being returned or, for those functions which do not return
+a \fBmemcached_return_t\fP, the error function parameter will be set to
+\fBMEMCACHED_NOT_SUPPORTED\fP.
+.SH RETURN
+.sp
+All objects returned must be freed by the calling application.
+memcached_get() and memcached_fetch() will return NULL on error. You must
+look at the value of error to determine what the actual error was.
+.sp
+MEMCACHED_KEY_TOO_BIG is set to error whenever memcached_fetch() was used
+and the key was set larger then MEMCACHED_MAX_KEY, which was the largest
+key allowed for the original memcached ascii server.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_pool.3 b/docs/man/memcached_pool.3
new file mode 100644 (file)
index 0000000..06a951f
--- /dev/null
@@ -0,0 +1,130 @@
+.TH "MEMCACHED_POOL" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_pool \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manage pools
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcachedutil, \-lmemcachedutil)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached_pool.h>
+
+memcached_pool_st *
+  memcached_pool_create(memcached_st* mmc, int initial, int max);
+
+memcached_st *
+  memcached_pool_destroy(memcached_pool_st* pool);
+
+memcached_st *
+  memcached_pool_pop (memcached_pool_st* pool, bool block, memcached_return_t *rc);
+
+memcached_return_t
+  memcached_pool_push(memcached_pool_st* pool, memcached_st *mmc);
+
+memcached_st *memcached_create (memcached_st *ptr);
+
+memcached_return_t
+  memcached_pool_behavior_set(memcached_pool_st *pool,
+                              memcached_behavior_t flag,
+                              uint64_t data)
+
+memcached_return_t
+  memcached_pool_behavior_get(memcached_pool_st *pool,
+                              memcached_behavior_t flag,
+                              uint64_t *value)
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_pool_create() is used to create a connection pool of objects you
+may use to remove the overhead of using memcached_clone for short
+lived \fBmemcached_st\fP objects. The mmc argument should be an
+initialised \fBmemcached_st\fP structure, and a successfull invocation of
+memcached_pool_create takes full ownership of the variable (until it
+is released by memcached_pool_destroy). The \fBinitial\fP argument
+specifies the initial size of the connection pool, and the \fBmax\fPargument specifies the maximum size the connection pool should grow
+to. Please note that the library will allocate a fixed size buffer
+scaled to the max size of the connection pool, so you should not pass
+MAXINT or some other large number here.
+.sp
+memcached_pool_destroy() is used to destroy the connection pool
+created with memcached_pool_create() and release all allocated
+resources. It will return the pointer to the \fBmemcached_st\fP structure
+passed as an argument to memcached_pool_create(), and returns the
+ownership of the pointer to the caller.
+.sp
+memcached_pool_pop() is used to grab a connection structure from the
+connection pool. The block argument specifies if the function should
+block and wait for a connection structure to be available if we try
+to exceed the maximum size.
+.sp
+memcached_pool_push() is used to return a connection structure back to the pool.
+.sp
+memcached_pool_behavior_set() and memcached_pool_behagior_get() is
+used to get/set behavior flags on all connections in the pool.
+.SH RETURN
+.sp
+memcached_pool_create() returns a pointer to the newly created
+memcached_pool_st structure. On an allocation failure, it returns
+NULL.
+.sp
+memcached_pool_destroy() returns the pointer (and ownership) to the
+memcached_st structure used to create the pool. If connections are in
+use it returns NULL.
+.sp
+memcached_pool_pop() returns a pointer to a memcached_st structure
+from the pool (or NULL if an allocation cannot be satisfied).
+.sp
+memcached_pool_push() returns MEMCACHED_SUCCESS upon success.
+.sp
+memcached_pool_behavior_get() and memcached_pool_behavior_get()
+returns MEMCACHED_SUCCESS upon success.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_create(3) memcached_free(3) libmemcachedutil(3) memcached_behavior_get(3) memcached_behavior_set(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_pool_behavior_get.3 b/docs/man/memcached_pool_behavior_get.3
new file mode 100644 (file)
index 0000000..6c55f90
--- /dev/null
@@ -0,0 +1,130 @@
+.TH "MEMCACHED_POOL_BEHAVIOR_GET" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_pool_behavior_get \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manage pools
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcachedutil, \-lmemcachedutil)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached_pool.h>
+
+memcached_pool_st *
+  memcached_pool_create(memcached_st* mmc, int initial, int max);
+
+memcached_st *
+  memcached_pool_destroy(memcached_pool_st* pool);
+
+memcached_st *
+  memcached_pool_pop (memcached_pool_st* pool, bool block, memcached_return_t *rc);
+
+memcached_return_t
+  memcached_pool_push(memcached_pool_st* pool, memcached_st *mmc);
+
+memcached_st *memcached_create (memcached_st *ptr);
+
+memcached_return_t
+  memcached_pool_behavior_set(memcached_pool_st *pool,
+                              memcached_behavior_t flag,
+                              uint64_t data)
+
+memcached_return_t
+  memcached_pool_behavior_get(memcached_pool_st *pool,
+                              memcached_behavior_t flag,
+                              uint64_t *value)
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_pool_create() is used to create a connection pool of objects you
+may use to remove the overhead of using memcached_clone for short
+lived \fBmemcached_st\fP objects. The mmc argument should be an
+initialised \fBmemcached_st\fP structure, and a successfull invocation of
+memcached_pool_create takes full ownership of the variable (until it
+is released by memcached_pool_destroy). The \fBinitial\fP argument
+specifies the initial size of the connection pool, and the \fBmax\fPargument specifies the maximum size the connection pool should grow
+to. Please note that the library will allocate a fixed size buffer
+scaled to the max size of the connection pool, so you should not pass
+MAXINT or some other large number here.
+.sp
+memcached_pool_destroy() is used to destroy the connection pool
+created with memcached_pool_create() and release all allocated
+resources. It will return the pointer to the \fBmemcached_st\fP structure
+passed as an argument to memcached_pool_create(), and returns the
+ownership of the pointer to the caller.
+.sp
+memcached_pool_pop() is used to grab a connection structure from the
+connection pool. The block argument specifies if the function should
+block and wait for a connection structure to be available if we try
+to exceed the maximum size.
+.sp
+memcached_pool_push() is used to return a connection structure back to the pool.
+.sp
+memcached_pool_behavior_set() and memcached_pool_behagior_get() is
+used to get/set behavior flags on all connections in the pool.
+.SH RETURN
+.sp
+memcached_pool_create() returns a pointer to the newly created
+memcached_pool_st structure. On an allocation failure, it returns
+NULL.
+.sp
+memcached_pool_destroy() returns the pointer (and ownership) to the
+memcached_st structure used to create the pool. If connections are in
+use it returns NULL.
+.sp
+memcached_pool_pop() returns a pointer to a memcached_st structure
+from the pool (or NULL if an allocation cannot be satisfied).
+.sp
+memcached_pool_push() returns MEMCACHED_SUCCESS upon success.
+.sp
+memcached_pool_behavior_get() and memcached_pool_behavior_get()
+returns MEMCACHED_SUCCESS upon success.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_create(3) memcached_free(3) libmemcachedutil(3) memcached_behavior_get(3) memcached_behavior_set(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_pool_behavior_set.3 b/docs/man/memcached_pool_behavior_set.3
new file mode 100644 (file)
index 0000000..0a42d26
--- /dev/null
@@ -0,0 +1,130 @@
+.TH "MEMCACHED_POOL_BEHAVIOR_SET" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_pool_behavior_set \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manage pools
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcachedutil, \-lmemcachedutil)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached_pool.h>
+
+memcached_pool_st *
+  memcached_pool_create(memcached_st* mmc, int initial, int max);
+
+memcached_st *
+  memcached_pool_destroy(memcached_pool_st* pool);
+
+memcached_st *
+  memcached_pool_pop (memcached_pool_st* pool, bool block, memcached_return_t *rc);
+
+memcached_return_t
+  memcached_pool_push(memcached_pool_st* pool, memcached_st *mmc);
+
+memcached_st *memcached_create (memcached_st *ptr);
+
+memcached_return_t
+  memcached_pool_behavior_set(memcached_pool_st *pool,
+                              memcached_behavior_t flag,
+                              uint64_t data)
+
+memcached_return_t
+  memcached_pool_behavior_get(memcached_pool_st *pool,
+                              memcached_behavior_t flag,
+                              uint64_t *value)
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_pool_create() is used to create a connection pool of objects you
+may use to remove the overhead of using memcached_clone for short
+lived \fBmemcached_st\fP objects. The mmc argument should be an
+initialised \fBmemcached_st\fP structure, and a successfull invocation of
+memcached_pool_create takes full ownership of the variable (until it
+is released by memcached_pool_destroy). The \fBinitial\fP argument
+specifies the initial size of the connection pool, and the \fBmax\fPargument specifies the maximum size the connection pool should grow
+to. Please note that the library will allocate a fixed size buffer
+scaled to the max size of the connection pool, so you should not pass
+MAXINT or some other large number here.
+.sp
+memcached_pool_destroy() is used to destroy the connection pool
+created with memcached_pool_create() and release all allocated
+resources. It will return the pointer to the \fBmemcached_st\fP structure
+passed as an argument to memcached_pool_create(), and returns the
+ownership of the pointer to the caller.
+.sp
+memcached_pool_pop() is used to grab a connection structure from the
+connection pool. The block argument specifies if the function should
+block and wait for a connection structure to be available if we try
+to exceed the maximum size.
+.sp
+memcached_pool_push() is used to return a connection structure back to the pool.
+.sp
+memcached_pool_behavior_set() and memcached_pool_behagior_get() is
+used to get/set behavior flags on all connections in the pool.
+.SH RETURN
+.sp
+memcached_pool_create() returns a pointer to the newly created
+memcached_pool_st structure. On an allocation failure, it returns
+NULL.
+.sp
+memcached_pool_destroy() returns the pointer (and ownership) to the
+memcached_st structure used to create the pool. If connections are in
+use it returns NULL.
+.sp
+memcached_pool_pop() returns a pointer to a memcached_st structure
+from the pool (or NULL if an allocation cannot be satisfied).
+.sp
+memcached_pool_push() returns MEMCACHED_SUCCESS upon success.
+.sp
+memcached_pool_behavior_get() and memcached_pool_behavior_get()
+returns MEMCACHED_SUCCESS upon success.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_create(3) memcached_free(3) libmemcachedutil(3) memcached_behavior_get(3) memcached_behavior_set(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_pool_create.3 b/docs/man/memcached_pool_create.3
new file mode 100644 (file)
index 0000000..230da8b
--- /dev/null
@@ -0,0 +1,130 @@
+.TH "MEMCACHED_POOL_CREATE" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_pool_create \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manage pools
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcachedutil, \-lmemcachedutil)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached_pool.h>
+
+memcached_pool_st *
+  memcached_pool_create(memcached_st* mmc, int initial, int max);
+
+memcached_st *
+  memcached_pool_destroy(memcached_pool_st* pool);
+
+memcached_st *
+  memcached_pool_pop (memcached_pool_st* pool, bool block, memcached_return_t *rc);
+
+memcached_return_t
+  memcached_pool_push(memcached_pool_st* pool, memcached_st *mmc);
+
+memcached_st *memcached_create (memcached_st *ptr);
+
+memcached_return_t
+  memcached_pool_behavior_set(memcached_pool_st *pool,
+                              memcached_behavior_t flag,
+                              uint64_t data)
+
+memcached_return_t
+  memcached_pool_behavior_get(memcached_pool_st *pool,
+                              memcached_behavior_t flag,
+                              uint64_t *value)
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_pool_create() is used to create a connection pool of objects you
+may use to remove the overhead of using memcached_clone for short
+lived \fBmemcached_st\fP objects. The mmc argument should be an
+initialised \fBmemcached_st\fP structure, and a successfull invocation of
+memcached_pool_create takes full ownership of the variable (until it
+is released by memcached_pool_destroy). The \fBinitial\fP argument
+specifies the initial size of the connection pool, and the \fBmax\fPargument specifies the maximum size the connection pool should grow
+to. Please note that the library will allocate a fixed size buffer
+scaled to the max size of the connection pool, so you should not pass
+MAXINT or some other large number here.
+.sp
+memcached_pool_destroy() is used to destroy the connection pool
+created with memcached_pool_create() and release all allocated
+resources. It will return the pointer to the \fBmemcached_st\fP structure
+passed as an argument to memcached_pool_create(), and returns the
+ownership of the pointer to the caller.
+.sp
+memcached_pool_pop() is used to grab a connection structure from the
+connection pool. The block argument specifies if the function should
+block and wait for a connection structure to be available if we try
+to exceed the maximum size.
+.sp
+memcached_pool_push() is used to return a connection structure back to the pool.
+.sp
+memcached_pool_behavior_set() and memcached_pool_behagior_get() is
+used to get/set behavior flags on all connections in the pool.
+.SH RETURN
+.sp
+memcached_pool_create() returns a pointer to the newly created
+memcached_pool_st structure. On an allocation failure, it returns
+NULL.
+.sp
+memcached_pool_destroy() returns the pointer (and ownership) to the
+memcached_st structure used to create the pool. If connections are in
+use it returns NULL.
+.sp
+memcached_pool_pop() returns a pointer to a memcached_st structure
+from the pool (or NULL if an allocation cannot be satisfied).
+.sp
+memcached_pool_push() returns MEMCACHED_SUCCESS upon success.
+.sp
+memcached_pool_behavior_get() and memcached_pool_behavior_get()
+returns MEMCACHED_SUCCESS upon success.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_create(3) memcached_free(3) libmemcachedutil(3) memcached_behavior_get(3) memcached_behavior_set(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_pool_destroy.3 b/docs/man/memcached_pool_destroy.3
new file mode 100644 (file)
index 0000000..7c55cd2
--- /dev/null
@@ -0,0 +1,130 @@
+.TH "MEMCACHED_POOL_DESTROY" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_pool_destroy \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manage pools
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcachedutil, \-lmemcachedutil)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached_pool.h>
+
+memcached_pool_st *
+  memcached_pool_create(memcached_st* mmc, int initial, int max);
+
+memcached_st *
+  memcached_pool_destroy(memcached_pool_st* pool);
+
+memcached_st *
+  memcached_pool_pop (memcached_pool_st* pool, bool block, memcached_return_t *rc);
+
+memcached_return_t
+  memcached_pool_push(memcached_pool_st* pool, memcached_st *mmc);
+
+memcached_st *memcached_create (memcached_st *ptr);
+
+memcached_return_t
+  memcached_pool_behavior_set(memcached_pool_st *pool,
+                              memcached_behavior_t flag,
+                              uint64_t data)
+
+memcached_return_t
+  memcached_pool_behavior_get(memcached_pool_st *pool,
+                              memcached_behavior_t flag,
+                              uint64_t *value)
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_pool_create() is used to create a connection pool of objects you
+may use to remove the overhead of using memcached_clone for short
+lived \fBmemcached_st\fP objects. The mmc argument should be an
+initialised \fBmemcached_st\fP structure, and a successfull invocation of
+memcached_pool_create takes full ownership of the variable (until it
+is released by memcached_pool_destroy). The \fBinitial\fP argument
+specifies the initial size of the connection pool, and the \fBmax\fPargument specifies the maximum size the connection pool should grow
+to. Please note that the library will allocate a fixed size buffer
+scaled to the max size of the connection pool, so you should not pass
+MAXINT or some other large number here.
+.sp
+memcached_pool_destroy() is used to destroy the connection pool
+created with memcached_pool_create() and release all allocated
+resources. It will return the pointer to the \fBmemcached_st\fP structure
+passed as an argument to memcached_pool_create(), and returns the
+ownership of the pointer to the caller.
+.sp
+memcached_pool_pop() is used to grab a connection structure from the
+connection pool. The block argument specifies if the function should
+block and wait for a connection structure to be available if we try
+to exceed the maximum size.
+.sp
+memcached_pool_push() is used to return a connection structure back to the pool.
+.sp
+memcached_pool_behavior_set() and memcached_pool_behagior_get() is
+used to get/set behavior flags on all connections in the pool.
+.SH RETURN
+.sp
+memcached_pool_create() returns a pointer to the newly created
+memcached_pool_st structure. On an allocation failure, it returns
+NULL.
+.sp
+memcached_pool_destroy() returns the pointer (and ownership) to the
+memcached_st structure used to create the pool. If connections are in
+use it returns NULL.
+.sp
+memcached_pool_pop() returns a pointer to a memcached_st structure
+from the pool (or NULL if an allocation cannot be satisfied).
+.sp
+memcached_pool_push() returns MEMCACHED_SUCCESS upon success.
+.sp
+memcached_pool_behavior_get() and memcached_pool_behavior_get()
+returns MEMCACHED_SUCCESS upon success.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_create(3) memcached_free(3) libmemcachedutil(3) memcached_behavior_get(3) memcached_behavior_set(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_pool_pop.3 b/docs/man/memcached_pool_pop.3
new file mode 100644 (file)
index 0000000..7357016
--- /dev/null
@@ -0,0 +1,130 @@
+.TH "MEMCACHED_POOL_POP" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_pool_pop \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manage pools
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcachedutil, \-lmemcachedutil)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached_pool.h>
+
+memcached_pool_st *
+  memcached_pool_create(memcached_st* mmc, int initial, int max);
+
+memcached_st *
+  memcached_pool_destroy(memcached_pool_st* pool);
+
+memcached_st *
+  memcached_pool_pop (memcached_pool_st* pool, bool block, memcached_return_t *rc);
+
+memcached_return_t
+  memcached_pool_push(memcached_pool_st* pool, memcached_st *mmc);
+
+memcached_st *memcached_create (memcached_st *ptr);
+
+memcached_return_t
+  memcached_pool_behavior_set(memcached_pool_st *pool,
+                              memcached_behavior_t flag,
+                              uint64_t data)
+
+memcached_return_t
+  memcached_pool_behavior_get(memcached_pool_st *pool,
+                              memcached_behavior_t flag,
+                              uint64_t *value)
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_pool_create() is used to create a connection pool of objects you
+may use to remove the overhead of using memcached_clone for short
+lived \fBmemcached_st\fP objects. The mmc argument should be an
+initialised \fBmemcached_st\fP structure, and a successfull invocation of
+memcached_pool_create takes full ownership of the variable (until it
+is released by memcached_pool_destroy). The \fBinitial\fP argument
+specifies the initial size of the connection pool, and the \fBmax\fPargument specifies the maximum size the connection pool should grow
+to. Please note that the library will allocate a fixed size buffer
+scaled to the max size of the connection pool, so you should not pass
+MAXINT or some other large number here.
+.sp
+memcached_pool_destroy() is used to destroy the connection pool
+created with memcached_pool_create() and release all allocated
+resources. It will return the pointer to the \fBmemcached_st\fP structure
+passed as an argument to memcached_pool_create(), and returns the
+ownership of the pointer to the caller.
+.sp
+memcached_pool_pop() is used to grab a connection structure from the
+connection pool. The block argument specifies if the function should
+block and wait for a connection structure to be available if we try
+to exceed the maximum size.
+.sp
+memcached_pool_push() is used to return a connection structure back to the pool.
+.sp
+memcached_pool_behavior_set() and memcached_pool_behagior_get() is
+used to get/set behavior flags on all connections in the pool.
+.SH RETURN
+.sp
+memcached_pool_create() returns a pointer to the newly created
+memcached_pool_st structure. On an allocation failure, it returns
+NULL.
+.sp
+memcached_pool_destroy() returns the pointer (and ownership) to the
+memcached_st structure used to create the pool. If connections are in
+use it returns NULL.
+.sp
+memcached_pool_pop() returns a pointer to a memcached_st structure
+from the pool (or NULL if an allocation cannot be satisfied).
+.sp
+memcached_pool_push() returns MEMCACHED_SUCCESS upon success.
+.sp
+memcached_pool_behavior_get() and memcached_pool_behavior_get()
+returns MEMCACHED_SUCCESS upon success.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_create(3) memcached_free(3) libmemcachedutil(3) memcached_behavior_get(3) memcached_behavior_set(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_pool_push.3 b/docs/man/memcached_pool_push.3
new file mode 100644 (file)
index 0000000..12946a8
--- /dev/null
@@ -0,0 +1,130 @@
+.TH "MEMCACHED_POOL_PUSH" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_pool_push \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manage pools
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcachedutil, \-lmemcachedutil)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached_pool.h>
+
+memcached_pool_st *
+  memcached_pool_create(memcached_st* mmc, int initial, int max);
+
+memcached_st *
+  memcached_pool_destroy(memcached_pool_st* pool);
+
+memcached_st *
+  memcached_pool_pop (memcached_pool_st* pool, bool block, memcached_return_t *rc);
+
+memcached_return_t
+  memcached_pool_push(memcached_pool_st* pool, memcached_st *mmc);
+
+memcached_st *memcached_create (memcached_st *ptr);
+
+memcached_return_t
+  memcached_pool_behavior_set(memcached_pool_st *pool,
+                              memcached_behavior_t flag,
+                              uint64_t data)
+
+memcached_return_t
+  memcached_pool_behavior_get(memcached_pool_st *pool,
+                              memcached_behavior_t flag,
+                              uint64_t *value)
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_pool_create() is used to create a connection pool of objects you
+may use to remove the overhead of using memcached_clone for short
+lived \fBmemcached_st\fP objects. The mmc argument should be an
+initialised \fBmemcached_st\fP structure, and a successfull invocation of
+memcached_pool_create takes full ownership of the variable (until it
+is released by memcached_pool_destroy). The \fBinitial\fP argument
+specifies the initial size of the connection pool, and the \fBmax\fPargument specifies the maximum size the connection pool should grow
+to. Please note that the library will allocate a fixed size buffer
+scaled to the max size of the connection pool, so you should not pass
+MAXINT or some other large number here.
+.sp
+memcached_pool_destroy() is used to destroy the connection pool
+created with memcached_pool_create() and release all allocated
+resources. It will return the pointer to the \fBmemcached_st\fP structure
+passed as an argument to memcached_pool_create(), and returns the
+ownership of the pointer to the caller.
+.sp
+memcached_pool_pop() is used to grab a connection structure from the
+connection pool. The block argument specifies if the function should
+block and wait for a connection structure to be available if we try
+to exceed the maximum size.
+.sp
+memcached_pool_push() is used to return a connection structure back to the pool.
+.sp
+memcached_pool_behavior_set() and memcached_pool_behagior_get() is
+used to get/set behavior flags on all connections in the pool.
+.SH RETURN
+.sp
+memcached_pool_create() returns a pointer to the newly created
+memcached_pool_st structure. On an allocation failure, it returns
+NULL.
+.sp
+memcached_pool_destroy() returns the pointer (and ownership) to the
+memcached_st structure used to create the pool. If connections are in
+use it returns NULL.
+.sp
+memcached_pool_pop() returns a pointer to a memcached_st structure
+from the pool (or NULL if an allocation cannot be satisfied).
+.sp
+memcached_pool_push() returns MEMCACHED_SUCCESS upon success.
+.sp
+memcached_pool_behavior_get() and memcached_pool_behavior_get()
+returns MEMCACHED_SUCCESS upon success.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_create(3) memcached_free(3) libmemcachedutil(3) memcached_behavior_get(3) memcached_behavior_set(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_prepend.3 b/docs/man/memcached_prepend.3
new file mode 100644 (file)
index 0000000..b886339
--- /dev/null
@@ -0,0 +1,216 @@
+.TH "MEMCACHED_PREPEND" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_prepend \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Store value on server
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_set (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 const char *value, size_t value_length,
+                 time_t expiration,
+                 uint32_t flags);
+
+memcached_return_t
+  memcached_add (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 const char *value, size_t value_length,
+                 time_t expiration,
+                 uint32_t flags);
+
+memcached_return_t
+  memcached_replace (memcached_st *ptr,
+                     const char *key, size_t key_length,
+                     const char *value, size_t value_length,
+                     time_t expiration,
+                     uint32_t flags);
+
+memcached_return_t
+  memcached_prepend(memcached_st *ptr,
+                    const char *key, size_t key_length,
+                    const char *value, size_t value_length,
+                    time_t expiration,
+                    uint32_t flags)
+
+memcached_return_t
+  memcached_append(memcached_st *ptr,
+                   const char *key, size_t key_length,
+                    const char *value, size_t value_length,
+                    time_t expiration,
+                    uint32_t flags)
+memcached_return_t
+  memcached_cas(memcached_st *ptr,
+                const char *key, size_t key_length,
+                const char *value, size_t value_length,
+                time_t expiration,
+                uint32_t flags,
+                uint64_t cas);
+
+memcached_return_t
+  memcached_set_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags);
+
+memcached_return_t
+  memcached_add_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags);
+
+memcached_return_t
+  memcached_replace_by_key(memcached_st *ptr,
+                           const char *master_key, size_t master_key_length,
+                           const char *key, size_t key_length,
+                           const char *value, size_t value_length,
+                           time_t expiration,
+                           uint32_t flags);
+
+memcached_return_t
+  memcached_prepend_by_key(memcached_st *ptr,
+                           const char *master_key, size_t master_key_length,
+                           const char *key, size_t key_length,
+                           const char *value, size_t value_length,
+                           time_t expiration,
+                           uint32_t flags);
+
+memcached_return_t
+  memcached_append_by_key(memcached_st *ptr,
+                          const char *master_key, size_t master_key_length,
+                          const char *key, size_t key_length,
+                          const char *value, size_t value_length,
+                          time_t expiration,
+                          uint32_t flags);
+
+memcached_return_t
+  memcached_cas_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags,
+                       uint64_t cas);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_set(), memcached_add(), and memcached_replace() are all used to
+store information on the server. All methods take a key, and its length to
+store the object. Keys are currently limited to 250 characters by the
+memcached(1) server. You must also supply a value and a length. Optionally you
+may support an expiration time for the object and a 16 byte value (it is
+meant to be used as a bitmap).
+.sp
+memcached_set() will write an object to the server. If an object already
+exists it will overwrite what is in the server. If the object does not exist
+it will be written. If you are using the non\-blocking mode this function
+will always return true unless a network error occurs.
+.sp
+memcached_replace() replaces an object on the server. If the object is not
+found on the server an error occurs.
+.sp
+memcached_add() adds an object to the server. If the object is found on the
+server an error occurs, otherwise the value is stored.
+.sp
+memcached_prepend() places a segment of data before the last piece of data
+stored. Currently expiration and key are not used in the server.
+.sp
+memcached_append() places a segment of data at the end of the last piece of
+data stored. Currently expiration and key are not used in the server.
+.sp
+memcached_cas() overwrites data in the server as long as the "cas" value is
+still the same in the server. You can get the cas value of a result by
+calling memcached_result_cas() on a memcached_result_st(3) structure. At the point
+that this note was written cas is still buggy in memached. Turning on support
+for it in libmemcached(3) is optional. Please see memcached_set() for
+information on how to do this.
+.sp
+memcached_set_by_key(), memcached_add_by_key(), memcached_replace_by_key(),
+memcached_prepend_by_key(), memcached_append_by_key_by_key(),
+memcached_cas_by_key() methods all behave in a similar method as the non key
+methods. The difference is that they use their master_key parameter to map
+objects to particular servers.
+.sp
+If you are looking for performance, memcached_set() with non\-blocking IO is
+the fastest way to store data on the server.
+.sp
+All of the above functions are supported with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPbehavior enabled. But when using these operations with this behavior on, there
+are limits to the size of the payload being sent to the server.  The reason for
+these limits is that the Memcahed Server does not allow multi\-datagram requests
+and the current server implementation sets a datagram size to 1400 bytes. Due
+to protocol overhead, the actual limit of the user supplied data is less than
+1400 bytes and depends on the protocol in use as well as the operation being
+executed. When running with the binary protocol, \(ga\(ga MEMCACHED_BEHAVIOR_BINARY_PROTOCOL\(ga\(ga,
+the size of the key,value, flags and expiry combined may not exceed 1368 bytes.
+When running with the ASCII protocol, the exact limit fluctuates depending on
+which function is being executed and whether the function is a cas operation
+or not. For non\-cas ASCII set operations, there are at least 1335 bytes available
+to split among the key, key_prefix, and value; for cas ASCII operations there are
+at least 1318 bytes available to split among the key, key_prefix and value. If the
+total size of the command, including overhead, exceeds 1400 bytes, a \fBMEMCACHED_WRITE_FAILURE\fPwill be returned.
+.SH RETURN
+.sp
+All methods return a value of type \fBmemcached_return_t\fP.
+On success the value will be \fBMEMCACHED_SUCCESS\fP.
+Use memcached_strerror() to translate this value to a printable string.
+.sp
+For memcached_replace() and memcached_add(), \fBMEMCACHED_NOTSTORED\fP is a
+legitmate error in the case of a collision.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_prepend_by_key.3 b/docs/man/memcached_prepend_by_key.3
new file mode 100644 (file)
index 0000000..a8b5a2f
--- /dev/null
@@ -0,0 +1,216 @@
+.TH "MEMCACHED_PREPEND_BY_KEY" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_prepend_by_key \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Store value on server
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_set (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 const char *value, size_t value_length,
+                 time_t expiration,
+                 uint32_t flags);
+
+memcached_return_t
+  memcached_add (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 const char *value, size_t value_length,
+                 time_t expiration,
+                 uint32_t flags);
+
+memcached_return_t
+  memcached_replace (memcached_st *ptr,
+                     const char *key, size_t key_length,
+                     const char *value, size_t value_length,
+                     time_t expiration,
+                     uint32_t flags);
+
+memcached_return_t
+  memcached_prepend(memcached_st *ptr,
+                    const char *key, size_t key_length,
+                    const char *value, size_t value_length,
+                    time_t expiration,
+                    uint32_t flags)
+
+memcached_return_t
+  memcached_append(memcached_st *ptr,
+                   const char *key, size_t key_length,
+                    const char *value, size_t value_length,
+                    time_t expiration,
+                    uint32_t flags)
+memcached_return_t
+  memcached_cas(memcached_st *ptr,
+                const char *key, size_t key_length,
+                const char *value, size_t value_length,
+                time_t expiration,
+                uint32_t flags,
+                uint64_t cas);
+
+memcached_return_t
+  memcached_set_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags);
+
+memcached_return_t
+  memcached_add_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags);
+
+memcached_return_t
+  memcached_replace_by_key(memcached_st *ptr,
+                           const char *master_key, size_t master_key_length,
+                           const char *key, size_t key_length,
+                           const char *value, size_t value_length,
+                           time_t expiration,
+                           uint32_t flags);
+
+memcached_return_t
+  memcached_prepend_by_key(memcached_st *ptr,
+                           const char *master_key, size_t master_key_length,
+                           const char *key, size_t key_length,
+                           const char *value, size_t value_length,
+                           time_t expiration,
+                           uint32_t flags);
+
+memcached_return_t
+  memcached_append_by_key(memcached_st *ptr,
+                          const char *master_key, size_t master_key_length,
+                          const char *key, size_t key_length,
+                          const char *value, size_t value_length,
+                          time_t expiration,
+                          uint32_t flags);
+
+memcached_return_t
+  memcached_cas_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags,
+                       uint64_t cas);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_set(), memcached_add(), and memcached_replace() are all used to
+store information on the server. All methods take a key, and its length to
+store the object. Keys are currently limited to 250 characters by the
+memcached(1) server. You must also supply a value and a length. Optionally you
+may support an expiration time for the object and a 16 byte value (it is
+meant to be used as a bitmap).
+.sp
+memcached_set() will write an object to the server. If an object already
+exists it will overwrite what is in the server. If the object does not exist
+it will be written. If you are using the non\-blocking mode this function
+will always return true unless a network error occurs.
+.sp
+memcached_replace() replaces an object on the server. If the object is not
+found on the server an error occurs.
+.sp
+memcached_add() adds an object to the server. If the object is found on the
+server an error occurs, otherwise the value is stored.
+.sp
+memcached_prepend() places a segment of data before the last piece of data
+stored. Currently expiration and key are not used in the server.
+.sp
+memcached_append() places a segment of data at the end of the last piece of
+data stored. Currently expiration and key are not used in the server.
+.sp
+memcached_cas() overwrites data in the server as long as the "cas" value is
+still the same in the server. You can get the cas value of a result by
+calling memcached_result_cas() on a memcached_result_st(3) structure. At the point
+that this note was written cas is still buggy in memached. Turning on support
+for it in libmemcached(3) is optional. Please see memcached_set() for
+information on how to do this.
+.sp
+memcached_set_by_key(), memcached_add_by_key(), memcached_replace_by_key(),
+memcached_prepend_by_key(), memcached_append_by_key_by_key(),
+memcached_cas_by_key() methods all behave in a similar method as the non key
+methods. The difference is that they use their master_key parameter to map
+objects to particular servers.
+.sp
+If you are looking for performance, memcached_set() with non\-blocking IO is
+the fastest way to store data on the server.
+.sp
+All of the above functions are supported with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPbehavior enabled. But when using these operations with this behavior on, there
+are limits to the size of the payload being sent to the server.  The reason for
+these limits is that the Memcahed Server does not allow multi\-datagram requests
+and the current server implementation sets a datagram size to 1400 bytes. Due
+to protocol overhead, the actual limit of the user supplied data is less than
+1400 bytes and depends on the protocol in use as well as the operation being
+executed. When running with the binary protocol, \(ga\(ga MEMCACHED_BEHAVIOR_BINARY_PROTOCOL\(ga\(ga,
+the size of the key,value, flags and expiry combined may not exceed 1368 bytes.
+When running with the ASCII protocol, the exact limit fluctuates depending on
+which function is being executed and whether the function is a cas operation
+or not. For non\-cas ASCII set operations, there are at least 1335 bytes available
+to split among the key, key_prefix, and value; for cas ASCII operations there are
+at least 1318 bytes available to split among the key, key_prefix and value. If the
+total size of the command, including overhead, exceeds 1400 bytes, a \fBMEMCACHED_WRITE_FAILURE\fPwill be returned.
+.SH RETURN
+.sp
+All methods return a value of type \fBmemcached_return_t\fP.
+On success the value will be \fBMEMCACHED_SUCCESS\fP.
+Use memcached_strerror() to translate this value to a printable string.
+.sp
+For memcached_replace() and memcached_add(), \fBMEMCACHED_NOTSTORED\fP is a
+legitmate error in the case of a collision.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_quit.3 b/docs/man/memcached_quit.3
new file mode 100644 (file)
index 0000000..719858c
--- /dev/null
@@ -0,0 +1,79 @@
+.TH "MEMCACHED_QUIT" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_quit \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Disconnect from all servers
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+void memcached_quit (memcached_st *ptr);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_quit() will disconnect you from all currently connected servers.
+It will also reset the state of the connection (ie, any memcached_fetch() you
+are in the middle of will be terminated). This function is called
+automatically when you call memcached_free() on the \fBmemcached_st\fP structure.
+.sp
+You do not need to call this on your own. All operations to change server
+hashes and parameters will handle connections to the server for you. This
+function is provided mainly so that you can timeout your connections or
+reset connections during the middle of a memcached_fetch().
+.SH RETURN
+.sp
+A value of type \fBmemcached_return\fP is returned
+On success that value will be \fBMEMCACHED_SUCCESS\fP.
+Use memcached_strerror() to translate this value to a printable string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_replace.3 b/docs/man/memcached_replace.3
new file mode 100644 (file)
index 0000000..db36e33
--- /dev/null
@@ -0,0 +1,216 @@
+.TH "MEMCACHED_REPLACE" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_replace \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Store value on server
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_set (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 const char *value, size_t value_length,
+                 time_t expiration,
+                 uint32_t flags);
+
+memcached_return_t
+  memcached_add (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 const char *value, size_t value_length,
+                 time_t expiration,
+                 uint32_t flags);
+
+memcached_return_t
+  memcached_replace (memcached_st *ptr,
+                     const char *key, size_t key_length,
+                     const char *value, size_t value_length,
+                     time_t expiration,
+                     uint32_t flags);
+
+memcached_return_t
+  memcached_prepend(memcached_st *ptr,
+                    const char *key, size_t key_length,
+                    const char *value, size_t value_length,
+                    time_t expiration,
+                    uint32_t flags)
+
+memcached_return_t
+  memcached_append(memcached_st *ptr,
+                   const char *key, size_t key_length,
+                    const char *value, size_t value_length,
+                    time_t expiration,
+                    uint32_t flags)
+memcached_return_t
+  memcached_cas(memcached_st *ptr,
+                const char *key, size_t key_length,
+                const char *value, size_t value_length,
+                time_t expiration,
+                uint32_t flags,
+                uint64_t cas);
+
+memcached_return_t
+  memcached_set_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags);
+
+memcached_return_t
+  memcached_add_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags);
+
+memcached_return_t
+  memcached_replace_by_key(memcached_st *ptr,
+                           const char *master_key, size_t master_key_length,
+                           const char *key, size_t key_length,
+                           const char *value, size_t value_length,
+                           time_t expiration,
+                           uint32_t flags);
+
+memcached_return_t
+  memcached_prepend_by_key(memcached_st *ptr,
+                           const char *master_key, size_t master_key_length,
+                           const char *key, size_t key_length,
+                           const char *value, size_t value_length,
+                           time_t expiration,
+                           uint32_t flags);
+
+memcached_return_t
+  memcached_append_by_key(memcached_st *ptr,
+                          const char *master_key, size_t master_key_length,
+                          const char *key, size_t key_length,
+                          const char *value, size_t value_length,
+                          time_t expiration,
+                          uint32_t flags);
+
+memcached_return_t
+  memcached_cas_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags,
+                       uint64_t cas);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_set(), memcached_add(), and memcached_replace() are all used to
+store information on the server. All methods take a key, and its length to
+store the object. Keys are currently limited to 250 characters by the
+memcached(1) server. You must also supply a value and a length. Optionally you
+may support an expiration time for the object and a 16 byte value (it is
+meant to be used as a bitmap).
+.sp
+memcached_set() will write an object to the server. If an object already
+exists it will overwrite what is in the server. If the object does not exist
+it will be written. If you are using the non\-blocking mode this function
+will always return true unless a network error occurs.
+.sp
+memcached_replace() replaces an object on the server. If the object is not
+found on the server an error occurs.
+.sp
+memcached_add() adds an object to the server. If the object is found on the
+server an error occurs, otherwise the value is stored.
+.sp
+memcached_prepend() places a segment of data before the last piece of data
+stored. Currently expiration and key are not used in the server.
+.sp
+memcached_append() places a segment of data at the end of the last piece of
+data stored. Currently expiration and key are not used in the server.
+.sp
+memcached_cas() overwrites data in the server as long as the "cas" value is
+still the same in the server. You can get the cas value of a result by
+calling memcached_result_cas() on a memcached_result_st(3) structure. At the point
+that this note was written cas is still buggy in memached. Turning on support
+for it in libmemcached(3) is optional. Please see memcached_set() for
+information on how to do this.
+.sp
+memcached_set_by_key(), memcached_add_by_key(), memcached_replace_by_key(),
+memcached_prepend_by_key(), memcached_append_by_key_by_key(),
+memcached_cas_by_key() methods all behave in a similar method as the non key
+methods. The difference is that they use their master_key parameter to map
+objects to particular servers.
+.sp
+If you are looking for performance, memcached_set() with non\-blocking IO is
+the fastest way to store data on the server.
+.sp
+All of the above functions are supported with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPbehavior enabled. But when using these operations with this behavior on, there
+are limits to the size of the payload being sent to the server.  The reason for
+these limits is that the Memcahed Server does not allow multi\-datagram requests
+and the current server implementation sets a datagram size to 1400 bytes. Due
+to protocol overhead, the actual limit of the user supplied data is less than
+1400 bytes and depends on the protocol in use as well as the operation being
+executed. When running with the binary protocol, \(ga\(ga MEMCACHED_BEHAVIOR_BINARY_PROTOCOL\(ga\(ga,
+the size of the key,value, flags and expiry combined may not exceed 1368 bytes.
+When running with the ASCII protocol, the exact limit fluctuates depending on
+which function is being executed and whether the function is a cas operation
+or not. For non\-cas ASCII set operations, there are at least 1335 bytes available
+to split among the key, key_prefix, and value; for cas ASCII operations there are
+at least 1318 bytes available to split among the key, key_prefix and value. If the
+total size of the command, including overhead, exceeds 1400 bytes, a \fBMEMCACHED_WRITE_FAILURE\fPwill be returned.
+.SH RETURN
+.sp
+All methods return a value of type \fBmemcached_return_t\fP.
+On success the value will be \fBMEMCACHED_SUCCESS\fP.
+Use memcached_strerror() to translate this value to a printable string.
+.sp
+For memcached_replace() and memcached_add(), \fBMEMCACHED_NOTSTORED\fP is a
+legitmate error in the case of a collision.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_replace_by_key.3 b/docs/man/memcached_replace_by_key.3
new file mode 100644 (file)
index 0000000..afa9f42
--- /dev/null
@@ -0,0 +1,216 @@
+.TH "MEMCACHED_REPLACE_BY_KEY" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_replace_by_key \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Store value on server
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_set (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 const char *value, size_t value_length,
+                 time_t expiration,
+                 uint32_t flags);
+
+memcached_return_t
+  memcached_add (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 const char *value, size_t value_length,
+                 time_t expiration,
+                 uint32_t flags);
+
+memcached_return_t
+  memcached_replace (memcached_st *ptr,
+                     const char *key, size_t key_length,
+                     const char *value, size_t value_length,
+                     time_t expiration,
+                     uint32_t flags);
+
+memcached_return_t
+  memcached_prepend(memcached_st *ptr,
+                    const char *key, size_t key_length,
+                    const char *value, size_t value_length,
+                    time_t expiration,
+                    uint32_t flags)
+
+memcached_return_t
+  memcached_append(memcached_st *ptr,
+                   const char *key, size_t key_length,
+                    const char *value, size_t value_length,
+                    time_t expiration,
+                    uint32_t flags)
+memcached_return_t
+  memcached_cas(memcached_st *ptr,
+                const char *key, size_t key_length,
+                const char *value, size_t value_length,
+                time_t expiration,
+                uint32_t flags,
+                uint64_t cas);
+
+memcached_return_t
+  memcached_set_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags);
+
+memcached_return_t
+  memcached_add_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags);
+
+memcached_return_t
+  memcached_replace_by_key(memcached_st *ptr,
+                           const char *master_key, size_t master_key_length,
+                           const char *key, size_t key_length,
+                           const char *value, size_t value_length,
+                           time_t expiration,
+                           uint32_t flags);
+
+memcached_return_t
+  memcached_prepend_by_key(memcached_st *ptr,
+                           const char *master_key, size_t master_key_length,
+                           const char *key, size_t key_length,
+                           const char *value, size_t value_length,
+                           time_t expiration,
+                           uint32_t flags);
+
+memcached_return_t
+  memcached_append_by_key(memcached_st *ptr,
+                          const char *master_key, size_t master_key_length,
+                          const char *key, size_t key_length,
+                          const char *value, size_t value_length,
+                          time_t expiration,
+                          uint32_t flags);
+
+memcached_return_t
+  memcached_cas_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags,
+                       uint64_t cas);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_set(), memcached_add(), and memcached_replace() are all used to
+store information on the server. All methods take a key, and its length to
+store the object. Keys are currently limited to 250 characters by the
+memcached(1) server. You must also supply a value and a length. Optionally you
+may support an expiration time for the object and a 16 byte value (it is
+meant to be used as a bitmap).
+.sp
+memcached_set() will write an object to the server. If an object already
+exists it will overwrite what is in the server. If the object does not exist
+it will be written. If you are using the non\-blocking mode this function
+will always return true unless a network error occurs.
+.sp
+memcached_replace() replaces an object on the server. If the object is not
+found on the server an error occurs.
+.sp
+memcached_add() adds an object to the server. If the object is found on the
+server an error occurs, otherwise the value is stored.
+.sp
+memcached_prepend() places a segment of data before the last piece of data
+stored. Currently expiration and key are not used in the server.
+.sp
+memcached_append() places a segment of data at the end of the last piece of
+data stored. Currently expiration and key are not used in the server.
+.sp
+memcached_cas() overwrites data in the server as long as the "cas" value is
+still the same in the server. You can get the cas value of a result by
+calling memcached_result_cas() on a memcached_result_st(3) structure. At the point
+that this note was written cas is still buggy in memached. Turning on support
+for it in libmemcached(3) is optional. Please see memcached_set() for
+information on how to do this.
+.sp
+memcached_set_by_key(), memcached_add_by_key(), memcached_replace_by_key(),
+memcached_prepend_by_key(), memcached_append_by_key_by_key(),
+memcached_cas_by_key() methods all behave in a similar method as the non key
+methods. The difference is that they use their master_key parameter to map
+objects to particular servers.
+.sp
+If you are looking for performance, memcached_set() with non\-blocking IO is
+the fastest way to store data on the server.
+.sp
+All of the above functions are supported with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPbehavior enabled. But when using these operations with this behavior on, there
+are limits to the size of the payload being sent to the server.  The reason for
+these limits is that the Memcahed Server does not allow multi\-datagram requests
+and the current server implementation sets a datagram size to 1400 bytes. Due
+to protocol overhead, the actual limit of the user supplied data is less than
+1400 bytes and depends on the protocol in use as well as the operation being
+executed. When running with the binary protocol, \(ga\(ga MEMCACHED_BEHAVIOR_BINARY_PROTOCOL\(ga\(ga,
+the size of the key,value, flags and expiry combined may not exceed 1368 bytes.
+When running with the ASCII protocol, the exact limit fluctuates depending on
+which function is being executed and whether the function is a cas operation
+or not. For non\-cas ASCII set operations, there are at least 1335 bytes available
+to split among the key, key_prefix, and value; for cas ASCII operations there are
+at least 1318 bytes available to split among the key, key_prefix and value. If the
+total size of the command, including overhead, exceeds 1400 bytes, a \fBMEMCACHED_WRITE_FAILURE\fPwill be returned.
+.SH RETURN
+.sp
+All methods return a value of type \fBmemcached_return_t\fP.
+On success the value will be \fBMEMCACHED_SUCCESS\fP.
+Use memcached_strerror() to translate this value to a printable string.
+.sp
+For memcached_replace() and memcached_add(), \fBMEMCACHED_NOTSTORED\fP is a
+legitmate error in the case of a collision.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_result_cas.3 b/docs/man/memcached_result_cas.3
new file mode 100644 (file)
index 0000000..710c7e7
--- /dev/null
@@ -0,0 +1,143 @@
+.TH "MEMCACHED_RESULT_CAS" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_result_cas \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Work with memcached_result_st
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_result_st *
+  memcached_result_create (memcached_st *ptr,
+                           memcached_result_st *result);
+
+void memcached_result_free (memcached_result_st *result);
+
+const char * memcached_result_key_value (memcached_result_st *result);
+
+size_t memcached_result_key_length (const memcached_result_st *result);
+
+const char *memcached_result_value (memcached_result_st *ptr);
+
+size_t memcached_result_length (const memcached_result_st *ptr);
+
+uint32_t memcached_result_flags (const memcached_result_st *result)
+
+uint64_t memcached_result_cas (const memcached_result_st *result);
+
+memcached_return_t
+  memcached_result_set_value (memcached_result_st *ptr,
+                              const char *value, size_t length)
+
+void memcached_result_set_flags (memcached_result_st *ptr, uint32_t flags)
+
+void memcached_result_set_expiration (memcached_result_st *ptr, time_t)
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) can optionally return a memcached_result_st which acts as a
+result object. The result objects have added benefits over the character
+pointer returns in that they are forward compatible with new return items
+that future memcached servers may implement (the best current example of
+this is the CAS return item). The structures can also be reused which will
+save on calls to malloc(3). It is suggested that you use result objects over
+char * return functions.
+.sp
+The structure of memcached_result_st has been encapsulated, you should not
+write code to directly access members of the structure.
+.sp
+memcached_result_create() will either allocate memory for a
+memcached_result_st or will initialize a structure passed to it.
+.sp
+memcached_result_free() will deallocate any memory attached to the
+structure. If the structure was also alloacted, it will deallocate it.
+.sp
+memcached_result_key_value() returns the key value associated with the
+current result object.
+.sp
+memcached_result_key_length() returns the key length associated with the
+current result object.
+.sp
+memcached_result_value() returns the result value associated with the
+current result object.
+.sp
+memcached_result_length() returns the result length associated with the
+current result object.
+.sp
+memcached_result_flags() returns the flags associated with the
+current result object.
+.sp
+memcached_result_cas() returns the cas associated with the
+current result object. This value will only be available if the server
+supports it.
+.sp
+memcached_result_set_value() takes a byte array and a size and sets
+the result to this value. This function is used for trigger responses.
+.sp
+void memcached_result_set_flags() takes a result structure and stores
+a new value for the flags field.
+.sp
+void memcached_result_set_expiration(A) takes a result structure and stores
+a new value for the expiration field (this is only used by read through
+triggers).
+.sp
+You may wish to avoid using memcached_result_create(3) with a
+stack based allocation. The most common issues related to ABI safety involve
+heap allocated structures.
+.SH RETURN
+.sp
+Varies, see particular functions. All structures must have
+memcached_result_free() called on them for cleanup purposes. Failure to
+do this will result in leaked memory.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_result_create.3 b/docs/man/memcached_result_create.3
new file mode 100644 (file)
index 0000000..f0facf5
--- /dev/null
@@ -0,0 +1,143 @@
+.TH "MEMCACHED_RESULT_CREATE" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_result_create \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Work with memcached_result_st
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_result_st *
+  memcached_result_create (memcached_st *ptr,
+                           memcached_result_st *result);
+
+void memcached_result_free (memcached_result_st *result);
+
+const char * memcached_result_key_value (memcached_result_st *result);
+
+size_t memcached_result_key_length (const memcached_result_st *result);
+
+const char *memcached_result_value (memcached_result_st *ptr);
+
+size_t memcached_result_length (const memcached_result_st *ptr);
+
+uint32_t memcached_result_flags (const memcached_result_st *result)
+
+uint64_t memcached_result_cas (const memcached_result_st *result);
+
+memcached_return_t
+  memcached_result_set_value (memcached_result_st *ptr,
+                              const char *value, size_t length)
+
+void memcached_result_set_flags (memcached_result_st *ptr, uint32_t flags)
+
+void memcached_result_set_expiration (memcached_result_st *ptr, time_t)
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) can optionally return a memcached_result_st which acts as a
+result object. The result objects have added benefits over the character
+pointer returns in that they are forward compatible with new return items
+that future memcached servers may implement (the best current example of
+this is the CAS return item). The structures can also be reused which will
+save on calls to malloc(3). It is suggested that you use result objects over
+char * return functions.
+.sp
+The structure of memcached_result_st has been encapsulated, you should not
+write code to directly access members of the structure.
+.sp
+memcached_result_create() will either allocate memory for a
+memcached_result_st or will initialize a structure passed to it.
+.sp
+memcached_result_free() will deallocate any memory attached to the
+structure. If the structure was also alloacted, it will deallocate it.
+.sp
+memcached_result_key_value() returns the key value associated with the
+current result object.
+.sp
+memcached_result_key_length() returns the key length associated with the
+current result object.
+.sp
+memcached_result_value() returns the result value associated with the
+current result object.
+.sp
+memcached_result_length() returns the result length associated with the
+current result object.
+.sp
+memcached_result_flags() returns the flags associated with the
+current result object.
+.sp
+memcached_result_cas() returns the cas associated with the
+current result object. This value will only be available if the server
+supports it.
+.sp
+memcached_result_set_value() takes a byte array and a size and sets
+the result to this value. This function is used for trigger responses.
+.sp
+void memcached_result_set_flags() takes a result structure and stores
+a new value for the flags field.
+.sp
+void memcached_result_set_expiration(A) takes a result structure and stores
+a new value for the expiration field (this is only used by read through
+triggers).
+.sp
+You may wish to avoid using memcached_result_create(3) with a
+stack based allocation. The most common issues related to ABI safety involve
+heap allocated structures.
+.SH RETURN
+.sp
+Varies, see particular functions. All structures must have
+memcached_result_free() called on them for cleanup purposes. Failure to
+do this will result in leaked memory.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_result_flags.3 b/docs/man/memcached_result_flags.3
new file mode 100644 (file)
index 0000000..601879d
--- /dev/null
@@ -0,0 +1,143 @@
+.TH "MEMCACHED_RESULT_FLAGS" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_result_flags \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Work with memcached_result_st
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_result_st *
+  memcached_result_create (memcached_st *ptr,
+                           memcached_result_st *result);
+
+void memcached_result_free (memcached_result_st *result);
+
+const char * memcached_result_key_value (memcached_result_st *result);
+
+size_t memcached_result_key_length (const memcached_result_st *result);
+
+const char *memcached_result_value (memcached_result_st *ptr);
+
+size_t memcached_result_length (const memcached_result_st *ptr);
+
+uint32_t memcached_result_flags (const memcached_result_st *result)
+
+uint64_t memcached_result_cas (const memcached_result_st *result);
+
+memcached_return_t
+  memcached_result_set_value (memcached_result_st *ptr,
+                              const char *value, size_t length)
+
+void memcached_result_set_flags (memcached_result_st *ptr, uint32_t flags)
+
+void memcached_result_set_expiration (memcached_result_st *ptr, time_t)
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) can optionally return a memcached_result_st which acts as a
+result object. The result objects have added benefits over the character
+pointer returns in that they are forward compatible with new return items
+that future memcached servers may implement (the best current example of
+this is the CAS return item). The structures can also be reused which will
+save on calls to malloc(3). It is suggested that you use result objects over
+char * return functions.
+.sp
+The structure of memcached_result_st has been encapsulated, you should not
+write code to directly access members of the structure.
+.sp
+memcached_result_create() will either allocate memory for a
+memcached_result_st or will initialize a structure passed to it.
+.sp
+memcached_result_free() will deallocate any memory attached to the
+structure. If the structure was also alloacted, it will deallocate it.
+.sp
+memcached_result_key_value() returns the key value associated with the
+current result object.
+.sp
+memcached_result_key_length() returns the key length associated with the
+current result object.
+.sp
+memcached_result_value() returns the result value associated with the
+current result object.
+.sp
+memcached_result_length() returns the result length associated with the
+current result object.
+.sp
+memcached_result_flags() returns the flags associated with the
+current result object.
+.sp
+memcached_result_cas() returns the cas associated with the
+current result object. This value will only be available if the server
+supports it.
+.sp
+memcached_result_set_value() takes a byte array and a size and sets
+the result to this value. This function is used for trigger responses.
+.sp
+void memcached_result_set_flags() takes a result structure and stores
+a new value for the flags field.
+.sp
+void memcached_result_set_expiration(A) takes a result structure and stores
+a new value for the expiration field (this is only used by read through
+triggers).
+.sp
+You may wish to avoid using memcached_result_create(3) with a
+stack based allocation. The most common issues related to ABI safety involve
+heap allocated structures.
+.SH RETURN
+.sp
+Varies, see particular functions. All structures must have
+memcached_result_free() called on them for cleanup purposes. Failure to
+do this will result in leaked memory.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_result_free.3 b/docs/man/memcached_result_free.3
new file mode 100644 (file)
index 0000000..4035163
--- /dev/null
@@ -0,0 +1,143 @@
+.TH "MEMCACHED_RESULT_FREE" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_result_free \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Work with memcached_result_st
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_result_st *
+  memcached_result_create (memcached_st *ptr,
+                           memcached_result_st *result);
+
+void memcached_result_free (memcached_result_st *result);
+
+const char * memcached_result_key_value (memcached_result_st *result);
+
+size_t memcached_result_key_length (const memcached_result_st *result);
+
+const char *memcached_result_value (memcached_result_st *ptr);
+
+size_t memcached_result_length (const memcached_result_st *ptr);
+
+uint32_t memcached_result_flags (const memcached_result_st *result)
+
+uint64_t memcached_result_cas (const memcached_result_st *result);
+
+memcached_return_t
+  memcached_result_set_value (memcached_result_st *ptr,
+                              const char *value, size_t length)
+
+void memcached_result_set_flags (memcached_result_st *ptr, uint32_t flags)
+
+void memcached_result_set_expiration (memcached_result_st *ptr, time_t)
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) can optionally return a memcached_result_st which acts as a
+result object. The result objects have added benefits over the character
+pointer returns in that they are forward compatible with new return items
+that future memcached servers may implement (the best current example of
+this is the CAS return item). The structures can also be reused which will
+save on calls to malloc(3). It is suggested that you use result objects over
+char * return functions.
+.sp
+The structure of memcached_result_st has been encapsulated, you should not
+write code to directly access members of the structure.
+.sp
+memcached_result_create() will either allocate memory for a
+memcached_result_st or will initialize a structure passed to it.
+.sp
+memcached_result_free() will deallocate any memory attached to the
+structure. If the structure was also alloacted, it will deallocate it.
+.sp
+memcached_result_key_value() returns the key value associated with the
+current result object.
+.sp
+memcached_result_key_length() returns the key length associated with the
+current result object.
+.sp
+memcached_result_value() returns the result value associated with the
+current result object.
+.sp
+memcached_result_length() returns the result length associated with the
+current result object.
+.sp
+memcached_result_flags() returns the flags associated with the
+current result object.
+.sp
+memcached_result_cas() returns the cas associated with the
+current result object. This value will only be available if the server
+supports it.
+.sp
+memcached_result_set_value() takes a byte array and a size and sets
+the result to this value. This function is used for trigger responses.
+.sp
+void memcached_result_set_flags() takes a result structure and stores
+a new value for the flags field.
+.sp
+void memcached_result_set_expiration(A) takes a result structure and stores
+a new value for the expiration field (this is only used by read through
+triggers).
+.sp
+You may wish to avoid using memcached_result_create(3) with a
+stack based allocation. The most common issues related to ABI safety involve
+heap allocated structures.
+.SH RETURN
+.sp
+Varies, see particular functions. All structures must have
+memcached_result_free() called on them for cleanup purposes. Failure to
+do this will result in leaked memory.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_result_key_length.3 b/docs/man/memcached_result_key_length.3
new file mode 100644 (file)
index 0000000..0cfbcfc
--- /dev/null
@@ -0,0 +1,143 @@
+.TH "MEMCACHED_RESULT_KEY_LENGTH" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_result_key_length \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Work with memcached_result_st
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_result_st *
+  memcached_result_create (memcached_st *ptr,
+                           memcached_result_st *result);
+
+void memcached_result_free (memcached_result_st *result);
+
+const char * memcached_result_key_value (memcached_result_st *result);
+
+size_t memcached_result_key_length (const memcached_result_st *result);
+
+const char *memcached_result_value (memcached_result_st *ptr);
+
+size_t memcached_result_length (const memcached_result_st *ptr);
+
+uint32_t memcached_result_flags (const memcached_result_st *result)
+
+uint64_t memcached_result_cas (const memcached_result_st *result);
+
+memcached_return_t
+  memcached_result_set_value (memcached_result_st *ptr,
+                              const char *value, size_t length)
+
+void memcached_result_set_flags (memcached_result_st *ptr, uint32_t flags)
+
+void memcached_result_set_expiration (memcached_result_st *ptr, time_t)
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) can optionally return a memcached_result_st which acts as a
+result object. The result objects have added benefits over the character
+pointer returns in that they are forward compatible with new return items
+that future memcached servers may implement (the best current example of
+this is the CAS return item). The structures can also be reused which will
+save on calls to malloc(3). It is suggested that you use result objects over
+char * return functions.
+.sp
+The structure of memcached_result_st has been encapsulated, you should not
+write code to directly access members of the structure.
+.sp
+memcached_result_create() will either allocate memory for a
+memcached_result_st or will initialize a structure passed to it.
+.sp
+memcached_result_free() will deallocate any memory attached to the
+structure. If the structure was also alloacted, it will deallocate it.
+.sp
+memcached_result_key_value() returns the key value associated with the
+current result object.
+.sp
+memcached_result_key_length() returns the key length associated with the
+current result object.
+.sp
+memcached_result_value() returns the result value associated with the
+current result object.
+.sp
+memcached_result_length() returns the result length associated with the
+current result object.
+.sp
+memcached_result_flags() returns the flags associated with the
+current result object.
+.sp
+memcached_result_cas() returns the cas associated with the
+current result object. This value will only be available if the server
+supports it.
+.sp
+memcached_result_set_value() takes a byte array and a size and sets
+the result to this value. This function is used for trigger responses.
+.sp
+void memcached_result_set_flags() takes a result structure and stores
+a new value for the flags field.
+.sp
+void memcached_result_set_expiration(A) takes a result structure and stores
+a new value for the expiration field (this is only used by read through
+triggers).
+.sp
+You may wish to avoid using memcached_result_create(3) with a
+stack based allocation. The most common issues related to ABI safety involve
+heap allocated structures.
+.SH RETURN
+.sp
+Varies, see particular functions. All structures must have
+memcached_result_free() called on them for cleanup purposes. Failure to
+do this will result in leaked memory.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_result_key_value.3 b/docs/man/memcached_result_key_value.3
new file mode 100644 (file)
index 0000000..a2516e3
--- /dev/null
@@ -0,0 +1,143 @@
+.TH "MEMCACHED_RESULT_KEY_VALUE" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_result_key_value \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Work with memcached_result_st
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_result_st *
+  memcached_result_create (memcached_st *ptr,
+                           memcached_result_st *result);
+
+void memcached_result_free (memcached_result_st *result);
+
+const char * memcached_result_key_value (memcached_result_st *result);
+
+size_t memcached_result_key_length (const memcached_result_st *result);
+
+const char *memcached_result_value (memcached_result_st *ptr);
+
+size_t memcached_result_length (const memcached_result_st *ptr);
+
+uint32_t memcached_result_flags (const memcached_result_st *result)
+
+uint64_t memcached_result_cas (const memcached_result_st *result);
+
+memcached_return_t
+  memcached_result_set_value (memcached_result_st *ptr,
+                              const char *value, size_t length)
+
+void memcached_result_set_flags (memcached_result_st *ptr, uint32_t flags)
+
+void memcached_result_set_expiration (memcached_result_st *ptr, time_t)
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) can optionally return a memcached_result_st which acts as a
+result object. The result objects have added benefits over the character
+pointer returns in that they are forward compatible with new return items
+that future memcached servers may implement (the best current example of
+this is the CAS return item). The structures can also be reused which will
+save on calls to malloc(3). It is suggested that you use result objects over
+char * return functions.
+.sp
+The structure of memcached_result_st has been encapsulated, you should not
+write code to directly access members of the structure.
+.sp
+memcached_result_create() will either allocate memory for a
+memcached_result_st or will initialize a structure passed to it.
+.sp
+memcached_result_free() will deallocate any memory attached to the
+structure. If the structure was also alloacted, it will deallocate it.
+.sp
+memcached_result_key_value() returns the key value associated with the
+current result object.
+.sp
+memcached_result_key_length() returns the key length associated with the
+current result object.
+.sp
+memcached_result_value() returns the result value associated with the
+current result object.
+.sp
+memcached_result_length() returns the result length associated with the
+current result object.
+.sp
+memcached_result_flags() returns the flags associated with the
+current result object.
+.sp
+memcached_result_cas() returns the cas associated with the
+current result object. This value will only be available if the server
+supports it.
+.sp
+memcached_result_set_value() takes a byte array and a size and sets
+the result to this value. This function is used for trigger responses.
+.sp
+void memcached_result_set_flags() takes a result structure and stores
+a new value for the flags field.
+.sp
+void memcached_result_set_expiration(A) takes a result structure and stores
+a new value for the expiration field (this is only used by read through
+triggers).
+.sp
+You may wish to avoid using memcached_result_create(3) with a
+stack based allocation. The most common issues related to ABI safety involve
+heap allocated structures.
+.SH RETURN
+.sp
+Varies, see particular functions. All structures must have
+memcached_result_free() called on them for cleanup purposes. Failure to
+do this will result in leaked memory.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_result_length.3 b/docs/man/memcached_result_length.3
new file mode 100644 (file)
index 0000000..363905f
--- /dev/null
@@ -0,0 +1,143 @@
+.TH "MEMCACHED_RESULT_LENGTH" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_result_length \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Work with memcached_result_st
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_result_st *
+  memcached_result_create (memcached_st *ptr,
+                           memcached_result_st *result);
+
+void memcached_result_free (memcached_result_st *result);
+
+const char * memcached_result_key_value (memcached_result_st *result);
+
+size_t memcached_result_key_length (const memcached_result_st *result);
+
+const char *memcached_result_value (memcached_result_st *ptr);
+
+size_t memcached_result_length (const memcached_result_st *ptr);
+
+uint32_t memcached_result_flags (const memcached_result_st *result)
+
+uint64_t memcached_result_cas (const memcached_result_st *result);
+
+memcached_return_t
+  memcached_result_set_value (memcached_result_st *ptr,
+                              const char *value, size_t length)
+
+void memcached_result_set_flags (memcached_result_st *ptr, uint32_t flags)
+
+void memcached_result_set_expiration (memcached_result_st *ptr, time_t)
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) can optionally return a memcached_result_st which acts as a
+result object. The result objects have added benefits over the character
+pointer returns in that they are forward compatible with new return items
+that future memcached servers may implement (the best current example of
+this is the CAS return item). The structures can also be reused which will
+save on calls to malloc(3). It is suggested that you use result objects over
+char * return functions.
+.sp
+The structure of memcached_result_st has been encapsulated, you should not
+write code to directly access members of the structure.
+.sp
+memcached_result_create() will either allocate memory for a
+memcached_result_st or will initialize a structure passed to it.
+.sp
+memcached_result_free() will deallocate any memory attached to the
+structure. If the structure was also alloacted, it will deallocate it.
+.sp
+memcached_result_key_value() returns the key value associated with the
+current result object.
+.sp
+memcached_result_key_length() returns the key length associated with the
+current result object.
+.sp
+memcached_result_value() returns the result value associated with the
+current result object.
+.sp
+memcached_result_length() returns the result length associated with the
+current result object.
+.sp
+memcached_result_flags() returns the flags associated with the
+current result object.
+.sp
+memcached_result_cas() returns the cas associated with the
+current result object. This value will only be available if the server
+supports it.
+.sp
+memcached_result_set_value() takes a byte array and a size and sets
+the result to this value. This function is used for trigger responses.
+.sp
+void memcached_result_set_flags() takes a result structure and stores
+a new value for the flags field.
+.sp
+void memcached_result_set_expiration(A) takes a result structure and stores
+a new value for the expiration field (this is only used by read through
+triggers).
+.sp
+You may wish to avoid using memcached_result_create(3) with a
+stack based allocation. The most common issues related to ABI safety involve
+heap allocated structures.
+.SH RETURN
+.sp
+Varies, see particular functions. All structures must have
+memcached_result_free() called on them for cleanup purposes. Failure to
+do this will result in leaked memory.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_result_st.3 b/docs/man/memcached_result_st.3
new file mode 100644 (file)
index 0000000..0bdf0f5
--- /dev/null
@@ -0,0 +1,143 @@
+.TH "MEMCACHED_RESULT_ST" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_result_st \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Work with memcached_result_st
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_result_st *
+  memcached_result_create (memcached_st *ptr,
+                           memcached_result_st *result);
+
+void memcached_result_free (memcached_result_st *result);
+
+const char * memcached_result_key_value (memcached_result_st *result);
+
+size_t memcached_result_key_length (const memcached_result_st *result);
+
+const char *memcached_result_value (memcached_result_st *ptr);
+
+size_t memcached_result_length (const memcached_result_st *ptr);
+
+uint32_t memcached_result_flags (const memcached_result_st *result)
+
+uint64_t memcached_result_cas (const memcached_result_st *result);
+
+memcached_return_t
+  memcached_result_set_value (memcached_result_st *ptr,
+                              const char *value, size_t length)
+
+void memcached_result_set_flags (memcached_result_st *ptr, uint32_t flags)
+
+void memcached_result_set_expiration (memcached_result_st *ptr, time_t)
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) can optionally return a memcached_result_st which acts as a
+result object. The result objects have added benefits over the character
+pointer returns in that they are forward compatible with new return items
+that future memcached servers may implement (the best current example of
+this is the CAS return item). The structures can also be reused which will
+save on calls to malloc(3). It is suggested that you use result objects over
+char * return functions.
+.sp
+The structure of memcached_result_st has been encapsulated, you should not
+write code to directly access members of the structure.
+.sp
+memcached_result_create() will either allocate memory for a
+memcached_result_st or will initialize a structure passed to it.
+.sp
+memcached_result_free() will deallocate any memory attached to the
+structure. If the structure was also alloacted, it will deallocate it.
+.sp
+memcached_result_key_value() returns the key value associated with the
+current result object.
+.sp
+memcached_result_key_length() returns the key length associated with the
+current result object.
+.sp
+memcached_result_value() returns the result value associated with the
+current result object.
+.sp
+memcached_result_length() returns the result length associated with the
+current result object.
+.sp
+memcached_result_flags() returns the flags associated with the
+current result object.
+.sp
+memcached_result_cas() returns the cas associated with the
+current result object. This value will only be available if the server
+supports it.
+.sp
+memcached_result_set_value() takes a byte array and a size and sets
+the result to this value. This function is used for trigger responses.
+.sp
+void memcached_result_set_flags() takes a result structure and stores
+a new value for the flags field.
+.sp
+void memcached_result_set_expiration(A) takes a result structure and stores
+a new value for the expiration field (this is only used by read through
+triggers).
+.sp
+You may wish to avoid using memcached_result_create(3) with a
+stack based allocation. The most common issues related to ABI safety involve
+heap allocated structures.
+.SH RETURN
+.sp
+Varies, see particular functions. All structures must have
+memcached_result_free() called on them for cleanup purposes. Failure to
+do this will result in leaked memory.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_result_value.3 b/docs/man/memcached_result_value.3
new file mode 100644 (file)
index 0000000..80b0774
--- /dev/null
@@ -0,0 +1,143 @@
+.TH "MEMCACHED_RESULT_VALUE" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_result_value \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Work with memcached_result_st
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_result_st *
+  memcached_result_create (memcached_st *ptr,
+                           memcached_result_st *result);
+
+void memcached_result_free (memcached_result_st *result);
+
+const char * memcached_result_key_value (memcached_result_st *result);
+
+size_t memcached_result_key_length (const memcached_result_st *result);
+
+const char *memcached_result_value (memcached_result_st *ptr);
+
+size_t memcached_result_length (const memcached_result_st *ptr);
+
+uint32_t memcached_result_flags (const memcached_result_st *result)
+
+uint64_t memcached_result_cas (const memcached_result_st *result);
+
+memcached_return_t
+  memcached_result_set_value (memcached_result_st *ptr,
+                              const char *value, size_t length)
+
+void memcached_result_set_flags (memcached_result_st *ptr, uint32_t flags)
+
+void memcached_result_set_expiration (memcached_result_st *ptr, time_t)
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) can optionally return a memcached_result_st which acts as a
+result object. The result objects have added benefits over the character
+pointer returns in that they are forward compatible with new return items
+that future memcached servers may implement (the best current example of
+this is the CAS return item). The structures can also be reused which will
+save on calls to malloc(3). It is suggested that you use result objects over
+char * return functions.
+.sp
+The structure of memcached_result_st has been encapsulated, you should not
+write code to directly access members of the structure.
+.sp
+memcached_result_create() will either allocate memory for a
+memcached_result_st or will initialize a structure passed to it.
+.sp
+memcached_result_free() will deallocate any memory attached to the
+structure. If the structure was also alloacted, it will deallocate it.
+.sp
+memcached_result_key_value() returns the key value associated with the
+current result object.
+.sp
+memcached_result_key_length() returns the key length associated with the
+current result object.
+.sp
+memcached_result_value() returns the result value associated with the
+current result object.
+.sp
+memcached_result_length() returns the result length associated with the
+current result object.
+.sp
+memcached_result_flags() returns the flags associated with the
+current result object.
+.sp
+memcached_result_cas() returns the cas associated with the
+current result object. This value will only be available if the server
+supports it.
+.sp
+memcached_result_set_value() takes a byte array and a size and sets
+the result to this value. This function is used for trigger responses.
+.sp
+void memcached_result_set_flags() takes a result structure and stores
+a new value for the flags field.
+.sp
+void memcached_result_set_expiration(A) takes a result structure and stores
+a new value for the expiration field (this is only used by read through
+triggers).
+.sp
+You may wish to avoid using memcached_result_create(3) with a
+stack based allocation. The most common issues related to ABI safety involve
+heap allocated structures.
+.SH RETURN
+.sp
+Varies, see particular functions. All structures must have
+memcached_result_free() called on them for cleanup purposes. Failure to
+do this will result in leaked memory.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_sasl.3 b/docs/man/memcached_sasl.3
new file mode 100644 (file)
index 0000000..fd70433
--- /dev/null
@@ -0,0 +1,94 @@
+.TH "MEMCACHED_SASL" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_sasl \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+SASL support
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+void memcached_set_sasl_callbacks(memcached_st *ptr,
+                                  const sasl_callback_t *callbacks)
+
+const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st *ptr)
+
+memcached_return memcached_set_sasl_auth_data(memcached_st *ptr,
+                                              const char *username,
+                                              const char *password)
+memcached_return memcached_destroy_sasl_auth_data(memcached_st *ptr)
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) allows you to plug in your own callbacks function used by
+libsasl to perform SASL authentication.
+.sp
+Please note that SASL requires the memcached binary protocol, and you have
+to specify the callbacks before you connect to the server.
+.sp
+memcached_set_sasl_auth_data() is a helper function for you defining
+the basic functionality for you, but it will store the username and password
+in memory. If you choose to use this method you have to call
+memcached_destroy_sasl_auth_data before calling memcached_free to avoid
+a memory leak. You should NOT call memcached_destroy_sasl_auth_data if you
+specify your own callback function with memcached_set_sasl_callbacks().
+.sp
+You as a client user have to initialize libsasl by using sasl_client_init
+before enabling it in libmemcached, and you have to shut down libsasl by
+calling sasl_done() when you are done using SASL from libmemcached.
+.SH RETURN
+.sp
+memcached_get_sasl_callbacks() returns the callbacks currently used
+by this memcached handle.
+memcached_get_sasl_set_auth_data() returns MEMCACHED_SUCCESS upon success.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_sasl_set_auth_data.3 b/docs/man/memcached_sasl_set_auth_data.3
new file mode 100644 (file)
index 0000000..2d04a84
--- /dev/null
@@ -0,0 +1,94 @@
+.TH "MEMCACHED_SASL_SET_AUTH_DATA" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_sasl_set_auth_data \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+SASL support
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+void memcached_set_sasl_callbacks(memcached_st *ptr,
+                                  const sasl_callback_t *callbacks)
+
+const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st *ptr)
+
+memcached_return memcached_set_sasl_auth_data(memcached_st *ptr,
+                                              const char *username,
+                                              const char *password)
+memcached_return memcached_destroy_sasl_auth_data(memcached_st *ptr)
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) allows you to plug in your own callbacks function used by
+libsasl to perform SASL authentication.
+.sp
+Please note that SASL requires the memcached binary protocol, and you have
+to specify the callbacks before you connect to the server.
+.sp
+memcached_set_sasl_auth_data() is a helper function for you defining
+the basic functionality for you, but it will store the username and password
+in memory. If you choose to use this method you have to call
+memcached_destroy_sasl_auth_data before calling memcached_free to avoid
+a memory leak. You should NOT call memcached_destroy_sasl_auth_data if you
+specify your own callback function with memcached_set_sasl_callbacks().
+.sp
+You as a client user have to initialize libsasl by using sasl_client_init
+before enabling it in libmemcached, and you have to shut down libsasl by
+calling sasl_done() when you are done using SASL from libmemcached.
+.SH RETURN
+.sp
+memcached_get_sasl_callbacks() returns the callbacks currently used
+by this memcached handle.
+memcached_get_sasl_set_auth_data() returns MEMCACHED_SUCCESS upon success.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_server_add.3 b/docs/man/memcached_server_add.3
new file mode 100644 (file)
index 0000000..83fec35
--- /dev/null
@@ -0,0 +1,147 @@
+.TH "MEMCACHED_SERVER_ADD" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_server_add \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manage server list
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+uint32_t memcached_server_count (memcached_st *ptr);
+
+memcached_return_t
+  memcached_server_add (memcached_st *ptr,
+                        const char *hostname,
+                        in_port_t port);
+
+memcached_return_t
+  memcached_server_add_udp (memcached_st *ptr,
+                           const char *hostname,
+                           in_port_t port);
+
+memcached_return_t
+  memcached_server_add_unix_socket (memcached_st *ptr,
+                                    const char *socket);
+
+memcached_return_t
+  memcached_server_push (memcached_st *ptr,
+                         const memcached_server_st *list);
+
+memcached_server_instance_st
+  memcached_server_by_key (const memcached_st *ptr,
+                           const char *key,
+                          size_t key_length,
+                           memcached_return_t *error);
+
+memcached_server_instance_st
+  memcached_server_get_last_disconnect (const memcached_st *ptr)
+
+memcached_return_t
+  memcached_server_cursor(const memcached_st *ptr,
+                         const memcached_server_fn *callback,
+                         void *context,
+                         uint32_t number_of_callbacks);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) performs operations on a list of hosts. The order of these
+hosts determine routing to keys. Functions are provided to add keys to
+memcached_st structures. To manipulate lists of servers see
+memcached_server_st(3).
+.sp
+memcached_server_count() provides you a count of the current number of
+servers being used by a \fBmemcached_st\fP structure.
+.sp
+memcached_server_add() pushes a single TCP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
+allowed, so duplication is not checked. Executing this function with the
+\fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set will result in a
+\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
+.sp
+memcached_server_add_udp() pushes a single UDP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
+allowed, so duplication is not checked. Executing this function with out
+setting the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior will result in a
+\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
+.sp
+memcached_server_add_unix_socket() pushes a single UNIX socket into the
+\fBmemcached_st\fP structure. This UNIX socket will be placed at the end.
+Duplicate servers are allowed, so duplication is not checked. The length
+of the filename must be one character less then MEMCACHED_MAX_HOST_LENGTH.
+.sp
+memcached_server_push() pushes an array of \fBmemcached_server_st\fP into
+the \fBmemcached_st\fP structure. These servers will be placed at the
+end. Duplicate servers are allowed, so duplication is not checked. A
+copy is made of structure so the list provided (and any operations on
+the list) are not saved.
+.sp
+memcached_server_by_key() allows you to provide a key and retrieve the
+server which would be used for assignment. This structure is cloned
+from its original structure and must be freed. If NULL is returned you
+should consult *error. The returning structure should be freed with
+memcached_server_free().
+.sp
+memcached_server_get_last_disconnect() returns a pointer to the last server
+for which there was a connection problem. It does not mean this particular
+server is currently dead but if the library is reporting a server is,
+the returned server is a very good candidate.
+.sp
+memcached_server_cursor() takes a memcached_st and loops through the
+list of hosts currently in the cursor calling the list of callback
+functions provided. You can optionally pass in a value via
+context which will be provided to each callback function. An error
+return from any callback will terminate the loop. memcached_server_cursor()
+is passed the original caller memcached_st in its current state.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_server_add_unix_socket.3 b/docs/man/memcached_server_add_unix_socket.3
new file mode 100644 (file)
index 0000000..143e24c
--- /dev/null
@@ -0,0 +1,147 @@
+.TH "MEMCACHED_SERVER_ADD_UNIX_SOCKET" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_server_add_unix_socket \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manage server list
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+uint32_t memcached_server_count (memcached_st *ptr);
+
+memcached_return_t
+  memcached_server_add (memcached_st *ptr,
+                        const char *hostname,
+                        in_port_t port);
+
+memcached_return_t
+  memcached_server_add_udp (memcached_st *ptr,
+                           const char *hostname,
+                           in_port_t port);
+
+memcached_return_t
+  memcached_server_add_unix_socket (memcached_st *ptr,
+                                    const char *socket);
+
+memcached_return_t
+  memcached_server_push (memcached_st *ptr,
+                         const memcached_server_st *list);
+
+memcached_server_instance_st
+  memcached_server_by_key (const memcached_st *ptr,
+                           const char *key,
+                          size_t key_length,
+                           memcached_return_t *error);
+
+memcached_server_instance_st
+  memcached_server_get_last_disconnect (const memcached_st *ptr)
+
+memcached_return_t
+  memcached_server_cursor(const memcached_st *ptr,
+                         const memcached_server_fn *callback,
+                         void *context,
+                         uint32_t number_of_callbacks);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) performs operations on a list of hosts. The order of these
+hosts determine routing to keys. Functions are provided to add keys to
+memcached_st structures. To manipulate lists of servers see
+memcached_server_st(3).
+.sp
+memcached_server_count() provides you a count of the current number of
+servers being used by a \fBmemcached_st\fP structure.
+.sp
+memcached_server_add() pushes a single TCP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
+allowed, so duplication is not checked. Executing this function with the
+\fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set will result in a
+\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
+.sp
+memcached_server_add_udp() pushes a single UDP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
+allowed, so duplication is not checked. Executing this function with out
+setting the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior will result in a
+\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
+.sp
+memcached_server_add_unix_socket() pushes a single UNIX socket into the
+\fBmemcached_st\fP structure. This UNIX socket will be placed at the end.
+Duplicate servers are allowed, so duplication is not checked. The length
+of the filename must be one character less then MEMCACHED_MAX_HOST_LENGTH.
+.sp
+memcached_server_push() pushes an array of \fBmemcached_server_st\fP into
+the \fBmemcached_st\fP structure. These servers will be placed at the
+end. Duplicate servers are allowed, so duplication is not checked. A
+copy is made of structure so the list provided (and any operations on
+the list) are not saved.
+.sp
+memcached_server_by_key() allows you to provide a key and retrieve the
+server which would be used for assignment. This structure is cloned
+from its original structure and must be freed. If NULL is returned you
+should consult *error. The returning structure should be freed with
+memcached_server_free().
+.sp
+memcached_server_get_last_disconnect() returns a pointer to the last server
+for which there was a connection problem. It does not mean this particular
+server is currently dead but if the library is reporting a server is,
+the returned server is a very good candidate.
+.sp
+memcached_server_cursor() takes a memcached_st and loops through the
+list of hosts currently in the cursor calling the list of callback
+functions provided. You can optionally pass in a value via
+context which will be provided to each callback function. An error
+return from any callback will terminate the loop. memcached_server_cursor()
+is passed the original caller memcached_st in its current state.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_server_count.3 b/docs/man/memcached_server_count.3
new file mode 100644 (file)
index 0000000..e4c42c8
--- /dev/null
@@ -0,0 +1,147 @@
+.TH "MEMCACHED_SERVER_COUNT" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_server_count \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manage server list
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+uint32_t memcached_server_count (memcached_st *ptr);
+
+memcached_return_t
+  memcached_server_add (memcached_st *ptr,
+                        const char *hostname,
+                        in_port_t port);
+
+memcached_return_t
+  memcached_server_add_udp (memcached_st *ptr,
+                           const char *hostname,
+                           in_port_t port);
+
+memcached_return_t
+  memcached_server_add_unix_socket (memcached_st *ptr,
+                                    const char *socket);
+
+memcached_return_t
+  memcached_server_push (memcached_st *ptr,
+                         const memcached_server_st *list);
+
+memcached_server_instance_st
+  memcached_server_by_key (const memcached_st *ptr,
+                           const char *key,
+                          size_t key_length,
+                           memcached_return_t *error);
+
+memcached_server_instance_st
+  memcached_server_get_last_disconnect (const memcached_st *ptr)
+
+memcached_return_t
+  memcached_server_cursor(const memcached_st *ptr,
+                         const memcached_server_fn *callback,
+                         void *context,
+                         uint32_t number_of_callbacks);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) performs operations on a list of hosts. The order of these
+hosts determine routing to keys. Functions are provided to add keys to
+memcached_st structures. To manipulate lists of servers see
+memcached_server_st(3).
+.sp
+memcached_server_count() provides you a count of the current number of
+servers being used by a \fBmemcached_st\fP structure.
+.sp
+memcached_server_add() pushes a single TCP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
+allowed, so duplication is not checked. Executing this function with the
+\fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set will result in a
+\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
+.sp
+memcached_server_add_udp() pushes a single UDP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
+allowed, so duplication is not checked. Executing this function with out
+setting the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior will result in a
+\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
+.sp
+memcached_server_add_unix_socket() pushes a single UNIX socket into the
+\fBmemcached_st\fP structure. This UNIX socket will be placed at the end.
+Duplicate servers are allowed, so duplication is not checked. The length
+of the filename must be one character less then MEMCACHED_MAX_HOST_LENGTH.
+.sp
+memcached_server_push() pushes an array of \fBmemcached_server_st\fP into
+the \fBmemcached_st\fP structure. These servers will be placed at the
+end. Duplicate servers are allowed, so duplication is not checked. A
+copy is made of structure so the list provided (and any operations on
+the list) are not saved.
+.sp
+memcached_server_by_key() allows you to provide a key and retrieve the
+server which would be used for assignment. This structure is cloned
+from its original structure and must be freed. If NULL is returned you
+should consult *error. The returning structure should be freed with
+memcached_server_free().
+.sp
+memcached_server_get_last_disconnect() returns a pointer to the last server
+for which there was a connection problem. It does not mean this particular
+server is currently dead but if the library is reporting a server is,
+the returned server is a very good candidate.
+.sp
+memcached_server_cursor() takes a memcached_st and loops through the
+list of hosts currently in the cursor calling the list of callback
+functions provided. You can optionally pass in a value via
+context which will be provided to each callback function. An error
+return from any callback will terminate the loop. memcached_server_cursor()
+is passed the original caller memcached_st in its current state.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_server_cursor.3 b/docs/man/memcached_server_cursor.3
new file mode 100644 (file)
index 0000000..d775a84
--- /dev/null
@@ -0,0 +1,147 @@
+.TH "MEMCACHED_SERVER_CURSOR" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_server_cursor \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manage server list
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+uint32_t memcached_server_count (memcached_st *ptr);
+
+memcached_return_t
+  memcached_server_add (memcached_st *ptr,
+                        const char *hostname,
+                        in_port_t port);
+
+memcached_return_t
+  memcached_server_add_udp (memcached_st *ptr,
+                           const char *hostname,
+                           in_port_t port);
+
+memcached_return_t
+  memcached_server_add_unix_socket (memcached_st *ptr,
+                                    const char *socket);
+
+memcached_return_t
+  memcached_server_push (memcached_st *ptr,
+                         const memcached_server_st *list);
+
+memcached_server_instance_st
+  memcached_server_by_key (const memcached_st *ptr,
+                           const char *key,
+                          size_t key_length,
+                           memcached_return_t *error);
+
+memcached_server_instance_st
+  memcached_server_get_last_disconnect (const memcached_st *ptr)
+
+memcached_return_t
+  memcached_server_cursor(const memcached_st *ptr,
+                         const memcached_server_fn *callback,
+                         void *context,
+                         uint32_t number_of_callbacks);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) performs operations on a list of hosts. The order of these
+hosts determine routing to keys. Functions are provided to add keys to
+memcached_st structures. To manipulate lists of servers see
+memcached_server_st(3).
+.sp
+memcached_server_count() provides you a count of the current number of
+servers being used by a \fBmemcached_st\fP structure.
+.sp
+memcached_server_add() pushes a single TCP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
+allowed, so duplication is not checked. Executing this function with the
+\fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set will result in a
+\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
+.sp
+memcached_server_add_udp() pushes a single UDP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
+allowed, so duplication is not checked. Executing this function with out
+setting the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior will result in a
+\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
+.sp
+memcached_server_add_unix_socket() pushes a single UNIX socket into the
+\fBmemcached_st\fP structure. This UNIX socket will be placed at the end.
+Duplicate servers are allowed, so duplication is not checked. The length
+of the filename must be one character less then MEMCACHED_MAX_HOST_LENGTH.
+.sp
+memcached_server_push() pushes an array of \fBmemcached_server_st\fP into
+the \fBmemcached_st\fP structure. These servers will be placed at the
+end. Duplicate servers are allowed, so duplication is not checked. A
+copy is made of structure so the list provided (and any operations on
+the list) are not saved.
+.sp
+memcached_server_by_key() allows you to provide a key and retrieve the
+server which would be used for assignment. This structure is cloned
+from its original structure and must be freed. If NULL is returned you
+should consult *error. The returning structure should be freed with
+memcached_server_free().
+.sp
+memcached_server_get_last_disconnect() returns a pointer to the last server
+for which there was a connection problem. It does not mean this particular
+server is currently dead but if the library is reporting a server is,
+the returned server is a very good candidate.
+.sp
+memcached_server_cursor() takes a memcached_st and loops through the
+list of hosts currently in the cursor calling the list of callback
+functions provided. You can optionally pass in a value via
+context which will be provided to each callback function. An error
+return from any callback will terminate the loop. memcached_server_cursor()
+is passed the original caller memcached_st in its current state.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_server_list.3 b/docs/man/memcached_server_list.3
new file mode 100644 (file)
index 0000000..539c5e0
--- /dev/null
@@ -0,0 +1,147 @@
+.TH "MEMCACHED_SERVER_LIST" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_server_list \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manage server list
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+uint32_t memcached_server_count (memcached_st *ptr);
+
+memcached_return_t
+  memcached_server_add (memcached_st *ptr,
+                        const char *hostname,
+                        in_port_t port);
+
+memcached_return_t
+  memcached_server_add_udp (memcached_st *ptr,
+                           const char *hostname,
+                           in_port_t port);
+
+memcached_return_t
+  memcached_server_add_unix_socket (memcached_st *ptr,
+                                    const char *socket);
+
+memcached_return_t
+  memcached_server_push (memcached_st *ptr,
+                         const memcached_server_st *list);
+
+memcached_server_instance_st
+  memcached_server_by_key (const memcached_st *ptr,
+                           const char *key,
+                          size_t key_length,
+                           memcached_return_t *error);
+
+memcached_server_instance_st
+  memcached_server_get_last_disconnect (const memcached_st *ptr)
+
+memcached_return_t
+  memcached_server_cursor(const memcached_st *ptr,
+                         const memcached_server_fn *callback,
+                         void *context,
+                         uint32_t number_of_callbacks);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) performs operations on a list of hosts. The order of these
+hosts determine routing to keys. Functions are provided to add keys to
+memcached_st structures. To manipulate lists of servers see
+memcached_server_st(3).
+.sp
+memcached_server_count() provides you a count of the current number of
+servers being used by a \fBmemcached_st\fP structure.
+.sp
+memcached_server_add() pushes a single TCP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
+allowed, so duplication is not checked. Executing this function with the
+\fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set will result in a
+\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
+.sp
+memcached_server_add_udp() pushes a single UDP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
+allowed, so duplication is not checked. Executing this function with out
+setting the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior will result in a
+\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
+.sp
+memcached_server_add_unix_socket() pushes a single UNIX socket into the
+\fBmemcached_st\fP structure. This UNIX socket will be placed at the end.
+Duplicate servers are allowed, so duplication is not checked. The length
+of the filename must be one character less then MEMCACHED_MAX_HOST_LENGTH.
+.sp
+memcached_server_push() pushes an array of \fBmemcached_server_st\fP into
+the \fBmemcached_st\fP structure. These servers will be placed at the
+end. Duplicate servers are allowed, so duplication is not checked. A
+copy is made of structure so the list provided (and any operations on
+the list) are not saved.
+.sp
+memcached_server_by_key() allows you to provide a key and retrieve the
+server which would be used for assignment. This structure is cloned
+from its original structure and must be freed. If NULL is returned you
+should consult *error. The returning structure should be freed with
+memcached_server_free().
+.sp
+memcached_server_get_last_disconnect() returns a pointer to the last server
+for which there was a connection problem. It does not mean this particular
+server is currently dead but if the library is reporting a server is,
+the returned server is a very good candidate.
+.sp
+memcached_server_cursor() takes a memcached_st and loops through the
+list of hosts currently in the cursor calling the list of callback
+functions provided. You can optionally pass in a value via
+context which will be provided to each callback function. An error
+return from any callback will terminate the loop. memcached_server_cursor()
+is passed the original caller memcached_st in its current state.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_server_list_append.3 b/docs/man/memcached_server_list_append.3
new file mode 100644 (file)
index 0000000..31c7bf9
--- /dev/null
@@ -0,0 +1,114 @@
+.TH "MEMCACHED_SERVER_LIST_APPEND" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_server_list_append \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manage server list
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+const memcached_server_instance_st
+  memcached_server_list (memcached_st *ptr);
+
+void memcached_server_list_free (memcached_server_list_st list);
+
+memcached_server_list_st
+  memcached_server_list_append (memcached_server_list_st list,
+                                const char *hostname,
+                                unsigned int port,
+                                memcached_return_t *error);
+
+uint32_t memcached_server_list_count (memcached_server_list_st list);
+
+memcached_server_list_st memcached_servers_parse (const char *server_strings);
+
+const char *memcached_server_error (memcached_server_instance_st instance);
+
+DEPRECATED
+void memcached_server_error_reset (memcached_server_instance_st list);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) operates on a list of hosts which are stored in
+memcached_server_st structures. You should not modify these structures
+directly. Functions are provided to modify these structures (and more can be
+added, just ask!).
+.sp
+memcached_server_list() is used to provide an array of all defined hosts.
+This was incorrectly documented as "requiring free()" up till version 0.39.
+.sp
+memcached_server_list_free() deallocates all memory associated with the array
+of memcached_server_st that you passed to it.
+.sp
+memcached_server_list_append() adds a server to the end of a
+memcached_server_st array. On error null will be returned and the
+memcached_return_t pointer you passed into the function will be set with the
+appropriate error. If the value of port is zero, it is set to the default
+port of a memcached server.
+.sp
+memcached_servers_parse() takes a string, the type that is used for the
+command line applications, and parse it to an array of memcached_server_st.
+The example is "localhost, foo:555, foo, bar". All hosts except foo:555 will
+be set to the default port, while that host will have a port of 555.
+.sp
+memcached_server_error() can be used to look at the text of the last error
+message sent by the server to to the client.
+.sp
+Before version 0.39 theses functions used a memcache_server_st *. In 0.39
+memcached_server_st * was aliased to memcached_server_list_st. This was
+done for a style reason/to help clean up some concepts in the code.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_server_list_count.3 b/docs/man/memcached_server_list_count.3
new file mode 100644 (file)
index 0000000..c940517
--- /dev/null
@@ -0,0 +1,114 @@
+.TH "MEMCACHED_SERVER_LIST_COUNT" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_server_list_count \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manage server list
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+const memcached_server_instance_st
+  memcached_server_list (memcached_st *ptr);
+
+void memcached_server_list_free (memcached_server_list_st list);
+
+memcached_server_list_st
+  memcached_server_list_append (memcached_server_list_st list,
+                                const char *hostname,
+                                unsigned int port,
+                                memcached_return_t *error);
+
+uint32_t memcached_server_list_count (memcached_server_list_st list);
+
+memcached_server_list_st memcached_servers_parse (const char *server_strings);
+
+const char *memcached_server_error (memcached_server_instance_st instance);
+
+DEPRECATED
+void memcached_server_error_reset (memcached_server_instance_st list);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) operates on a list of hosts which are stored in
+memcached_server_st structures. You should not modify these structures
+directly. Functions are provided to modify these structures (and more can be
+added, just ask!).
+.sp
+memcached_server_list() is used to provide an array of all defined hosts.
+This was incorrectly documented as "requiring free()" up till version 0.39.
+.sp
+memcached_server_list_free() deallocates all memory associated with the array
+of memcached_server_st that you passed to it.
+.sp
+memcached_server_list_append() adds a server to the end of a
+memcached_server_st array. On error null will be returned and the
+memcached_return_t pointer you passed into the function will be set with the
+appropriate error. If the value of port is zero, it is set to the default
+port of a memcached server.
+.sp
+memcached_servers_parse() takes a string, the type that is used for the
+command line applications, and parse it to an array of memcached_server_st.
+The example is "localhost, foo:555, foo, bar". All hosts except foo:555 will
+be set to the default port, while that host will have a port of 555.
+.sp
+memcached_server_error() can be used to look at the text of the last error
+message sent by the server to to the client.
+.sp
+Before version 0.39 theses functions used a memcache_server_st *. In 0.39
+memcached_server_st * was aliased to memcached_server_list_st. This was
+done for a style reason/to help clean up some concepts in the code.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_server_list_free.3 b/docs/man/memcached_server_list_free.3
new file mode 100644 (file)
index 0000000..0b95a4d
--- /dev/null
@@ -0,0 +1,114 @@
+.TH "MEMCACHED_SERVER_LIST_FREE" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_server_list_free \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manage server list
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+const memcached_server_instance_st
+  memcached_server_list (memcached_st *ptr);
+
+void memcached_server_list_free (memcached_server_list_st list);
+
+memcached_server_list_st
+  memcached_server_list_append (memcached_server_list_st list,
+                                const char *hostname,
+                                unsigned int port,
+                                memcached_return_t *error);
+
+uint32_t memcached_server_list_count (memcached_server_list_st list);
+
+memcached_server_list_st memcached_servers_parse (const char *server_strings);
+
+const char *memcached_server_error (memcached_server_instance_st instance);
+
+DEPRECATED
+void memcached_server_error_reset (memcached_server_instance_st list);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) operates on a list of hosts which are stored in
+memcached_server_st structures. You should not modify these structures
+directly. Functions are provided to modify these structures (and more can be
+added, just ask!).
+.sp
+memcached_server_list() is used to provide an array of all defined hosts.
+This was incorrectly documented as "requiring free()" up till version 0.39.
+.sp
+memcached_server_list_free() deallocates all memory associated with the array
+of memcached_server_st that you passed to it.
+.sp
+memcached_server_list_append() adds a server to the end of a
+memcached_server_st array. On error null will be returned and the
+memcached_return_t pointer you passed into the function will be set with the
+appropriate error. If the value of port is zero, it is set to the default
+port of a memcached server.
+.sp
+memcached_servers_parse() takes a string, the type that is used for the
+command line applications, and parse it to an array of memcached_server_st.
+The example is "localhost, foo:555, foo, bar". All hosts except foo:555 will
+be set to the default port, while that host will have a port of 555.
+.sp
+memcached_server_error() can be used to look at the text of the last error
+message sent by the server to to the client.
+.sp
+Before version 0.39 theses functions used a memcache_server_st *. In 0.39
+memcached_server_st * was aliased to memcached_server_list_st. This was
+done for a style reason/to help clean up some concepts in the code.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_server_push.3 b/docs/man/memcached_server_push.3
new file mode 100644 (file)
index 0000000..a04f80d
--- /dev/null
@@ -0,0 +1,147 @@
+.TH "MEMCACHED_SERVER_PUSH" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_server_push \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manage server list
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+uint32_t memcached_server_count (memcached_st *ptr);
+
+memcached_return_t
+  memcached_server_add (memcached_st *ptr,
+                        const char *hostname,
+                        in_port_t port);
+
+memcached_return_t
+  memcached_server_add_udp (memcached_st *ptr,
+                           const char *hostname,
+                           in_port_t port);
+
+memcached_return_t
+  memcached_server_add_unix_socket (memcached_st *ptr,
+                                    const char *socket);
+
+memcached_return_t
+  memcached_server_push (memcached_st *ptr,
+                         const memcached_server_st *list);
+
+memcached_server_instance_st
+  memcached_server_by_key (const memcached_st *ptr,
+                           const char *key,
+                          size_t key_length,
+                           memcached_return_t *error);
+
+memcached_server_instance_st
+  memcached_server_get_last_disconnect (const memcached_st *ptr)
+
+memcached_return_t
+  memcached_server_cursor(const memcached_st *ptr,
+                         const memcached_server_fn *callback,
+                         void *context,
+                         uint32_t number_of_callbacks);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) performs operations on a list of hosts. The order of these
+hosts determine routing to keys. Functions are provided to add keys to
+memcached_st structures. To manipulate lists of servers see
+memcached_server_st(3).
+.sp
+memcached_server_count() provides you a count of the current number of
+servers being used by a \fBmemcached_st\fP structure.
+.sp
+memcached_server_add() pushes a single TCP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
+allowed, so duplication is not checked. Executing this function with the
+\fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set will result in a
+\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
+.sp
+memcached_server_add_udp() pushes a single UDP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
+allowed, so duplication is not checked. Executing this function with out
+setting the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior will result in a
+\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
+.sp
+memcached_server_add_unix_socket() pushes a single UNIX socket into the
+\fBmemcached_st\fP structure. This UNIX socket will be placed at the end.
+Duplicate servers are allowed, so duplication is not checked. The length
+of the filename must be one character less then MEMCACHED_MAX_HOST_LENGTH.
+.sp
+memcached_server_push() pushes an array of \fBmemcached_server_st\fP into
+the \fBmemcached_st\fP structure. These servers will be placed at the
+end. Duplicate servers are allowed, so duplication is not checked. A
+copy is made of structure so the list provided (and any operations on
+the list) are not saved.
+.sp
+memcached_server_by_key() allows you to provide a key and retrieve the
+server which would be used for assignment. This structure is cloned
+from its original structure and must be freed. If NULL is returned you
+should consult *error. The returning structure should be freed with
+memcached_server_free().
+.sp
+memcached_server_get_last_disconnect() returns a pointer to the last server
+for which there was a connection problem. It does not mean this particular
+server is currently dead but if the library is reporting a server is,
+the returned server is a very good candidate.
+.sp
+memcached_server_cursor() takes a memcached_st and loops through the
+list of hosts currently in the cursor calling the list of callback
+functions provided. You can optionally pass in a value via
+context which will be provided to each callback function. An error
+return from any callback will terminate the loop. memcached_server_cursor()
+is passed the original caller memcached_st in its current state.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_server_st.3 b/docs/man/memcached_server_st.3
new file mode 100644 (file)
index 0000000..32a939f
--- /dev/null
@@ -0,0 +1,147 @@
+.TH "MEMCACHED_SERVER_ST" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_server_st \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manage server list
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+uint32_t memcached_server_count (memcached_st *ptr);
+
+memcached_return_t
+  memcached_server_add (memcached_st *ptr,
+                        const char *hostname,
+                        in_port_t port);
+
+memcached_return_t
+  memcached_server_add_udp (memcached_st *ptr,
+                           const char *hostname,
+                           in_port_t port);
+
+memcached_return_t
+  memcached_server_add_unix_socket (memcached_st *ptr,
+                                    const char *socket);
+
+memcached_return_t
+  memcached_server_push (memcached_st *ptr,
+                         const memcached_server_st *list);
+
+memcached_server_instance_st
+  memcached_server_by_key (const memcached_st *ptr,
+                           const char *key,
+                          size_t key_length,
+                           memcached_return_t *error);
+
+memcached_server_instance_st
+  memcached_server_get_last_disconnect (const memcached_st *ptr)
+
+memcached_return_t
+  memcached_server_cursor(const memcached_st *ptr,
+                         const memcached_server_fn *callback,
+                         void *context,
+                         uint32_t number_of_callbacks);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) performs operations on a list of hosts. The order of these
+hosts determine routing to keys. Functions are provided to add keys to
+memcached_st structures. To manipulate lists of servers see
+memcached_server_st(3).
+.sp
+memcached_server_count() provides you a count of the current number of
+servers being used by a \fBmemcached_st\fP structure.
+.sp
+memcached_server_add() pushes a single TCP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
+allowed, so duplication is not checked. Executing this function with the
+\fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set will result in a
+\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
+.sp
+memcached_server_add_udp() pushes a single UDP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
+allowed, so duplication is not checked. Executing this function with out
+setting the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior will result in a
+\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
+.sp
+memcached_server_add_unix_socket() pushes a single UNIX socket into the
+\fBmemcached_st\fP structure. This UNIX socket will be placed at the end.
+Duplicate servers are allowed, so duplication is not checked. The length
+of the filename must be one character less then MEMCACHED_MAX_HOST_LENGTH.
+.sp
+memcached_server_push() pushes an array of \fBmemcached_server_st\fP into
+the \fBmemcached_st\fP structure. These servers will be placed at the
+end. Duplicate servers are allowed, so duplication is not checked. A
+copy is made of structure so the list provided (and any operations on
+the list) are not saved.
+.sp
+memcached_server_by_key() allows you to provide a key and retrieve the
+server which would be used for assignment. This structure is cloned
+from its original structure and must be freed. If NULL is returned you
+should consult *error. The returning structure should be freed with
+memcached_server_free().
+.sp
+memcached_server_get_last_disconnect() returns a pointer to the last server
+for which there was a connection problem. It does not mean this particular
+server is currently dead but if the library is reporting a server is,
+the returned server is a very good candidate.
+.sp
+memcached_server_cursor() takes a memcached_st and loops through the
+list of hosts currently in the cursor calling the list of callback
+functions provided. You can optionally pass in a value via
+context which will be provided to each callback function. An error
+return from any callback will terminate the loop. memcached_server_cursor()
+is passed the original caller memcached_st in its current state.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_servers.3 b/docs/man/memcached_servers.3
new file mode 100644 (file)
index 0000000..7d9ffaa
--- /dev/null
@@ -0,0 +1,147 @@
+.TH "MEMCACHED_SERVERS" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_servers \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manage server list
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+uint32_t memcached_server_count (memcached_st *ptr);
+
+memcached_return_t
+  memcached_server_add (memcached_st *ptr,
+                        const char *hostname,
+                        in_port_t port);
+
+memcached_return_t
+  memcached_server_add_udp (memcached_st *ptr,
+                           const char *hostname,
+                           in_port_t port);
+
+memcached_return_t
+  memcached_server_add_unix_socket (memcached_st *ptr,
+                                    const char *socket);
+
+memcached_return_t
+  memcached_server_push (memcached_st *ptr,
+                         const memcached_server_st *list);
+
+memcached_server_instance_st
+  memcached_server_by_key (const memcached_st *ptr,
+                           const char *key,
+                          size_t key_length,
+                           memcached_return_t *error);
+
+memcached_server_instance_st
+  memcached_server_get_last_disconnect (const memcached_st *ptr)
+
+memcached_return_t
+  memcached_server_cursor(const memcached_st *ptr,
+                         const memcached_server_fn *callback,
+                         void *context,
+                         uint32_t number_of_callbacks);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) performs operations on a list of hosts. The order of these
+hosts determine routing to keys. Functions are provided to add keys to
+memcached_st structures. To manipulate lists of servers see
+memcached_server_st(3).
+.sp
+memcached_server_count() provides you a count of the current number of
+servers being used by a \fBmemcached_st\fP structure.
+.sp
+memcached_server_add() pushes a single TCP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
+allowed, so duplication is not checked. Executing this function with the
+\fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set will result in a
+\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
+.sp
+memcached_server_add_udp() pushes a single UDP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
+allowed, so duplication is not checked. Executing this function with out
+setting the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior will result in a
+\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
+.sp
+memcached_server_add_unix_socket() pushes a single UNIX socket into the
+\fBmemcached_st\fP structure. This UNIX socket will be placed at the end.
+Duplicate servers are allowed, so duplication is not checked. The length
+of the filename must be one character less then MEMCACHED_MAX_HOST_LENGTH.
+.sp
+memcached_server_push() pushes an array of \fBmemcached_server_st\fP into
+the \fBmemcached_st\fP structure. These servers will be placed at the
+end. Duplicate servers are allowed, so duplication is not checked. A
+copy is made of structure so the list provided (and any operations on
+the list) are not saved.
+.sp
+memcached_server_by_key() allows you to provide a key and retrieve the
+server which would be used for assignment. This structure is cloned
+from its original structure and must be freed. If NULL is returned you
+should consult *error. The returning structure should be freed with
+memcached_server_free().
+.sp
+memcached_server_get_last_disconnect() returns a pointer to the last server
+for which there was a connection problem. It does not mean this particular
+server is currently dead but if the library is reporting a server is,
+the returned server is a very good candidate.
+.sp
+memcached_server_cursor() takes a memcached_st and loops through the
+list of hosts currently in the cursor calling the list of callback
+functions provided. You can optionally pass in a value via
+context which will be provided to each callback function. An error
+return from any callback will terminate the loop. memcached_server_cursor()
+is passed the original caller memcached_st in its current state.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_servers_parse.3 b/docs/man/memcached_servers_parse.3
new file mode 100644 (file)
index 0000000..e5133e8
--- /dev/null
@@ -0,0 +1,114 @@
+.TH "MEMCACHED_SERVERS_PARSE" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_servers_parse \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manage server list
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+const memcached_server_instance_st
+  memcached_server_list (memcached_st *ptr);
+
+void memcached_server_list_free (memcached_server_list_st list);
+
+memcached_server_list_st
+  memcached_server_list_append (memcached_server_list_st list,
+                                const char *hostname,
+                                unsigned int port,
+                                memcached_return_t *error);
+
+uint32_t memcached_server_list_count (memcached_server_list_st list);
+
+memcached_server_list_st memcached_servers_parse (const char *server_strings);
+
+const char *memcached_server_error (memcached_server_instance_st instance);
+
+DEPRECATED
+void memcached_server_error_reset (memcached_server_instance_st list);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) operates on a list of hosts which are stored in
+memcached_server_st structures. You should not modify these structures
+directly. Functions are provided to modify these structures (and more can be
+added, just ask!).
+.sp
+memcached_server_list() is used to provide an array of all defined hosts.
+This was incorrectly documented as "requiring free()" up till version 0.39.
+.sp
+memcached_server_list_free() deallocates all memory associated with the array
+of memcached_server_st that you passed to it.
+.sp
+memcached_server_list_append() adds a server to the end of a
+memcached_server_st array. On error null will be returned and the
+memcached_return_t pointer you passed into the function will be set with the
+appropriate error. If the value of port is zero, it is set to the default
+port of a memcached server.
+.sp
+memcached_servers_parse() takes a string, the type that is used for the
+command line applications, and parse it to an array of memcached_server_st.
+The example is "localhost, foo:555, foo, bar". All hosts except foo:555 will
+be set to the default port, while that host will have a port of 555.
+.sp
+memcached_server_error() can be used to look at the text of the last error
+message sent by the server to to the client.
+.sp
+Before version 0.39 theses functions used a memcache_server_st *. In 0.39
+memcached_server_st * was aliased to memcached_server_list_st. This was
+done for a style reason/to help clean up some concepts in the code.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_servers_reset.3 b/docs/man/memcached_servers_reset.3
new file mode 100644 (file)
index 0000000..d48147b
--- /dev/null
@@ -0,0 +1,99 @@
+.TH "MEMCACHED_SERVERS_RESET" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_servers_reset \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Create a memcached_st structure
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_st *memcached_create (memcached_st *ptr);
+
+void memcached_free (memcached_st *ptr);
+
+memcached_st *memcached_clone (memcached_st *destination, memcached_st *source);
+
+void memcached_servers_reset(memcached_st);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_create() is used to create a \fBmemcached_st\fP structure that will then
+be used by other libmemcached(3) functions to communicate with the server. You
+should either pass a statically declared \fBmemcached_st\fP to memcached_create() or
+a NULL. If a NULL passed in then a structure is allocated for you.
+.sp
+memcached_clone() is similar to memcached_create(3) but it copies the
+defaults and list of servers from the source \fBmemcached_st\fP. If you pass a null as
+the argument for the source to clone, it is the same as a call to memcached_create().
+If the destination argument is NULL a \fBmemcached_st\fP will be allocated for you.
+.sp
+memcached_servers_reset() allows you to zero out the list of servers that
+the memcached_st has.
+.sp
+To clean up memory associated with a \fBmemcached_st\fP structure you should pass
+it to memcached_free() when you are finished using it. memcached_free() is
+the only way to make sure all memory is deallocated when you finish using
+the structure.
+.sp
+You may wish to avoid using memcached_create(3) or memcached_clone(3) with a
+stack based allocation. The most common issues related to ABI safety involve
+heap allocated structures.
+.SH RETURN
+.sp
+memcached_create() returns a pointer to the memcached_st that was created
+(or initialized). On an allocation failure, it returns NULL.
+.sp
+memcached_clone() returns a pointer to the memcached_st that was created
+(or initialized). On an allocation failure, it returns NULL.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_set.3 b/docs/man/memcached_set.3
new file mode 100644 (file)
index 0000000..68820b7
--- /dev/null
@@ -0,0 +1,216 @@
+.TH "MEMCACHED_SET" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_set \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Store value on server
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_set (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 const char *value, size_t value_length,
+                 time_t expiration,
+                 uint32_t flags);
+
+memcached_return_t
+  memcached_add (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 const char *value, size_t value_length,
+                 time_t expiration,
+                 uint32_t flags);
+
+memcached_return_t
+  memcached_replace (memcached_st *ptr,
+                     const char *key, size_t key_length,
+                     const char *value, size_t value_length,
+                     time_t expiration,
+                     uint32_t flags);
+
+memcached_return_t
+  memcached_prepend(memcached_st *ptr,
+                    const char *key, size_t key_length,
+                    const char *value, size_t value_length,
+                    time_t expiration,
+                    uint32_t flags)
+
+memcached_return_t
+  memcached_append(memcached_st *ptr,
+                   const char *key, size_t key_length,
+                    const char *value, size_t value_length,
+                    time_t expiration,
+                    uint32_t flags)
+memcached_return_t
+  memcached_cas(memcached_st *ptr,
+                const char *key, size_t key_length,
+                const char *value, size_t value_length,
+                time_t expiration,
+                uint32_t flags,
+                uint64_t cas);
+
+memcached_return_t
+  memcached_set_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags);
+
+memcached_return_t
+  memcached_add_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags);
+
+memcached_return_t
+  memcached_replace_by_key(memcached_st *ptr,
+                           const char *master_key, size_t master_key_length,
+                           const char *key, size_t key_length,
+                           const char *value, size_t value_length,
+                           time_t expiration,
+                           uint32_t flags);
+
+memcached_return_t
+  memcached_prepend_by_key(memcached_st *ptr,
+                           const char *master_key, size_t master_key_length,
+                           const char *key, size_t key_length,
+                           const char *value, size_t value_length,
+                           time_t expiration,
+                           uint32_t flags);
+
+memcached_return_t
+  memcached_append_by_key(memcached_st *ptr,
+                          const char *master_key, size_t master_key_length,
+                          const char *key, size_t key_length,
+                          const char *value, size_t value_length,
+                          time_t expiration,
+                          uint32_t flags);
+
+memcached_return_t
+  memcached_cas_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags,
+                       uint64_t cas);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_set(), memcached_add(), and memcached_replace() are all used to
+store information on the server. All methods take a key, and its length to
+store the object. Keys are currently limited to 250 characters by the
+memcached(1) server. You must also supply a value and a length. Optionally you
+may support an expiration time for the object and a 16 byte value (it is
+meant to be used as a bitmap).
+.sp
+memcached_set() will write an object to the server. If an object already
+exists it will overwrite what is in the server. If the object does not exist
+it will be written. If you are using the non\-blocking mode this function
+will always return true unless a network error occurs.
+.sp
+memcached_replace() replaces an object on the server. If the object is not
+found on the server an error occurs.
+.sp
+memcached_add() adds an object to the server. If the object is found on the
+server an error occurs, otherwise the value is stored.
+.sp
+memcached_prepend() places a segment of data before the last piece of data
+stored. Currently expiration and key are not used in the server.
+.sp
+memcached_append() places a segment of data at the end of the last piece of
+data stored. Currently expiration and key are not used in the server.
+.sp
+memcached_cas() overwrites data in the server as long as the "cas" value is
+still the same in the server. You can get the cas value of a result by
+calling memcached_result_cas() on a memcached_result_st(3) structure. At the point
+that this note was written cas is still buggy in memached. Turning on support
+for it in libmemcached(3) is optional. Please see memcached_set() for
+information on how to do this.
+.sp
+memcached_set_by_key(), memcached_add_by_key(), memcached_replace_by_key(),
+memcached_prepend_by_key(), memcached_append_by_key_by_key(),
+memcached_cas_by_key() methods all behave in a similar method as the non key
+methods. The difference is that they use their master_key parameter to map
+objects to particular servers.
+.sp
+If you are looking for performance, memcached_set() with non\-blocking IO is
+the fastest way to store data on the server.
+.sp
+All of the above functions are supported with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPbehavior enabled. But when using these operations with this behavior on, there
+are limits to the size of the payload being sent to the server.  The reason for
+these limits is that the Memcahed Server does not allow multi\-datagram requests
+and the current server implementation sets a datagram size to 1400 bytes. Due
+to protocol overhead, the actual limit of the user supplied data is less than
+1400 bytes and depends on the protocol in use as well as the operation being
+executed. When running with the binary protocol, \(ga\(ga MEMCACHED_BEHAVIOR_BINARY_PROTOCOL\(ga\(ga,
+the size of the key,value, flags and expiry combined may not exceed 1368 bytes.
+When running with the ASCII protocol, the exact limit fluctuates depending on
+which function is being executed and whether the function is a cas operation
+or not. For non\-cas ASCII set operations, there are at least 1335 bytes available
+to split among the key, key_prefix, and value; for cas ASCII operations there are
+at least 1318 bytes available to split among the key, key_prefix and value. If the
+total size of the command, including overhead, exceeds 1400 bytes, a \fBMEMCACHED_WRITE_FAILURE\fPwill be returned.
+.SH RETURN
+.sp
+All methods return a value of type \fBmemcached_return_t\fP.
+On success the value will be \fBMEMCACHED_SUCCESS\fP.
+Use memcached_strerror() to translate this value to a printable string.
+.sp
+For memcached_replace() and memcached_add(), \fBMEMCACHED_NOTSTORED\fP is a
+legitmate error in the case of a collision.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_set_by_key.3 b/docs/man/memcached_set_by_key.3
new file mode 100644 (file)
index 0000000..c919aca
--- /dev/null
@@ -0,0 +1,216 @@
+.TH "MEMCACHED_SET_BY_KEY" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_set_by_key \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Store value on server
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_set (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 const char *value, size_t value_length,
+                 time_t expiration,
+                 uint32_t flags);
+
+memcached_return_t
+  memcached_add (memcached_st *ptr,
+                 const char *key, size_t key_length,
+                 const char *value, size_t value_length,
+                 time_t expiration,
+                 uint32_t flags);
+
+memcached_return_t
+  memcached_replace (memcached_st *ptr,
+                     const char *key, size_t key_length,
+                     const char *value, size_t value_length,
+                     time_t expiration,
+                     uint32_t flags);
+
+memcached_return_t
+  memcached_prepend(memcached_st *ptr,
+                    const char *key, size_t key_length,
+                    const char *value, size_t value_length,
+                    time_t expiration,
+                    uint32_t flags)
+
+memcached_return_t
+  memcached_append(memcached_st *ptr,
+                   const char *key, size_t key_length,
+                    const char *value, size_t value_length,
+                    time_t expiration,
+                    uint32_t flags)
+memcached_return_t
+  memcached_cas(memcached_st *ptr,
+                const char *key, size_t key_length,
+                const char *value, size_t value_length,
+                time_t expiration,
+                uint32_t flags,
+                uint64_t cas);
+
+memcached_return_t
+  memcached_set_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags);
+
+memcached_return_t
+  memcached_add_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags);
+
+memcached_return_t
+  memcached_replace_by_key(memcached_st *ptr,
+                           const char *master_key, size_t master_key_length,
+                           const char *key, size_t key_length,
+                           const char *value, size_t value_length,
+                           time_t expiration,
+                           uint32_t flags);
+
+memcached_return_t
+  memcached_prepend_by_key(memcached_st *ptr,
+                           const char *master_key, size_t master_key_length,
+                           const char *key, size_t key_length,
+                           const char *value, size_t value_length,
+                           time_t expiration,
+                           uint32_t flags);
+
+memcached_return_t
+  memcached_append_by_key(memcached_st *ptr,
+                          const char *master_key, size_t master_key_length,
+                          const char *key, size_t key_length,
+                          const char *value, size_t value_length,
+                          time_t expiration,
+                          uint32_t flags);
+
+memcached_return_t
+  memcached_cas_by_key(memcached_st *ptr,
+                       const char *master_key, size_t master_key_length,
+                       const char *key, size_t key_length,
+                       const char *value, size_t value_length,
+                       time_t expiration,
+                       uint32_t flags,
+                       uint64_t cas);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_set(), memcached_add(), and memcached_replace() are all used to
+store information on the server. All methods take a key, and its length to
+store the object. Keys are currently limited to 250 characters by the
+memcached(1) server. You must also supply a value and a length. Optionally you
+may support an expiration time for the object and a 16 byte value (it is
+meant to be used as a bitmap).
+.sp
+memcached_set() will write an object to the server. If an object already
+exists it will overwrite what is in the server. If the object does not exist
+it will be written. If you are using the non\-blocking mode this function
+will always return true unless a network error occurs.
+.sp
+memcached_replace() replaces an object on the server. If the object is not
+found on the server an error occurs.
+.sp
+memcached_add() adds an object to the server. If the object is found on the
+server an error occurs, otherwise the value is stored.
+.sp
+memcached_prepend() places a segment of data before the last piece of data
+stored. Currently expiration and key are not used in the server.
+.sp
+memcached_append() places a segment of data at the end of the last piece of
+data stored. Currently expiration and key are not used in the server.
+.sp
+memcached_cas() overwrites data in the server as long as the "cas" value is
+still the same in the server. You can get the cas value of a result by
+calling memcached_result_cas() on a memcached_result_st(3) structure. At the point
+that this note was written cas is still buggy in memached. Turning on support
+for it in libmemcached(3) is optional. Please see memcached_set() for
+information on how to do this.
+.sp
+memcached_set_by_key(), memcached_add_by_key(), memcached_replace_by_key(),
+memcached_prepend_by_key(), memcached_append_by_key_by_key(),
+memcached_cas_by_key() methods all behave in a similar method as the non key
+methods. The difference is that they use their master_key parameter to map
+objects to particular servers.
+.sp
+If you are looking for performance, memcached_set() with non\-blocking IO is
+the fastest way to store data on the server.
+.sp
+All of the above functions are supported with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPbehavior enabled. But when using these operations with this behavior on, there
+are limits to the size of the payload being sent to the server.  The reason for
+these limits is that the Memcahed Server does not allow multi\-datagram requests
+and the current server implementation sets a datagram size to 1400 bytes. Due
+to protocol overhead, the actual limit of the user supplied data is less than
+1400 bytes and depends on the protocol in use as well as the operation being
+executed. When running with the binary protocol, \(ga\(ga MEMCACHED_BEHAVIOR_BINARY_PROTOCOL\(ga\(ga,
+the size of the key,value, flags and expiry combined may not exceed 1368 bytes.
+When running with the ASCII protocol, the exact limit fluctuates depending on
+which function is being executed and whether the function is a cas operation
+or not. For non\-cas ASCII set operations, there are at least 1335 bytes available
+to split among the key, key_prefix, and value; for cas ASCII operations there are
+at least 1318 bytes available to split among the key, key_prefix and value. If the
+total size of the command, including overhead, exceeds 1400 bytes, a \fBMEMCACHED_WRITE_FAILURE\fPwill be returned.
+.SH RETURN
+.sp
+All methods return a value of type \fBmemcached_return_t\fP.
+On success the value will be \fBMEMCACHED_SUCCESS\fP.
+Use memcached_strerror() to translate this value to a printable string.
+.sp
+For memcached_replace() and memcached_add(), \fBMEMCACHED_NOTSTORED\fP is a
+legitmate error in the case of a collision.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_set_memory_allocators.3 b/docs/man/memcached_set_memory_allocators.3
new file mode 100644 (file)
index 0000000..f56caa4
--- /dev/null
@@ -0,0 +1,129 @@
+.TH "MEMCACHED_SET_MEMORY_ALLOCATORS" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_set_memory_allocators \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manage memory allocator functions
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_set_memory_allocators (memcached_st *ptr,
+                                   memcached_malloc_fn mem_malloc,
+                                   memcached_free_fn mem_free,
+                                   memcached_realloc_fn mem_realloc,
+                                   memcached_calloc_fn mem_calloc,
+                                  void *context);
+
+void
+  memcached_get_memory_allocators (memcached_st *ptr,
+                                   memcached_malloc_fn *mem_malloc,
+                                   memcached_free_fn *mem_free,
+                                   memcached_realloc_fn *mem_realloc,
+                                   memcached_calloc_fn *mem_calloc);
+
+void *
+  memcached_get_memory_allocators_context(const memcached_st *ptr);
+
+void *
+  (*memcached_malloc_fn) (memcached_st *ptr, const size_t size,
+                         void *context);
+
+void *
+  (*memcached_realloc_fn) (memcached_st *ptr, void *mem,
+                           const size_t size,
+                          void *context);
+
+void
+  (*memcached_free_fn) (memcached_st *ptr, void *mem,
+                       void *context);
+
+void *
+(*memcached_calloc_fn) (memcached_st *ptr,
+                       size_t nelem,
+                        const size_t elsize,
+                       void *context);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) allows you to specify your own memory allocators optimized
+for your application.
+.sp
+memcached_set_memory_allocators() is used to set the memory allocators used
+by the memcached instance specified by ptr. Please note that you cannot
+override only one of the memory allocators, you have to specify a complete
+new set if you want to override one of them. All of the memory allocation
+functions should behave as specified in the C99 standard. Specify NULL as
+all functions to reset them to the default values.
+.sp
+memcached_get_memory_allocators() is used to get the currently used memory
+allocators by a mamcached handle.
+.sp
+memcached_get_memory_allocators_context() returns the void * that was
+passed in during the call to memcached_set_memory_allocators().
+.sp
+The first argument to the memory allocator functions is a pointer to a
+memcached structure, the is passed as const and you will need to clone
+it in order to make use of any operation which would modify it.
+.SH NOTES
+.sp
+In version 0.38 all functions were modified to have a context void pointer
+passed to them. This was so that customer allocators could have their
+own space for memory.
+.SH RETURN
+.sp
+memcached_set_memory_allocators() return MEMCACHED_SUCCESS upon success,
+and MEMCACHED_FAILURE if you don\(aqt pass a complete set of function pointers.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+Brian Aker, <\fI\%brian@tangent\fP.orf<gt>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_get_user_data(3) memcached_set_user_data(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_set_memory_allocators_context.3 b/docs/man/memcached_set_memory_allocators_context.3
new file mode 100644 (file)
index 0000000..679f6ce
--- /dev/null
@@ -0,0 +1,129 @@
+.TH "MEMCACHED_SET_MEMORY_ALLOCATORS_CONTEXT" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_set_memory_allocators_context \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manage memory allocator functions
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_set_memory_allocators (memcached_st *ptr,
+                                   memcached_malloc_fn mem_malloc,
+                                   memcached_free_fn mem_free,
+                                   memcached_realloc_fn mem_realloc,
+                                   memcached_calloc_fn mem_calloc,
+                                  void *context);
+
+void
+  memcached_get_memory_allocators (memcached_st *ptr,
+                                   memcached_malloc_fn *mem_malloc,
+                                   memcached_free_fn *mem_free,
+                                   memcached_realloc_fn *mem_realloc,
+                                   memcached_calloc_fn *mem_calloc);
+
+void *
+  memcached_get_memory_allocators_context(const memcached_st *ptr);
+
+void *
+  (*memcached_malloc_fn) (memcached_st *ptr, const size_t size,
+                         void *context);
+
+void *
+  (*memcached_realloc_fn) (memcached_st *ptr, void *mem,
+                           const size_t size,
+                          void *context);
+
+void
+  (*memcached_free_fn) (memcached_st *ptr, void *mem,
+                       void *context);
+
+void *
+(*memcached_calloc_fn) (memcached_st *ptr,
+                       size_t nelem,
+                        const size_t elsize,
+                       void *context);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) allows you to specify your own memory allocators optimized
+for your application.
+.sp
+memcached_set_memory_allocators() is used to set the memory allocators used
+by the memcached instance specified by ptr. Please note that you cannot
+override only one of the memory allocators, you have to specify a complete
+new set if you want to override one of them. All of the memory allocation
+functions should behave as specified in the C99 standard. Specify NULL as
+all functions to reset them to the default values.
+.sp
+memcached_get_memory_allocators() is used to get the currently used memory
+allocators by a mamcached handle.
+.sp
+memcached_get_memory_allocators_context() returns the void * that was
+passed in during the call to memcached_set_memory_allocators().
+.sp
+The first argument to the memory allocator functions is a pointer to a
+memcached structure, the is passed as const and you will need to clone
+it in order to make use of any operation which would modify it.
+.SH NOTES
+.sp
+In version 0.38 all functions were modified to have a context void pointer
+passed to them. This was so that customer allocators could have their
+own space for memory.
+.SH RETURN
+.sp
+memcached_set_memory_allocators() return MEMCACHED_SUCCESS upon success,
+and MEMCACHED_FAILURE if you don\(aqt pass a complete set of function pointers.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+Brian Aker, <\fI\%brian@tangent\fP.orf<gt>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_get_user_data(3) memcached_set_user_data(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_set_sasl_callbacks.3 b/docs/man/memcached_set_sasl_callbacks.3
new file mode 100644 (file)
index 0000000..db3f695
--- /dev/null
@@ -0,0 +1,94 @@
+.TH "MEMCACHED_SET_SASL_CALLBACKS" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_set_sasl_callbacks \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+SASL support
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+void memcached_set_sasl_callbacks(memcached_st *ptr,
+                                  const sasl_callback_t *callbacks)
+
+const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st *ptr)
+
+memcached_return memcached_set_sasl_auth_data(memcached_st *ptr,
+                                              const char *username,
+                                              const char *password)
+memcached_return memcached_destroy_sasl_auth_data(memcached_st *ptr)
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) allows you to plug in your own callbacks function used by
+libsasl to perform SASL authentication.
+.sp
+Please note that SASL requires the memcached binary protocol, and you have
+to specify the callbacks before you connect to the server.
+.sp
+memcached_set_sasl_auth_data() is a helper function for you defining
+the basic functionality for you, but it will store the username and password
+in memory. If you choose to use this method you have to call
+memcached_destroy_sasl_auth_data before calling memcached_free to avoid
+a memory leak. You should NOT call memcached_destroy_sasl_auth_data if you
+specify your own callback function with memcached_set_sasl_callbacks().
+.sp
+You as a client user have to initialize libsasl by using sasl_client_init
+before enabling it in libmemcached, and you have to shut down libsasl by
+calling sasl_done() when you are done using SASL from libmemcached.
+.SH RETURN
+.sp
+memcached_get_sasl_callbacks() returns the callbacks currently used
+by this memcached handle.
+memcached_get_sasl_set_auth_data() returns MEMCACHED_SUCCESS upon success.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_set_user_data.3 b/docs/man/memcached_set_user_data.3
new file mode 100644 (file)
index 0000000..3fe9d5a
--- /dev/null
@@ -0,0 +1,82 @@
+.TH "MEMCACHED_SET_USER_DATA" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_set_user_data \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manage user specific data
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+void *memcached_get_user_data (memcached_st *ptr);
+
+void *memcached_set_user_data (memcached_st *ptr, void *data);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) allows you to store a pointer to a user specific data inside
+the memcached_st structure.
+.sp
+memcached_set_user_data() is used to set the user specific data in the
+memcached_st structure.
+.sp
+memcached_get_user_data() is used to retrieve the user specific data in
+the memcached_st structure.
+.SH RETURN
+.sp
+memcached_set_user_data() returns the previous value of the user specific
+data.
+.sp
+memcached_get_user_data() returns the current value uf the user specific
+data.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_stat.3 b/docs/man/memcached_stat.3
new file mode 100644 (file)
index 0000000..7d5b82c
--- /dev/null
@@ -0,0 +1,127 @@
+.TH "MEMCACHED_STAT" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_stat \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Get memcached statistics
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_stat_st *memcached_stat (memcached_st *ptr,
+                                   char *args,
+                                   memcached_return_t *error);
+
+memcached_return_t memcached_stat_servername (memcached_stat_st *stat,
+                                              char *args,
+                                              const char *hostname,
+                                              unsigned int port);
+
+char *
+  memcached_stat_get_value (memcached_st *ptr,
+                            memcached_stat_st *stat,
+                            const char *key,
+                            memcached_return_t *error);
+
+char **
+  memcached_stat_get_keys (memcached_st *ptr,
+                           memcached_stat_st *stat,
+                           memcached_return_t *error);
+
+memcached_return_t
+  memcached_stat_execute (memcached_st *memc,
+                          const char *args,
+                          memcached_stat_fn func,
+                          void *context);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) has the ability to query a memcached server (or collection
+of servers) for their current state. Queries to find state return a
+\fBmemcached_stat_st\fP structure. You are responsible for freeing this structure.
+While it is possible to access the structure directly it is not advisable.
+<memcached_stat_get_value() has been provided to query the structure.
+.sp
+memcached_stat_execute() uses the servers found in \fBmemcached_stat_st\fP and
+executes a "stat" command on each server. args is an optional argument that
+can be passed in to modify the behavior of "stats". You will need to supply
+a callback function that will be supplied each pair of values returned by
+the memcached server.
+.sp
+memcached_stat() fetches an array of \fBmemcached_stat_st\fP structures containing
+the state of all available memcached servers. The return value must be freed
+by the calling application. If called with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPbehavior set, a NULL value is returned and the error parameter is set to
+\fBMEMCACHED_NOT_SUPPORTED\fP.
+.sp
+memcached_stat_servername() can be used standalone without a \fBmemcached_st\fP to
+obtain the state of a particular server.  "args" is used to define a
+particular state object (a list of these are not provided for by either
+the memcached_stat_get_keys() call nor are they defined in the memcached
+protocol). You must specify the hostname and port of the server you want to
+obtain information on.
+.sp
+memcached_stat_get_value() returns the value of a particular state key. You
+specify the key you wish to obtain.  The key must be null terminated.
+.sp
+memcached_stat_get_keys() returns a list of keys that the server has state
+objects on. You are responsible for freeing this list.
+.sp
+A command line tool, memstat(1), is provided so that you do not have to write
+an application to do this.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.sp
+Any method returning a \fBmemcached_stat_st\fP expects you to free the
+memory allocated for it.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_stat_execute.3 b/docs/man/memcached_stat_execute.3
new file mode 100644 (file)
index 0000000..d201063
--- /dev/null
@@ -0,0 +1,127 @@
+.TH "MEMCACHED_STAT_EXECUTE" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_stat_execute \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Get memcached statistics
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_stat_st *memcached_stat (memcached_st *ptr,
+                                   char *args,
+                                   memcached_return_t *error);
+
+memcached_return_t memcached_stat_servername (memcached_stat_st *stat,
+                                              char *args,
+                                              const char *hostname,
+                                              unsigned int port);
+
+char *
+  memcached_stat_get_value (memcached_st *ptr,
+                            memcached_stat_st *stat,
+                            const char *key,
+                            memcached_return_t *error);
+
+char **
+  memcached_stat_get_keys (memcached_st *ptr,
+                           memcached_stat_st *stat,
+                           memcached_return_t *error);
+
+memcached_return_t
+  memcached_stat_execute (memcached_st *memc,
+                          const char *args,
+                          memcached_stat_fn func,
+                          void *context);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) has the ability to query a memcached server (or collection
+of servers) for their current state. Queries to find state return a
+\fBmemcached_stat_st\fP structure. You are responsible for freeing this structure.
+While it is possible to access the structure directly it is not advisable.
+<memcached_stat_get_value() has been provided to query the structure.
+.sp
+memcached_stat_execute() uses the servers found in \fBmemcached_stat_st\fP and
+executes a "stat" command on each server. args is an optional argument that
+can be passed in to modify the behavior of "stats". You will need to supply
+a callback function that will be supplied each pair of values returned by
+the memcached server.
+.sp
+memcached_stat() fetches an array of \fBmemcached_stat_st\fP structures containing
+the state of all available memcached servers. The return value must be freed
+by the calling application. If called with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPbehavior set, a NULL value is returned and the error parameter is set to
+\fBMEMCACHED_NOT_SUPPORTED\fP.
+.sp
+memcached_stat_servername() can be used standalone without a \fBmemcached_st\fP to
+obtain the state of a particular server.  "args" is used to define a
+particular state object (a list of these are not provided for by either
+the memcached_stat_get_keys() call nor are they defined in the memcached
+protocol). You must specify the hostname and port of the server you want to
+obtain information on.
+.sp
+memcached_stat_get_value() returns the value of a particular state key. You
+specify the key you wish to obtain.  The key must be null terminated.
+.sp
+memcached_stat_get_keys() returns a list of keys that the server has state
+objects on. You are responsible for freeing this list.
+.sp
+A command line tool, memstat(1), is provided so that you do not have to write
+an application to do this.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.sp
+Any method returning a \fBmemcached_stat_st\fP expects you to free the
+memory allocated for it.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_stat_get_keys.3 b/docs/man/memcached_stat_get_keys.3
new file mode 100644 (file)
index 0000000..1d65d12
--- /dev/null
@@ -0,0 +1,127 @@
+.TH "MEMCACHED_STAT_GET_KEYS" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_stat_get_keys \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Get memcached statistics
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_stat_st *memcached_stat (memcached_st *ptr,
+                                   char *args,
+                                   memcached_return_t *error);
+
+memcached_return_t memcached_stat_servername (memcached_stat_st *stat,
+                                              char *args,
+                                              const char *hostname,
+                                              unsigned int port);
+
+char *
+  memcached_stat_get_value (memcached_st *ptr,
+                            memcached_stat_st *stat,
+                            const char *key,
+                            memcached_return_t *error);
+
+char **
+  memcached_stat_get_keys (memcached_st *ptr,
+                           memcached_stat_st *stat,
+                           memcached_return_t *error);
+
+memcached_return_t
+  memcached_stat_execute (memcached_st *memc,
+                          const char *args,
+                          memcached_stat_fn func,
+                          void *context);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) has the ability to query a memcached server (or collection
+of servers) for their current state. Queries to find state return a
+\fBmemcached_stat_st\fP structure. You are responsible for freeing this structure.
+While it is possible to access the structure directly it is not advisable.
+<memcached_stat_get_value() has been provided to query the structure.
+.sp
+memcached_stat_execute() uses the servers found in \fBmemcached_stat_st\fP and
+executes a "stat" command on each server. args is an optional argument that
+can be passed in to modify the behavior of "stats". You will need to supply
+a callback function that will be supplied each pair of values returned by
+the memcached server.
+.sp
+memcached_stat() fetches an array of \fBmemcached_stat_st\fP structures containing
+the state of all available memcached servers. The return value must be freed
+by the calling application. If called with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPbehavior set, a NULL value is returned and the error parameter is set to
+\fBMEMCACHED_NOT_SUPPORTED\fP.
+.sp
+memcached_stat_servername() can be used standalone without a \fBmemcached_st\fP to
+obtain the state of a particular server.  "args" is used to define a
+particular state object (a list of these are not provided for by either
+the memcached_stat_get_keys() call nor are they defined in the memcached
+protocol). You must specify the hostname and port of the server you want to
+obtain information on.
+.sp
+memcached_stat_get_value() returns the value of a particular state key. You
+specify the key you wish to obtain.  The key must be null terminated.
+.sp
+memcached_stat_get_keys() returns a list of keys that the server has state
+objects on. You are responsible for freeing this list.
+.sp
+A command line tool, memstat(1), is provided so that you do not have to write
+an application to do this.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.sp
+Any method returning a \fBmemcached_stat_st\fP expects you to free the
+memory allocated for it.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_stat_get_value.3 b/docs/man/memcached_stat_get_value.3
new file mode 100644 (file)
index 0000000..e3a8c8c
--- /dev/null
@@ -0,0 +1,127 @@
+.TH "MEMCACHED_STAT_GET_VALUE" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_stat_get_value \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Get memcached statistics
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_stat_st *memcached_stat (memcached_st *ptr,
+                                   char *args,
+                                   memcached_return_t *error);
+
+memcached_return_t memcached_stat_servername (memcached_stat_st *stat,
+                                              char *args,
+                                              const char *hostname,
+                                              unsigned int port);
+
+char *
+  memcached_stat_get_value (memcached_st *ptr,
+                            memcached_stat_st *stat,
+                            const char *key,
+                            memcached_return_t *error);
+
+char **
+  memcached_stat_get_keys (memcached_st *ptr,
+                           memcached_stat_st *stat,
+                           memcached_return_t *error);
+
+memcached_return_t
+  memcached_stat_execute (memcached_st *memc,
+                          const char *args,
+                          memcached_stat_fn func,
+                          void *context);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) has the ability to query a memcached server (or collection
+of servers) for their current state. Queries to find state return a
+\fBmemcached_stat_st\fP structure. You are responsible for freeing this structure.
+While it is possible to access the structure directly it is not advisable.
+<memcached_stat_get_value() has been provided to query the structure.
+.sp
+memcached_stat_execute() uses the servers found in \fBmemcached_stat_st\fP and
+executes a "stat" command on each server. args is an optional argument that
+can be passed in to modify the behavior of "stats". You will need to supply
+a callback function that will be supplied each pair of values returned by
+the memcached server.
+.sp
+memcached_stat() fetches an array of \fBmemcached_stat_st\fP structures containing
+the state of all available memcached servers. The return value must be freed
+by the calling application. If called with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPbehavior set, a NULL value is returned and the error parameter is set to
+\fBMEMCACHED_NOT_SUPPORTED\fP.
+.sp
+memcached_stat_servername() can be used standalone without a \fBmemcached_st\fP to
+obtain the state of a particular server.  "args" is used to define a
+particular state object (a list of these are not provided for by either
+the memcached_stat_get_keys() call nor are they defined in the memcached
+protocol). You must specify the hostname and port of the server you want to
+obtain information on.
+.sp
+memcached_stat_get_value() returns the value of a particular state key. You
+specify the key you wish to obtain.  The key must be null terminated.
+.sp
+memcached_stat_get_keys() returns a list of keys that the server has state
+objects on. You are responsible for freeing this list.
+.sp
+A command line tool, memstat(1), is provided so that you do not have to write
+an application to do this.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.sp
+Any method returning a \fBmemcached_stat_st\fP expects you to free the
+memory allocated for it.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_stat_servername.3 b/docs/man/memcached_stat_servername.3
new file mode 100644 (file)
index 0000000..14ac0bc
--- /dev/null
@@ -0,0 +1,127 @@
+.TH "MEMCACHED_STAT_SERVERNAME" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_stat_servername \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Get memcached statistics
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_stat_st *memcached_stat (memcached_st *ptr,
+                                   char *args,
+                                   memcached_return_t *error);
+
+memcached_return_t memcached_stat_servername (memcached_stat_st *stat,
+                                              char *args,
+                                              const char *hostname,
+                                              unsigned int port);
+
+char *
+  memcached_stat_get_value (memcached_st *ptr,
+                            memcached_stat_st *stat,
+                            const char *key,
+                            memcached_return_t *error);
+
+char **
+  memcached_stat_get_keys (memcached_st *ptr,
+                           memcached_stat_st *stat,
+                           memcached_return_t *error);
+
+memcached_return_t
+  memcached_stat_execute (memcached_st *memc,
+                          const char *args,
+                          memcached_stat_fn func,
+                          void *context);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) has the ability to query a memcached server (or collection
+of servers) for their current state. Queries to find state return a
+\fBmemcached_stat_st\fP structure. You are responsible for freeing this structure.
+While it is possible to access the structure directly it is not advisable.
+<memcached_stat_get_value() has been provided to query the structure.
+.sp
+memcached_stat_execute() uses the servers found in \fBmemcached_stat_st\fP and
+executes a "stat" command on each server. args is an optional argument that
+can be passed in to modify the behavior of "stats". You will need to supply
+a callback function that will be supplied each pair of values returned by
+the memcached server.
+.sp
+memcached_stat() fetches an array of \fBmemcached_stat_st\fP structures containing
+the state of all available memcached servers. The return value must be freed
+by the calling application. If called with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPbehavior set, a NULL value is returned and the error parameter is set to
+\fBMEMCACHED_NOT_SUPPORTED\fP.
+.sp
+memcached_stat_servername() can be used standalone without a \fBmemcached_st\fP to
+obtain the state of a particular server.  "args" is used to define a
+particular state object (a list of these are not provided for by either
+the memcached_stat_get_keys() call nor are they defined in the memcached
+protocol). You must specify the hostname and port of the server you want to
+obtain information on.
+.sp
+memcached_stat_get_value() returns the value of a particular state key. You
+specify the key you wish to obtain.  The key must be null terminated.
+.sp
+memcached_stat_get_keys() returns a list of keys that the server has state
+objects on. You are responsible for freeing this list.
+.sp
+A command line tool, memstat(1), is provided so that you do not have to write
+an application to do this.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.sp
+Any method returning a \fBmemcached_stat_st\fP expects you to free the
+memory allocated for it.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_stats.3 b/docs/man/memcached_stats.3
new file mode 100644 (file)
index 0000000..e1cfa14
--- /dev/null
@@ -0,0 +1,127 @@
+.TH "MEMCACHED_STATS" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_stats \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Get memcached statistics
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_stat_st *memcached_stat (memcached_st *ptr,
+                                   char *args,
+                                   memcached_return_t *error);
+
+memcached_return_t memcached_stat_servername (memcached_stat_st *stat,
+                                              char *args,
+                                              const char *hostname,
+                                              unsigned int port);
+
+char *
+  memcached_stat_get_value (memcached_st *ptr,
+                            memcached_stat_st *stat,
+                            const char *key,
+                            memcached_return_t *error);
+
+char **
+  memcached_stat_get_keys (memcached_st *ptr,
+                           memcached_stat_st *stat,
+                           memcached_return_t *error);
+
+memcached_return_t
+  memcached_stat_execute (memcached_st *memc,
+                          const char *args,
+                          memcached_stat_fn func,
+                          void *context);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) has the ability to query a memcached server (or collection
+of servers) for their current state. Queries to find state return a
+\fBmemcached_stat_st\fP structure. You are responsible for freeing this structure.
+While it is possible to access the structure directly it is not advisable.
+<memcached_stat_get_value() has been provided to query the structure.
+.sp
+memcached_stat_execute() uses the servers found in \fBmemcached_stat_st\fP and
+executes a "stat" command on each server. args is an optional argument that
+can be passed in to modify the behavior of "stats". You will need to supply
+a callback function that will be supplied each pair of values returned by
+the memcached server.
+.sp
+memcached_stat() fetches an array of \fBmemcached_stat_st\fP structures containing
+the state of all available memcached servers. The return value must be freed
+by the calling application. If called with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPbehavior set, a NULL value is returned and the error parameter is set to
+\fBMEMCACHED_NOT_SUPPORTED\fP.
+.sp
+memcached_stat_servername() can be used standalone without a \fBmemcached_st\fP to
+obtain the state of a particular server.  "args" is used to define a
+particular state object (a list of these are not provided for by either
+the memcached_stat_get_keys() call nor are they defined in the memcached
+protocol). You must specify the hostname and port of the server you want to
+obtain information on.
+.sp
+memcached_stat_get_value() returns the value of a particular state key. You
+specify the key you wish to obtain.  The key must be null terminated.
+.sp
+memcached_stat_get_keys() returns a list of keys that the server has state
+objects on. You are responsible for freeing this list.
+.sp
+A command line tool, memstat(1), is provided so that you do not have to write
+an application to do this.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.sp
+Any method returning a \fBmemcached_stat_st\fP expects you to free the
+memory allocated for it.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_strerror.3 b/docs/man/memcached_strerror.3
new file mode 100644 (file)
index 0000000..bd25397
--- /dev/null
@@ -0,0 +1,79 @@
+.TH "MEMCACHED_STRERROR" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_strerror \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Get error string
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+const char *
+  memcached_strerror (memcached_st *ptr,
+                      memcached_return_t rc);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_strerror() takes a \fBmemcached_return_t\fP value and returns a string
+describing the error.
+.sp
+This string must not be modified by the application.
+.sp
+\fBmemcached_return_t\fP values are returned from nearly all libmemcached(3) functions.
+.sp
+\fBmemcached_return_t\fP values are of an enum type so that you can set up responses
+with switch/case and know that you are capturing all possible return values.
+.SH RETURN
+.sp
+memcached_strerror() returns a string describing a \fBmemcached_return_t\fP value.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_user_data.3 b/docs/man/memcached_user_data.3
new file mode 100644 (file)
index 0000000..a27c0d3
--- /dev/null
@@ -0,0 +1,82 @@
+.TH "MEMCACHED_USER_DATA" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_user_data \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Manage user specific data
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+void *memcached_get_user_data (memcached_st *ptr);
+
+void *memcached_set_user_data (memcached_st *ptr, void *data);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+libmemcached(3) allows you to store a pointer to a user specific data inside
+the memcached_st structure.
+.sp
+memcached_set_user_data() is used to set the user specific data in the
+memcached_st structure.
+.sp
+memcached_get_user_data() is used to retrieve the user specific data in
+the memcached_st structure.
+.SH RETURN
+.sp
+memcached_set_user_data() returns the previous value of the user specific
+data.
+.sp
+memcached_get_user_data() returns the current value uf the user specific
+data.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_verbosity.3 b/docs/man/memcached_verbosity.3
new file mode 100644 (file)
index 0000000..536481a
--- /dev/null
@@ -0,0 +1,74 @@
+.TH "MEMCACHED_VERBOSITY" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_verbosity \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Modifiy verbosity of servers
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_verbosity (memcached_st *ptr,
+                       unsigned int verbosity);
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_verbosity() modifies the "verbosity" of the
+memcached(1) servers referenced in the \fBmemcached_st\fP parameter.
+.SH RETURN
+.sp
+A value of type \fBmemcached_return_t\fP is returned
+On success that value will be \fBMEMCACHED_SUCCESS\fP.
+Use memcached_strerror() to translate this value to a printable string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_version.3 b/docs/man/memcached_version.3
new file mode 100644 (file)
index 0000000..f1c3788
--- /dev/null
@@ -0,0 +1,85 @@
+.TH "MEMCACHED_VERSION" "3" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_version \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Get library version
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+const char *
+  memcached_lib_version (void)
+
+
+memcached_return_t
+  memcached_version (memcached_st *ptr)
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+memcached_lib_version() is used to return a simple version string representing
+the libmemcached version (version of the client library, not server)
+.sp
+memcached_version() is used to set the major, minor, and micro versions of each
+memcached server being used by the memcached_st connection structure. It returns the
+memcached server return code.
+.SH RETURN
+.sp
+A string with the version of libmemcached driver is returned from
+memcached_lib_version()
+.sp
+A value of type \fBmemcached_return_t\fP is returned from memcached_version()
+On success that value will be \fBMEMCACHED_SUCCESS\fP. If called with the
+\fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set, the value \fBMEMCACHED_NOT_SUPPORTED\fPwill be returned. Use memcached_strerror() to translate this value to
+a printable string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcapable.1 b/docs/man/memcapable.1
new file mode 100644 (file)
index 0000000..4e34e97
--- /dev/null
@@ -0,0 +1,91 @@
+.TH "MEMCAPABLE" "1" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcapable \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Check memcached server capabilities
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+memcat [\-h hostname] [\-p port] [\-c] [\-v] [\-t n]
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+\fBmemcapable\fP connects to the specified memcached server and tries to
+determine its capabilities by running the various commands and verifying
+the response.
+.SH OPTIONS
+.sp
+The following options are supported:
+.INDENT 0.0
+.TP
+.BI \-h \ hostname
+.
+Specify the hostname to connect to. The default is \fIlocalhost\fP
+.TP
+.BI \-p \ port
+.
+Specify the port number to connect to. The default is \fI11211\fP
+.TP
+.B \-c
+.
+Generate a coredump when it detects an error from the server.
+.TP
+.B \-v
+.
+Print out the comparison when it detects an error from the server.
+.TP
+.BI \-t \ n
+.
+Set the timeout from an IO operation to/from the server to \fIn\fP seconds.
+.UNINDENT
+.SH LIMITATIONS
+.sp
+The current version of memcapable will only verify the binary protocol.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcat.1 b/docs/man/memcat.1
new file mode 100644 (file)
index 0000000..0755e4d
--- /dev/null
@@ -0,0 +1,71 @@
+.TH "MEMCAT" "1" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcat \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Copy a set of keys to stdout
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+memcat [options] key key ...
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+\fBmemcat\fP outputs to stdout the value a single or multiple set of keys
+stored in a memcached(1) server. If any key is not found an error is returned.
+.sp
+It is similar to the standard UNIX cat(1) utility.
+.sp
+You can specify servers via the \fB\-\-servers\fP option or via the
+environment variable \fBMEMCACHED_SERVERS\fP.
+.sp
+For a full list of operations run the tool with the \fB\-\-help\fP option.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Mark Atwood <\fI\%mark@fallenpegasus.com\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcp.1 b/docs/man/memcp.1
new file mode 100644 (file)
index 0000000..819b592
--- /dev/null
@@ -0,0 +1,74 @@
+.TH "MEMCP" "1" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memcp \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Copies files to a collection of memcached servers
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+memcp [options] file file <servers>
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+\fBmemcp\fP copies one or more files into memcached(1) servers.
+It is similar to the standard UNIX cp(1) command.
+.sp
+The key names will be the names of the files,
+without any directory path part.
+.sp
+You can specify servers via the \fB\-\-servers\fP option or via the
+environment variable \fBMEMCACHED_SERVERS\fP. If you specify neither of
+these, the final value in the command line list is the name of a
+server(s).
+.sp
+For a full list of operations run the tool with the \fB\-\-help\fP option.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Mark Atwood, <\fI\%mark@fallenpegasus.com\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memdump.1 b/docs/man/memdump.1
new file mode 100644 (file)
index 0000000..5c03c73
--- /dev/null
@@ -0,0 +1,65 @@
+.TH "MEMDUMP" "1" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memdump \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Dump a list of keys from a server.
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+memdump [options]
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+\fBmemdump\fP currently dumps a list of "keys" from all servers that
+it is told to fetch from. Because memcached does not guarentee to
+provide all keys it is not possible to get a complete "dump".
+.sp
+For a full list of operations run the tool with the \fB\-\-help\fP option.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memerror.1 b/docs/man/memerror.1
new file mode 100644 (file)
index 0000000..afe4095
--- /dev/null
@@ -0,0 +1,64 @@
+.TH "MEMERROR" "1" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memerror \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Translate a memcached error code to a string
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+memerror [options] error_code
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+\fBmemerror\fP translate an error code from libmemcached(3) to  a human
+readable string.
+.sp
+For a full list of operations run the tool with the \fB\-\-help\fP option.
+.SH HOME
+.sp
+To find out more infoerroration please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memflush.1 b/docs/man/memflush.1
new file mode 100644 (file)
index 0000000..e24c1e9
--- /dev/null
@@ -0,0 +1,69 @@
+.TH "MEMFLUSH" "1" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memflush \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+Reset a server or list of servers
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+memflush [options]
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+\fBmemflush\fP resets the contents of memcached(1) servers.
+This means all data in these servers will be deleted.
+.sp
+You can specify servers via the \fB\-\-servers\fP option or via the
+environment variable \fBMEMCACHED_SERVERS\fP.
+.sp
+For a full list of operations run the tool with the \fB\-\-help\fP option.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Mark Atwood <\fI\%mark@fallenpegasus.com\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memrm.1 b/docs/man/memrm.1
new file mode 100644 (file)
index 0000000..14945b9
--- /dev/null
@@ -0,0 +1,68 @@
+.TH "MEMRM" "1" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memrm \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+memrm \- Remove a key(s) from a collection of memcached servers
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+memrm [options] key key ...
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+\fBmemrm\fP removes items, specified by key, from memcached(1) servers.
+.sp
+You can specify servers via the \fB\-\-servers\fP option or via the
+environment variable \fBMEMCACHED_SERVERS\fP.
+.sp
+For a full list of operations run the tool with the \fB\-\-help\fP option.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Mark Atwood, <\fI\%mark@fallenpegasus.com\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memslap.1 b/docs/man/memslap.1
new file mode 100644 (file)
index 0000000..8262578
--- /dev/null
@@ -0,0 +1,1224 @@
+.TH "MEMSLAP" "1" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memslap \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+memslap \- Load testing and benchmarking tool for memcached
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+memslap [options]
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+\fBmemslap\fP is a load generation and benchmark tool for memcached(1)
+servers. It generates configurable workload such as threads, concurrencies, connections,
+run time, overwrite, miss rate, key size, value size, get/set proportion,
+expected throughput, and so on. Furthermore, it also supports data
+verification, expire\-time verification, UDP, binary protocol, facebook test,
+replication test, multi\-get and reconnection, etc.
+.sp
+Memslap manages network connections like memcached with
+libevent. Each thread of memslap is bound with a CPU core, all
+the threads don\(aqt communicate with each other, and there are several socket
+connections in each thread. Each connection keeps key size distribution,
+value size distribution, and command distribution by itself.
+.sp
+You can specify servers via the \fB\-\-servers\fP option or via the
+environment variable \fBMEMCACHED_SERVERS\fP.
+.SH FEATURES
+.sp
+Memslap is developed to for the following purposes:
+.sp
+Manages network connections with libevent asynchronously.
+.sp
+Set both TCP and UDP up to use non\-blocking IO.
+.sp
+Improves parallelism: higher performance in multi\-threads environments.
+.sp
+Improves time efficiency: faster processing speed.
+.sp
+Generates key and value more efficiently; key size distribution and value size distribution are configurable.
+.sp
+Supports get, multi\-get, and set commands; command distribution is configurable.
+.sp
+Supports controllable miss rate and overwrite rate.
+.sp
+Supports data and expire\-time verification.
+.sp
+Supports dumping statistic information periodically.
+.sp
+Supports thousands of TCP connections.
+.sp
+Supports binary protocol.
+.sp
+Supports facebook test (set with TCP and multi\-get with UDP) and replication test.
+.SH DETAILS
+.SS Effective implementation of network.
+.sp
+For memslap, both TCP and UDP use non\-blocking network IO. All
+the network events are managed by libevent as memcached. The network module
+of memslap is similar to memcached. Libevent can ensure
+memslap can handle network very efficiently.
+.SS Effective implementation of multi\-threads and concurrency
+.sp
+Memslap has the similar implementation of multi\-threads to
+memcached. Memslap creates one or more self\-governed threads;
+each thread is bound with one CPU core if the system supports setting CPU
+core affinity.
+.sp
+In addition, each thread has a libevent to manage the events of the network;
+each thread has one or more self\-governed concurrencies; and each
+concurrency has one or more socket connections. All the concurrencies don’t
+communicate with each other even though they are in the same thread.
+.sp
+Memslap can create thousands of socket connections, and each
+concurrency has tens of socket connections. Each concurrency randomly or
+sequentially selects one socket connection from its socket connection pool
+to run, so memslap can ensure each concurrency handles one
+socket connection at any given time. Users can specify the number of
+concurrency and socket connections of each concurrency according to their
+expected workload.
+.SS Effective implementation of generating key and value
+.sp
+In order to improve time efficiency and space efficiency,
+memslap creates a random characters table with 10M characters. All the
+suffixes of keys and values are generated from this random characters table.
+.sp
+Memslap uses the offset in the character table and the length
+of the string to identify a string. It can save much memory.
+Each key contains two parts, a prefix and a suffix. The prefix is an
+uint64_t, 8 bytes. In order to verify the data set before,
+memslap need to ensure each key is unique, so it uses the prefix to identify
+a key. The prefix cannot include illegal characters, such as ‘r’, ‘n’,
+‘0’ and ‘ ‘. And memslap has an algorithm to ensure that.
+.sp
+Memslap doesn’t generate all the objects (key\-value pairs) at
+the beginning. It only generates enough objects to fill the task window
+(default 10K objects) of each concurrency. Each object has the following
+basic information, key prefix, key suffix offset in the character table, key
+length, value offset in the character table, and value length.
+.sp
+In the work process, each concurrency sequentially or randomly selects an
+object from the window to do set operation or get operation. At the same
+time, each concurrency kicks objects out of its window and adds new object
+into it.
+.SS Simple but useful task scheduling
+.sp
+Memslap uses libevent to schedule all the concurrencies of
+threads, and each concurrency schedules tasks based on the local task
+window. Memslap assumes that if each concurrency keeps the same
+key distribution, value distribution and commands distribution, from
+outside, memslap keeps all the distribution as a whole.
+Each task window includes a lot of objects, each object stores its basic
+information, such as key, value, expire time, and so on. At any time, all
+the objects in the window keep the same and fixed key and value
+distribution. If an object is overwritten, the value of the object will be
+updated. Memslap verifies the data or expire\-time according to
+the object information stored in the task window.
+.sp
+Libevent selects which concurrency to handle based on a specific network
+event. Then the concurrency selects which command (get or set) to operate
+based on the command distribution. If it needs to kick out an old object and
+add a new object, in order to keep the same key and value distribution, the
+new object must have the same key length and value length.
+.sp
+If memcached server has two cache layers (memory and SSD), running
+memslap with different window sizes can get different cache
+miss rates. If memslap adds enough objects into the windows at
+the beginning, and the cache of memcached cannot store all the objects
+initialized, then memslap will get some objects from the second
+cache layer. It causes the first cache layer to miss. So the user can
+specify the window size to get the expected miss rate of the first cache
+layer.
+.SS Useful implementation of multi\-servers , UDP, TCP, multi\-get and binary protocol
+.sp
+Because each thread is self\-governed, memslap can assign
+different threads to handle different memcached servers. This is just one of
+the ways in which memslap supports multiple servers. The only
+limitation is that the number of servers cannot be greater than the number
+of threads. The other way to support multiple servers is for replication
+test. Each concurrency has one socket connection to each memcached server.
+For the implementation, memslap can set some objects to one
+memcached server, and get these objects from the other servers.
+.sp
+By default, Memslap does single get. If the user specifies
+multi\-get option, memslap will collect enough get commands and
+pack and send the commands together.
+.sp
+Memslap supports both the ASCII protocol and binary protocol,
+but it runs on the ASCII protocol by default.
+Memslap by default runs on the TCP protocol, but it also
+supports UDP. Because UDP is unreliable, dropped packages and out\-of\-order
+packages may occur. Memslap creates a memory buffer to handle
+these problems. Memslap tries to read all the response data of
+one command from the server and reorders the response data. If some packages
+get lost, the waiting timeout mechanism can ensure half\-baked packages will
+be discarded and the next command will be sent.
+.SH USAGE
+.sp
+Below are some usage samples:
+.sp
+memslap \-s 127.0.0.1:11211 \-S 5s
+.sp
+memslap \-s 127.0.0.1:11211 \-t 2m \-v 0.2 \-e 0.05 \-b
+.sp
+memslap \-s 127.0.0.1:11211 \-F config \-t 2m \-w 40k \-S 20s \-o 0.2
+.sp
+memslap \-s 127.0.0.1:11211 \-F config \-t 2m \-T 4 \-c 128 \-d 20 \-P 40k
+.sp
+memslap \-s 127.0.0.1:11211 \-F config \-t 2m \-d 50 \-a \-n 40
+.sp
+memslap \-s 127.0.0.1:11211,127.0.0.1:11212 \-F config \-t 2m
+.sp
+memslap \-s 127.0.0.1:11211,127.0.0.1:11212 \-F config \-t 2m \-p 2
+.sp
+The user must specify one server at least to run memslap. The
+rest of the parameters have default values, as shown below:
+.sp
+Thread number = 1                    Concurrency = 16
+.sp
+Run time = 600 seconds                Configuration file = NULL
+.sp
+Key size = 64                         Value size = 1024
+.sp
+Get/set = 9:1                         Window size = 10k
+.sp
+Execute number = 0                   Single get = true
+.sp
+Multi\-get = false                      Number of sockets of each concurrency = 1
+.sp
+Reconnect = false                     Data verification = false
+.sp
+Expire\-time verification = false           ASCII protocol = true
+.sp
+Binary protocol = false                 Dumping statistic information
+.sp
+periodically = false
+.sp
+Overwrite proportion = 0%             UDP = false
+.sp
+TCP = true                           Limit throughput = false
+.sp
+Facebook test = false                  Replication test = false
+.SS Key size, value size and command distribution.
+.sp
+All the distributions are read from the configuration file specified by user
+with “—cfg_cmd” option. If the user does not specify a configuration file,
+memslap will run with the default distribution (key size = 64,
+value size = 1024, get/set = 9:1). For information on how to edit the
+configuration file, refer to the “Configuration File” section.
+.sp
+The minimum key size is 16 bytes; the maximum key size is 250 bytes. The
+precision of proportion is 0.001. The proportion of distribution will be
+rounded to 3 decimal places.
+.sp
+The minimum value size is 1 bytes; the maximum value size is 1M bytes. The
+precision of proportion is 0.001. The proportion of distribution will be
+rounded to 3 decimal places.
+Currently, memslap only supports set and get commands. And it
+supports 100% set and 100% get. For 100% get, it will preset some objects to
+the server.
+.SS Multi\-thread and concurrency
+.sp
+The high performance of memslap benefits from the special
+schedule of thread and concurrency. It’s important to specify the proper
+number of them. The default number of threads is 1; the default number of
+concurrency is 16. The user can use “—threads” and “\-\-concurrency” to
+specify these variables.
+.sp
+If the system supports setting CPU affinity and the number of threads
+specified by the user is greater than 1, memslap will try to
+bind each thread to a different CPU core. So if you want to get the best
+performance memslap, it is better to specify the number of
+thread equal to the number of CPU cores. The number of threads specified by
+the user can also be less or greater than the number of CPU cores. Because
+of the limitation of implementation, the number of concurrencies could be
+the multiple of the number of threads.
+.INDENT 0.0
+.IP 1. 3
+.
+For 8 CPU cores system
+.UNINDENT
+.sp
+For example:
+.sp
+\-\-threads=2 \-\-concurrency=128
+.sp
+\-\-threads=8 \-\-concurrency=128
+.sp
+\-\-threads=8 \-\-concurrency=256
+.sp
+\-\-threads=12 \-\-concurrency=144
+.INDENT 0.0
+.IP 2. 3
+.
+For 16 CPU cores system
+.UNINDENT
+.sp
+For example:
+.sp
+\-\-threads=8 \-\-concurrency=128
+.sp
+\-\-threads=16 \-\-concurrency=256
+.sp
+\-\-threads=16 \-\-concurrency=512
+.sp
+\-\-threads=24 \-\-concurrency=288
+.sp
+The memslap performs very well, when
+used to test the performance of memcached servers.
+Most of the time, the bottleneck is the network or
+the server. If for some reason the user wants to
+limit the performance of memslap, there
+are two ways to do this:
+.sp
+Decrease the number of threads and concurrencies.
+Use the option “\-\-tps” that memslap
+provides to limit the throughput. This option allows
+the user to get the expected throughput. For
+example, assume that the maximum throughput is 50
+kops/s for a specific configuration, you can specify
+the throughput equal to or less than the maximum
+throughput using “\-\-tps” option.
+.SS Window size
+.sp
+Most of the time, the user does not need to specify the window size. The
+default window size is 10k. For Schooner Memcached, the user can specify
+different window sizes to get different cache miss rates based on the test
+case. Memslap supports cache miss rate between 0% and 100%.
+If you use this utility to test the performance of Schooner Memcached, you
+can specify a proper window size to get the expected cache miss rate. The
+formula for calculating window size is as follows:
+.sp
+Assume that the key size is 128 bytes, and the value size is 2048 bytes, and
+concurrency=128.
+.sp
+1. Small cache cache_size=1M, 100% cache miss (all data get from SSD).
+win_size=10k
+.INDENT 0.0
+.IP 2. 3
+.
+cache_size=4G
+.UNINDENT
+.sp
+(1). cache miss rate 0%
+.sp
+win_size=8k
+.sp
+(2). cache miss rate 5%
+.sp
+win_size=11k
+.INDENT 0.0
+.IP 3. 3
+.
+cache_size=16G
+.UNINDENT
+.sp
+(1). cache miss rate 0%
+.sp
+win_size=32k
+.sp
+(2). cache miss
+.sp
+rate 5%
+.sp
+win_size=46k
+.sp
+The formula for calculating window size for cache miss rate 0%:
+.sp
+cache_size / concurrency / (key_size + value_size) * 0.5
+.sp
+The formula for calculating window size for cache miss rate 5%:
+.sp
+cache_size / concurrency / (key_size + value_size) * 0.7
+.SS Verification
+.sp
+Memslap supports both data verification and expire\-time
+verification. The user can use "\-\-verify=" or "\-v" to specify the proportion
+of data verification. In theory, it supports 100% data verification. The
+user can use "\-\-exp_verify=" or "\-e" to specify the proportion of
+expire\-time verification. In theory, it supports 100% expire\-time
+verification. Specify the "\-\-verbose" options to get more detailed error
+information.
+.sp
+For example: \-\-exp_verify=0.01 –verify=0.1 , it means that 1% of the objects
+set with expire\-time, 10% of the objects gotten will be verified. If the
+objects are gotten, memslap will verify the expire\-time and
+value.
+.SS multi\-servers and multi\-clients
+.sp
+Memslap supports multi\-servers based on self\-governed thread.
+There is a limitation that the number of servers cannot be greater than the
+number of threads. Memslap assigns one thread to handle one
+server at least. The user can use the "\-\-servers=" or "\-s" option to specify
+multi\-servers.
+.sp
+For example:
+.sp
+\-\-servers=10.1.1.1:11211,10.1.1.2:11212,10.1.1.3:11213 \-\-threads=6 \-\-concurrency=36
+.sp
+The above command means that there are 6 threads, with each thread having 6
+concurrencies and that threads 0 and 3 handle server 0 (10.1.1.1); threads 1
+and 4 handle server 1 (10.1.1.2); and thread 2 and 5 handle server 2
+(10.1.1.3).
+.sp
+All the threads and concurrencies in memslap are self\-governed.
+.sp
+So is memslap. The user can start up several
+memslap instances. The user can run memslap on different client
+machines to communicate with the same memcached server at the same. It is
+recommended that the user start different memslap on different
+machines using the same configuration.
+.SS Run with execute number mode or time mode
+.sp
+The default memslap runs with time mode. The default run time
+is 10 minutes. If it times out, memslap will exit. Do not
+specify both execute number mode and time mode at the same time; just
+specify one instead.
+.sp
+For example:
+.sp
+\-\-time=30s (It means the test will run 30 seconds.)
+.sp
+\-\-execute_number=100000 (It means that after running 100000 commands, the test will exit.)
+.SS Dump statistic information periodically.
+.sp
+The user can use "\-\-stat_freq=" or "\-S" to specify the frequency.
+.sp
+For example:
+.sp
+\-\-stat_freq=20s
+.sp
+Memslap will dump the statistics of the commands (get and set) at the frequency of every 20
+seconds.
+.sp
+For more information on the format of dumping statistic information, refer to “Format of Output” section.
+.SS Multi\-get
+.sp
+The user can use "\-\-division=" or "\-d" to specify multi\-get keys count.
+Memslap by default does single get with TCP. Memslap also supports data
+verification and expire\-time verification for multi\-get.
+.sp
+Memslap supports multi\-get with both TCP and UDP. Because of
+the different implementation of the ASCII protocol and binary protocol,
+there are some differences between the two. For the ASCII protocol,
+memslap sends one “multi\-get” to the server once. For the
+binary protocol, memslap sends several single get commands
+together as “multi\-get” to the server.
+.SS UDP and TCP
+.sp
+Memslap supports both UDP and TCP. For TCP,
+memslap does not reconnect the memcached server if socket connections are
+lost. If all the socket connections are lost or memcached server crashes,
+memslap will exit. If the user specifies the “\-\-reconnect”
+option when socket connections are lost, it will reconnect them.
+.sp
+User can use “\-\-udp” to enable the UDP feature, but UDP comes with some
+limitations:
+.sp
+UDP cannot set data more than 1400 bytes.
+.sp
+UDP is not supported by the binary protocol because the binary protocol of
+memcached does not support that.
+.sp
+UDP doesn’t support reconnection.
+.SS Facebook test
+.sp
+Set data with TCP and multi\-get with UDP. Specify the following options:
+.sp
+"\-\-facebook \-\-division=50"
+.sp
+If you want to create thousands of TCP connections, specify the
+.sp
+"\-\-conn_sock=" option.
+.sp
+For example: \-\-facebook \-\-division=50 \-\-conn_sock=200
+.sp
+The above command means that memslap will do facebook test,
+each concurrency has 200 socket TCP connections and one UDP socket.
+.sp
+Memslap sets objects with the TCP socket, and multi\-gets 50
+objects once with the UDP socket.
+.sp
+If you specify "\-\-division=50", the key size must be less that 25 bytes
+because the UDP packet size is 1400 bytes.
+.SS Replication test
+.sp
+For replication test, the user must specify at least two memcached servers.
+The user can use “—rep_write=” option to enable feature.
+.sp
+For example:
+.sp
+\-\-servers=10.1.1.1:11211,10.1.1.2:11212 –rep_write=2
+.sp
+The above command means that there are 2 replication memcached servers,
+memslap will set objects to both server 0 and server 1, get
+objects which are set to server 0 before from server 1, and also get objects
+which are set to server 1 before from server 0. If server 0 crashes,
+memslap will only get objects from server 1. If server 0 comes
+back to life again, memslap will reconnect server 0. If both
+server 0 and server 1 crash, memslap will exit.
+.SS Supports thousands of TCP connections
+.sp
+Start memslap with "\-\-conn_sock=" or "\-n" to enable this
+feature. Make sure that your system can support opening thousands of files
+and creating thousands of sockets. However, this feature does not support
+reconnection if sockets disconnect.
+.sp
+For example:
+.sp
+\-\-threads=8 \-\-concurrency=128 \-\-conn_sock=128
+.sp
+The above command means that memslap starts up 8 threads, each
+thread has 16 concurrencies, each concurrency has 128 TCP socket
+connections, and the total number of TCP socket connections is 128 * 128 =
+16384.
+.SS Supports binary protocol
+.sp
+Start memslap with "\-\-binary" or "\-B" options to enable this
+feature. It supports all the above features except UDP, because the latest
+memcached 1.3.3 does not implement binary UDP protocol.
+.sp
+For example:
+.sp
+\-\-binary
+.sp
+Since memcached 1.3.3 doesn\(aqt implement binary UDP protocol,
+memslap does not support UDP. In addition, memcached 1.3.3 does not support
+multi\-get. If you specify "\-\-division=50" option, it just sends 50 get
+commands together as “mulit\-get” to the server.
+.SH CONFIGURATION FILE
+.sp
+This section describes the format of the configuration file.  By default
+when no configuration file is specified memslap reads the default
+one located at ~/.memslap.cnf.
+.sp
+Below is a sample configuration file:
+.sp
+.nf
+.ft C
+***************************************************************************
+#comments should start with \(aq#\(aq
+#key
+#start_len end_len proportion
+#
+#key length range from start_len to end_len
+#start_len must be equal to or greater than 16
+#end_len must be equal to or less than 250
+#start_len must be equal to or greater than end_len
+#memslap will generate keys according to the key range
+#proportion: indicates keys generated from one range accounts for the total
+generated keys
+#
+#example1: key range 16~100 accounts for 80%
+#          key range 101~200 accounts for 10%
+#          key range 201~250 accounts for 10%
+#          total should be 1 (0.8+0.1+0.1 = 1)
+#
+#          16 100 0.8
+#          101 200 0.1
+#          201 249 0.1
+#
+#example2: all keys length are 128 bytes
+#
+#          128 128 1
+key
+128 128 1
+#value
+#start_len end_len proportion
+#
+#value length range from start_len to end_len
+#start_len must be equal to or greater than 1
+#end_len must be equal to or less than 1M
+#start_len must be equal to or greater than end_len
+#memslap will generate values according to the value range
+#proportion: indicates values generated from one range accounts for the
+total generated values
+#
+#example1: value range 1~1000 accounts for 80%
+#          value range 1001~10000 accounts for 10%
+#          value range 10001~100000 accounts for 10%
+#          total should be 1 (0.8+0.1+0.1 = 1)
+#
+#          1 1000 0.8
+#          1001 10000 0.1
+#          10001 100000 0.1
+#
+#example2: all value length are 128 bytes
+#
+#          128 128 1
+value
+2048 2048 1
+#cmd
+#cmd_type cmd_proportion
+#
+#currently memslap only supports get and set command.
+#
+#cmd_type
+#set     0
+#get     1
+#
+#example: set command accounts for 50%
+#         get command accounts for 50%
+#         total should be 1 (0.5+0.5 = 1)
+#
+#         cmd
+#         0    0.5
+#         1    0.5
+cmd
+0    0.1
+1.0 0.9
+.ft P
+.fi
+.SH FORMAT OF OUTPUT
+.sp
+At the beginning, memslap displays some configuration information as follows:
+.sp
+servers : 127.0.0.1:11211
+.sp
+threads count: 1
+.sp
+concurrency: 16
+.sp
+run time: 20s
+.sp
+windows size: 10k
+.sp
+set proportion: set_prop=0.10
+.sp
+get proportion: get_prop=0.90
+.SS Where
+.sp
+servers : "servers"
+.INDENT 0.0
+.INDENT 3.5
+.sp
+The servers used by memslap.
+.UNINDENT
+.UNINDENT
+.sp
+threads count
+.INDENT 0.0
+.INDENT 3.5
+.sp
+The number of threads memslap runs with.
+.UNINDENT
+.UNINDENT
+.sp
+concurrency
+.INDENT 0.0
+.INDENT 3.5
+.sp
+The number of concurrencies memslap runs with.
+.UNINDENT
+.UNINDENT
+.sp
+run time
+.INDENT 0.0
+.INDENT 3.5
+.sp
+How long to run memslap.
+.UNINDENT
+.UNINDENT
+.sp
+windows size
+.INDENT 0.0
+.INDENT 3.5
+.sp
+The task window size of each concurrency.
+.UNINDENT
+.UNINDENT
+.sp
+set proportion
+.INDENT 0.0
+.INDENT 3.5
+.sp
+The proportion of set command.
+.UNINDENT
+.UNINDENT
+.sp
+get proportion
+.INDENT 0.0
+.INDENT 3.5
+.sp
+The proportion of get command.
+.UNINDENT
+.UNINDENT
+.sp
+The output of dynamic statistics is something like this:
+.sp
+.nf
+.ft C
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+Get Statistics
+Type  Time(s)  Ops   TPS(ops/s)  Net(M/s)  Get_miss  Min(us)  Max(us)
+Avg(us)  Std_dev    Geo_dist
+Period   5   345826  69165     65.3      0         27      2198     203
+95.43      177.29
+Global  20  1257935  62896     71.8      0         26      3791     224
+117.79     192.60
+
+
+Set Statistics
+Type  Time(s)  Ops   TPS(ops/s)  Net(M/s)  Get_miss  Min(us)  Max(us)
+Avg(us)  Std_dev    Geo_dist
+Period   5    38425   7685      7.3       0         42      628     240
+88.05      220.21
+Global   20   139780  6989      8.0       0         37      3790    253
+117.93     224.83
+
+
+Total Statistics
+Type  Time(s)  Ops   TPS(ops/s)  Net(M/s)  Get_miss  Min(us)  Max(us)
+Avg(us)  Std_dev    Geo_dist
+Period   5   384252   76850     72.5      0        27      2198     207
+94.72      181.18
+Global  20  1397720   69886     79.7      0        26      3791     227
+117.93     195.60
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+.ft P
+.fi
+.SS Where
+.sp
+Get Statistics
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Statistics information of get command
+.UNINDENT
+.UNINDENT
+.sp
+Set Statistics
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Statistics information of set command
+.UNINDENT
+.UNINDENT
+.sp
+Total Statistics
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Statistics information of both get and set command
+.UNINDENT
+.UNINDENT
+.sp
+Period
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Result within a period
+.UNINDENT
+.UNINDENT
+.sp
+Global
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Accumulated results
+.UNINDENT
+.UNINDENT
+.sp
+Ops
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Total operations
+.UNINDENT
+.UNINDENT
+.sp
+TPS
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Throughput, operations/second
+.UNINDENT
+.UNINDENT
+.sp
+Net
+.INDENT 0.0
+.INDENT 3.5
+.sp
+The rate of network
+.UNINDENT
+.UNINDENT
+.sp
+Get_miss
+.INDENT 0.0
+.INDENT 3.5
+.sp
+How many objects can’t be gotten
+.UNINDENT
+.UNINDENT
+.sp
+Min
+.INDENT 0.0
+.INDENT 3.5
+.sp
+The minimum response time
+.UNINDENT
+.UNINDENT
+.sp
+Max
+.INDENT 0.0
+.INDENT 3.5
+.sp
+The maximum response time
+.UNINDENT
+.UNINDENT
+.sp
+Avg:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+The average response time
+.UNINDENT
+.UNINDENT
+.sp
+Std_dev
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Standard deviation of response time
+.UNINDENT
+.UNINDENT
+.sp
+Geo_dist
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Geometric distribution based on natural exponential function
+.UNINDENT
+.UNINDENT
+.sp
+At the end, memslap will output something like this:
+.sp
+.nf
+.ft C
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+Get Statistics (1257956 events)
+  Min:        26
+  Max:      3791
+  Avg:       224
+  Geo:    192.60
+  Std:    116.23
+                  Log2 Dist:
+                    4:        0       10    84490   215345
+                    8:   484890   459823    12543      824
+                   12:       31
+
+ Set Statistics (139782 events)
+    Min:        37
+    Max:      3790
+    Avg:       253
+    Geo:    224.84
+    Std:    116.83
+    Log2 Dist:
+      4:        0        0     4200 16988
+      8:    50784    65574 2064      167
+      12:        5
+
+  Total Statistics (1397738 events)
+      Min:        26
+      Max:      3791
+      Avg:       227
+      Geo:    195.60
+      Std:    116.60
+      Log2 Dist:
+        4:        0       10    88690   232333
+        8:   535674   525397    14607      991
+        12:       36
+
+cmd_get: 1257969
+cmd_set: 139785
+get_misses: 0
+verify_misses: 0
+verify_failed: 0
+expired_get: 0
+unexpired_unget: 0
+written_bytes: 242516030
+read_bytes: 1003702556
+object_bytes: 152086080
+packet_disorder: 0
+packet_drop: 0
+udp_timeout: 0
+
+Run time: 20.0s Ops: 1397754 TPS: 69817 Net_rate: 59.4M/s
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+.ft P
+.fi
+.SS Where
+.sp
+Get Statistics
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Get statistics of response time
+.UNINDENT
+.UNINDENT
+.sp
+Set Statistics
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Set statistics of response time
+.UNINDENT
+.UNINDENT
+.sp
+Total Statistics
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Both get and set statistics of response time
+.UNINDENT
+.UNINDENT
+.sp
+Min
+.INDENT 0.0
+.INDENT 3.5
+.sp
+The accumulated and minimum response time
+.UNINDENT
+.UNINDENT
+.sp
+Max
+.INDENT 0.0
+.INDENT 3.5
+.sp
+The accumulated and maximum response time
+.UNINDENT
+.UNINDENT
+.sp
+Avg
+.INDENT 0.0
+.INDENT 3.5
+.sp
+The accumulated and average response time
+.UNINDENT
+.UNINDENT
+.sp
+Std
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Standard deviation of response time
+.UNINDENT
+.UNINDENT
+.sp
+Log2 Dist
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Geometric distribution based on logarithm 2
+.UNINDENT
+.UNINDENT
+.sp
+cmd_get
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Total get commands done
+.UNINDENT
+.UNINDENT
+.sp
+cmd_set
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Total set commands done
+.UNINDENT
+.UNINDENT
+.sp
+get_misses
+.INDENT 0.0
+.INDENT 3.5
+.sp
+How many objects can’t be gotten from server
+.UNINDENT
+.UNINDENT
+.sp
+verify_misses
+.INDENT 0.0
+.INDENT 3.5
+.sp
+How many objects need to verify but can’t get them
+.UNINDENT
+.UNINDENT
+.sp
+verify_failed
+.INDENT 0.0
+.INDENT 3.5
+.sp
+How many objects with insistent value
+.UNINDENT
+.UNINDENT
+.sp
+expired_get
+.INDENT 0.0
+.INDENT 3.5
+.sp
+How many objects are expired but we get them
+.UNINDENT
+.UNINDENT
+.sp
+unexpired_unget
+.INDENT 0.0
+.INDENT 3.5
+.sp
+How many objects are unexpired but we can’t get them
+.UNINDENT
+.UNINDENT
+.sp
+written_bytes
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Total written bytes
+.UNINDENT
+.UNINDENT
+.sp
+read_bytes
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Total read bytes
+.UNINDENT
+.UNINDENT
+.sp
+object_bytes
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Total object bytes
+.UNINDENT
+.UNINDENT
+.sp
+packet_disorder
+.INDENT 0.0
+.INDENT 3.5
+.sp
+How many UDP packages are disorder
+.UNINDENT
+.UNINDENT
+.sp
+packet_drop
+.INDENT 0.0
+.INDENT 3.5
+.sp
+How many UDP packages are lost
+.UNINDENT
+.UNINDENT
+.sp
+udp_timeout
+.INDENT 0.0
+.INDENT 3.5
+.sp
+How many times UDP time out happen
+.UNINDENT
+.UNINDENT
+.sp
+Run time
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Total run time
+.UNINDENT
+.UNINDENT
+.sp
+Ops
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Total operations
+.UNINDENT
+.UNINDENT
+.sp
+TPS
+.INDENT 0.0
+.INDENT 3.5
+.sp
+Throughput, operations/second
+.UNINDENT
+.UNINDENT
+.sp
+Net_rate
+.INDENT 0.0
+.INDENT 3.5
+.sp
+The average rate of network
+.UNINDENT
+.UNINDENT
+.SH OPTIONS
+.INDENT 0.0
+.TP
+.B \-s, \-\-servers=
+.
+List one or more servers to connect. Servers count must be less than
+threads count. e.g.: \-\-servers=localhost:1234,localhost:11211
+.TP
+.B \-T, \-\-threads=
+.
+Number of threads to startup, better equal to CPU numbers. Default 8.
+.TP
+.B \-c, \-\-concurrency=
+.
+Number of concurrency to simulate with load. Default 128.
+.TP
+.B \-n, \-\-conn_sock=
+.
+Number of TCP socks per concurrency. Default 1.
+.TP
+.B \-x, \-\-execute_number=
+.
+Number of operations(get and set) to execute for the
+given test. Default 1000000.
+.TP
+.B \-t, \-\-time=
+.
+How long the test to run, suffix: s\-seconds, m\-minutes, h\-hours,
+d\-days e.g.: \-\-time=2h.
+.TP
+.B \-F, \-\-cfg_cmd=
+.
+Load the configure file to get command,key and value distribution list.
+.TP
+.B \-w, \-\-win_size=
+.
+Task window size of each concurrency, suffix: K, M e.g.: \-\-win_size=10k.
+Default 10k.
+.TP
+.B \-X, \-\-fixed_size=
+.
+Fixed length of value.
+.TP
+.B \-v, \-\-verify=
+.
+The proportion of date verification, e.g.: \-\-verify=0.01
+.TP
+.B \-d, \-\-division=
+.
+Number of keys to multi\-get once. Default 1, means single get.
+.TP
+.B \-S, \-\-stat_freq=
+.
+Frequency of dumping statistic information. suffix: s\-seconds,
+m\-minutes, e.g.: \-\-resp_freq=10s.
+.TP
+.B \-e, \-\-exp_verify=
+.
+The proportion of objects with expire time, e.g.: \-\-exp_verify=0.01.
+Default no object with expire time
+.TP
+.B \-o, \-\-overwrite=
+.
+The proportion of objects need overwrite, e.g.: \-\-overwrite=0.01.
+Default never overwrite object.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-R,  \-\-reconnect
+.
+Reconnect support, when connection is closed it will be reconnected.
+.TP
+.B \-U,  \-\-udp
+.
+UDP support, default memslap uses TCP, TCP port and UDP port of
+server must be same.
+.TP
+.B \-a,  \-\-facebook
+.
+Whether it enables facebook test feature, set with TCP and multi\-get with UDP.
+.TP
+.B \-B,  \-\-binary
+.
+Whether it enables binary protocol. Default with ASCII protocol.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-P, \-\-tps=
+.
+Expected throughput, suffix: K, e.g.: \-\-tps=10k.
+.TP
+.B \-p, \-\-rep_write=
+.
+The first nth servers can write data, e.g.: \-\-rep_write=2.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-b,  \-\-verbose
+.
+Whether it outputs detailed information when verification fails.
+.TP
+.B \-h,  \-\-help
+.
+Display this message and then exit.
+.TP
+.B \-V,  \-\-version
+.
+Display the version of the application and then exit.
+.UNINDENT
+.SH EXAMPLES
+.sp
+memslap \-s 127.0.0.1:11211 \-S 5s
+.sp
+memslap \-s 127.0.0.1:11211 \-t 2m \-v 0.2 \-e 0.05 \-b
+.sp
+memslap \-s 127.0.0.1:11211 \-F config \-t 2m \-w 40k \-S 20s \-o 0.2
+.sp
+memslap \-s 127.0.0.1:11211 \-F config \-t 2m \-T 4 \-c 128 \-d 20 \-P 40k
+.sp
+memslap \-s 127.0.0.1:11211 \-F config \-t 2m \-d 50 \-a \-n 40
+.sp
+memslap \-s 127.0.0.1:11211,127.0.0.1:11212 \-F config \-t 2m
+.sp
+memslap \-s 127.0.0.1:11211,127.0.0.1:11212 \-F config \-t 2m \-p 2
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://launchpad.org/libmemcached\fP
+.SH AUTHORS
+.sp
+Mingqiang Zhuang <\fI\%mingqiangzhuang@hengtiansoft.com\fP> (Schooner Technolgy)
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memstat.1 b/docs/man/memstat.1
new file mode 100644 (file)
index 0000000..1f3d0bc
--- /dev/null
@@ -0,0 +1,71 @@
+.TH "MEMSTAT" "1" "April 07, 2011" "0.47" "libmemcached"
+.SH NAME
+memstat \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructeredText.
+.
+.sp
+memstat \- Display the operating status of a single or group of memcached servers
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+memstat [options]
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+\fBmemstat\fP dumps the state of memcached(1) servers.
+It displays all data to stdout.
+.sp
+You can specify servers via the \fB\-\-servers\fP option or via the
+environment variable \fBMEMCACHED_SERVERS\fP. \fB\-\-args\fP can be used
+to specify the "argument" sent to the stats command (ie slab, size, items,
+etc..).
+.sp
+For a full list of operations run the tool with the \fB\-\-help\fP option.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://launchpad.org/libmemcached\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Mark Atwood, <\fI\%mark@fallenpegasus.com\fP>
+.SH SEE ALSO
+.sp
+memcached(1) libmemcached(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker
+.\" Generated by docutils manpage writer.
+.\" 
+.
index 28f7f7491b583138633681128bdd1fc1ac59afad..da30e1414373455bf2687f4d215a633665909545 100644 (file)
@@ -24,7 +24,7 @@ SYNOPSIS
 
 .. code-block:: perl
 
-   #include <memcached.h>
+   #include <libmemcached/memcached.h>
  
    memcached_analysis_st *
      memcached_analyze (memcached_st *ptr,
index 0e510a2257b0f713fb877058964800dc913a31b5..d92f1f882583ec79de018ec8c701f4195287e422 100644 (file)
@@ -24,7 +24,7 @@ SYNOPSIS
 
 .. code-block:: perl
 
-   #include <memcached.h>
+   #include <libmemcached/memcached.h>
  
    memcached_return_t
      memcached_increment (memcached_st *ptr, 
index 1bfcf7205def9a31d6775e56365d1e7969817bf3..cc4cf687da00c88bc0a5cae3bb13baa7346dec3a 100644 (file)
@@ -24,7 +24,7 @@ SYNOPSIS
 
 .. code-block:: perl
 
-   #include <memcached.h>
+   #include <libmemcached/memcached.h>
  
    uint64_t
      memcached_behavior_get (memcached_st *ptr,
index ff1f02876c8833dfa686a134ef9d57e7fd4c961c..43708b695c424740c224478d54dcfa86f3f5977b 100644 (file)
@@ -24,7 +24,7 @@ SYNOPSIS
 
 .. code-block:: perl
 
-   #include <memcached.h>
+   #include <libmemcached/memcached.h>
  
    memcached_return_t 
      memcached_callback_set (memcached_st *ptr, 
index b8cf3715834d7a68e09fd7194cc0bc693d72352e..1beff43c507d6274d4a6c919d1dc98643c484a1c 100644 (file)
@@ -24,7 +24,7 @@ SYNOPSIS
 
 .. code-block:: perl
 
-   #include <memcached.h>
+   #include <libmemcached/memcached.h>
  
    memcached_st *memcached_create (memcached_st *ptr);
  
index 9d9d77840ba019d0efc908aa37e32855a7ddecbb..dcec549f633538d86e4eb195004f4eb6328f82be 100644 (file)
@@ -24,7 +24,7 @@ SYNOPSIS
 
 .. code-block:: perl
 
-   #include <memcached.h>
+   #include <libmemcached/memcached.h>
  
    memcached_return_t
      memcached_delete (memcached_st *ptr,
index ab63c7ef51b4a2e46ac4359616c78c3c25c12581..59bd7d546e86a38c941567b7af2863014ea58713 100644 (file)
@@ -24,7 +24,7 @@ SYNOPSIS
 
 .. code-block:: perl
 
-   #include <memcached.h>
+   #include <libmemcached/memcached.h>
  
    memcached_return_t
      memcached_dump (memcached_st *ptr, 
index 8cd66f763b85c363c375611c50238234f90fff54..41ca369620863ef2a9c09439c7c39ac0cb8c0689 100644 (file)
@@ -24,7 +24,7 @@ SYNOPSIS
 
 .. code-block:: perl
 
-   #include <memcached.h>
+   #include <libmemcached/memcached.h>
  
    memcached_return_t
      memcached_flush (memcached_st *ptr,
index eef1a07f6774060d103e0dd38c61e6e7938fda36..e2067c157724a2fa3d54831f0e5e92a71e08959e 100644 (file)
@@ -24,7 +24,7 @@ SYNOPSIS
 
 .. code-block:: perl
 
-   #include <memcached.h>
+   #include <libmemcached/memcached.h>
  
    memcached_return_t
      memcached_flush_buffers (memcached_st *ptr);
index 8b75a4a84a648ab785eec8fe2b3ec47f7c09ac3f..0cefabb54ce65555378604da5b64e8f5683880f7 100644 (file)
@@ -24,7 +24,7 @@ SYNOPSIS
 
 .. code-block:: perl
 
-   #include <memcached.h>
+   #include <libmemcached/memcached.h>
  
    uint32_t
      memcached_generate_hash_value (const char *key,
index 0aeb7d31f48fac3c0d2a27177a1136238a688c7e..27ec765c9c1839197f7582b0d33ba8445a439793 100644 (file)
@@ -24,7 +24,7 @@ SYNOPSIS
 
 .. code-block:: perl
 
-   #include <memcached.h>
+   #include <libmemcached/memcached.h>
  
    memcached_result_st *
      memcached_fetch_result (memcached_st *ptr,
index 190fbb94f65740d354daaeddaacd58714eeb24d1..5de7fb67db8336c27d9c86e8a9074344ae930572 100644 (file)
@@ -24,7 +24,7 @@ SYNOPSIS
 
 .. code-block:: perl
 
-   #include <memcached.h>
+   #include <libmemcached/memcached.h>
  
    memcached_return_t
      memcached_set_memory_allocators (memcached_st *ptr,
index aedcac428fce7600c376cb64b19a8bac89f7b385..974f4a50069f36459e9df776c9070ef38e379e3b 100644 (file)
@@ -24,7 +24,7 @@ SYNOPSIS
 
 .. code-block:: perl
 
-   #include <memcached.h>
+   #include <libmemcached/memcached.h>
  
    void memcached_quit (memcached_st *ptr);
 
index 7c3c6d9cc8d3458d1c14bd542620ac542c3045bb..7eba66da85c59f67a9ed9c97cc68a2b0031b1c3e 100644 (file)
@@ -24,7 +24,7 @@ SYNOPSIS
 
 .. code-block:: perl
 
-   #include <memcached.h>
+   #include <libmemcached/memcached.h>
  
    memcached_result_st *
      memcached_result_create (memcached_st *ptr,
index 1d1993bcc9597e6e551bfdf417809e407fa20132..3e3b7789e79c92688f008214caadc97d1685f0ba 100644 (file)
@@ -24,7 +24,7 @@ SYNOPSIS
 
 .. code-block:: perl
 
-   #include <memcached.h>
+   #include <libmemcached/memcached.h>
  
    void memcached_set_sasl_callbacks(memcached_st *ptr,
                                      const sasl_callback_t *callbacks)
index c45abbb2b818c16de70dbefbd3ef480b8c52d072..67f4f3c1dcd32e10622480634dc4851025758361 100644 (file)
@@ -24,7 +24,7 @@ SYNOPSIS
 
 .. code-block:: perl
 
-   #include <memcached.h>
+   #include <libmemcached/memcached.h>
  
    const memcached_server_instance_st
      memcached_server_list (memcached_st *ptr);
index 928956a2f4cf84d8833d20681b87a72ae71a96c2..d7aa521dfcee33ad058580756f3ca38266c7d01d 100644 (file)
@@ -24,7 +24,7 @@ SYNOPSIS
 
 .. code-block:: perl
 
-   #include <memcached.h>
+   #include <libmemcached/memcached.h>
  
    uint32_t memcached_server_count (memcached_st *ptr);
  
index a02a032f14c315879233e83774c714339578cf0b..d0dbbd267c652476568c4011415e366673b9c7d6 100644 (file)
@@ -24,7 +24,7 @@ SYNOPSIS
 
 .. code-block:: perl
 
-   #include <memcached.h>
+   #include <libmemcached/memcached.h>
  
    memcached_return_t
      memcached_set (memcached_st *ptr,
index 7fd47232e071b6929303fd34ca2935085755d6c8..ee5103e73db8c157f5332ac59d89bdd83a27e937 100644 (file)
@@ -24,7 +24,7 @@ SYNOPSIS
 
 .. code-block:: perl
 
-   #include <memcached.h>
+   #include <libmemcached/memcached.h>
  
    memcached_stat_st *memcached_stat (memcached_st *ptr,
                                       char *args,
index b13458cfcba0a2f478997b657b8b675c3bd9fc25..7848a59c567f96346755c19da8b22fe1641512d3 100644 (file)
@@ -24,7 +24,7 @@ SYNOPSIS
 
 .. code-block:: perl
 
-   #include <memcached.h>
+   #include <libmemcached/memcached.h>
  
    const char *
      memcached_strerror (memcached_st *ptr,
index cf990e6cbe7f6de33ca01bd0803e07fd9e3128bd..1fd9d334938fb753621c14f8a11fe4c962d8e8c4 100644 (file)
@@ -24,7 +24,7 @@ SYNOPSIS
 
 .. code-block:: perl
 
-   #include <memcached.h>
+   #include <libmemcached/memcached.h>
  
    void *memcached_get_user_data (memcached_st *ptr);
  
index 0f41094e5e4bffbb025fe0c29688a2c79596e9fc..c040924417be3153204f097511189552f438224e 100644 (file)
@@ -24,7 +24,7 @@ SYNOPSIS
 
 .. code-block:: perl
 
-   #include <memcached.h>
+   #include <libmemcached/memcached.h>
  
    memcached_return_t 
      memcached_verbosity (memcached_st *ptr,
index 26f3b27893bd827720b44ab926b087904927328b..334e09be3aa7837509bbc864c98aeddedfbaf051 100644 (file)
@@ -24,7 +24,7 @@ SYNOPSIS
 
 .. code-block:: perl
 
-   #include <memcached.h>
+   #include <libmemcached/memcached.h>
  
    const char *
      memcached_lib_version (void) 
diff --git a/libmemcached/error.c b/libmemcached/error.c
deleted file mode 100644 (file)
index 357fda8..0000000
+++ /dev/null
@@ -1,199 +0,0 @@
-/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
- * 
- *  LibMemcached
- *
- *  Copyright (C) 2011 Data Differential, http://datadifferential.com/
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are
- *  met:
- *
- *      * Redistributions of source code must retain the above copyright
- *  notice, this list of conditions and the following disclaimer.
- *
- *      * Redistributions in binary form must reproduce the above
- *  copyright notice, this list of conditions and the following disclaimer
- *  in the documentation and/or other materials provided with the
- *  distribution.
- *
- *      * The names of its contributors may not be used to endorse or
- *  promote products derived from this software without specific prior
- *  written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#include "libmemcached/common.h"
-
-struct memcached_error_st
-{
-  memcached_st *root;
-  uint64_t query_id;
-  struct memcached_error_st *next;
-  memcached_return_t rc;
-  int local_errno;
-  size_t size;
-  char c_str[];
-};
-
-static void _set(memcached_st *memc, memcached_string_t *str, const memcached_return_t rc, const int local_errno)
-{
-  WATCHPOINT_ASSERT(memc);
-  if (! memc)
-    return;
-
-  if (memc->error_messages && memc->error_messages->query_id != memc->query_id)
-  {
-    memcached_error_free(memc);
-  }
-
-  memcached_error_st *error;
-  error= (struct memcached_error_st *)libmemcached_malloc(memc, sizeof(struct memcached_error_st) +(str ? str->size :0) +1); 
-
-  if (! error)
-    return;
-
-  error->root= memc;
-  error->query_id= memc->query_id;
-  error->rc= rc;
-  error->local_errno= local_errno;
-
-  if (str)
-  {
-    error->size= str->size;
-    memcpy(error->c_str, str->c_str, str->size);
-    error->c_str[str->size]= 0;
-  }
-  else
-  {
-    error->size= 0;
-  }
-
-  error->next= memc->error_messages;
-  memc->error_messages= error;
-}
-
-memcached_return_t memcached_set_error_string(memcached_st *memc, memcached_return_t rc, const char *str, size_t length)
-{
-  memcached_string_t tmp;
-  tmp.c_str= str;
-  tmp.size= length;
-  return memcached_set_error(memc, rc, &tmp);
-}
-
-memcached_return_t memcached_set_error(memcached_st *memc, memcached_return_t rc, memcached_string_t *str)
-{
-  if (rc == MEMCACHED_SUCCESS)
-    return MEMCACHED_SUCCESS;
-
-  _set(memc, str, rc, 0);
-
-  return rc;
-}
-
-memcached_return_t memcached_set_errno(memcached_st *memc, int local_errno, memcached_string_t *str)
-{
-  _set(memc, str, MEMCACHED_ERRNO, local_errno);
-
-  return MEMCACHED_ERRNO;
-}
-
-static void _error_print(const memcached_error_st *error)
-{
-  if (! error)
-    return;
-
-  if (! error->size)
-  {
-    fprintf(stderr, "%s\n", memcached_strerror(NULL, error->rc) );
-  }
-  else
-  {
-    fprintf(stderr, "%s %s\n", memcached_strerror(NULL, error->rc), error->c_str);
-  }
-
-  _error_print(error->next);
-}
-
-void memcached_error_print(const memcached_st *self)
-{
-  if (! self)
-    return;
-
-  _error_print(self->error_messages);
-}
-
-static void _error_free(memcached_error_st *error)
-{
-  if (! error)
-    return;
-
-  _error_free(error->next);
-
-  if (error && error->root)
-  {
-    libmemcached_free(error->root, error);
-  }
-  else if (error)
-  {
-    free(error);
-  }
-}
-
-void memcached_error_free(memcached_st *self)
-{
-  if (! self)
-    return;
-
-  _error_free(self->error_messages);
-}
-
-const char *memcached_last_error_message(memcached_st *memc)
-{
-  if (! memc)
-    return memcached_strerror(memc, MEMCACHED_INVALID_ARGUMENTS);
-
-  if (! memc->error_messages)
-    return memcached_strerror(memc, MEMCACHED_SUCCESS);
-
-  if (! memc->error_messages->size)
-  {
-    return memcached_strerror(memc, memc->error_messages->rc);
-  }
-
-  return memc->error_messages->c_str;
-}
-
-memcached_return_t memcached_last_error(memcached_st *memc)
-{
-  if (! memc)
-    return MEMCACHED_INVALID_ARGUMENTS;
-
-  if (! memc->error_messages)
-    return MEMCACHED_SUCCESS;
-
-  return memc->error_messages->rc;
-}
-
-int memcached_last_error_errno(memcached_st *memc)
-{
-  if (! memc)
-    return 0;
-
-  if (! memc->error_messages)
-    return 0;
-
-  return memc->error_messages->local_errno;
-}
diff --git a/libmemcached/error.cc b/libmemcached/error.cc
new file mode 100644 (file)
index 0000000..ef207a9
--- /dev/null
@@ -0,0 +1,201 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  LibMemcached
+ *
+ *  Copyright (C) 2011 Data Differential, http://datadifferential.com/
+ *  All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *      * Redistributions of source code must retain the above copyright
+ *  notice, this list of conditions and the following disclaimer.
+ *
+ *      * Redistributions in binary form must reproduce the above
+ *  copyright notice, this list of conditions and the following disclaimer
+ *  in the documentation and/or other materials provided with the
+ *  distribution.
+ *
+ *      * The names of its contributors may not be used to endorse or
+ *  promote products derived from this software without specific prior
+ *  written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include "libmemcached/common.h"
+
+#define MAX_ERROR_LENGTH 2048
+struct memcached_error_t
+{
+  memcached_st *root;
+  uint64_t query_id;
+  struct memcached_error_t *next;
+  memcached_return_t rc;
+  int local_errno;
+  size_t size;
+  char message[MAX_ERROR_LENGTH];
+};
+
+static void _set(memcached_st *memc, memcached_string_t *str, const memcached_return_t rc, const int local_errno)
+{
+  WATCHPOINT_ASSERT(memc);
+  if (! memc)
+    return;
+
+  if (memc->error_messages && memc->error_messages->query_id != memc->query_id)
+  {
+    memcached_error_free(memc);
+  }
+
+  memcached_error_t *error;
+  error= (struct memcached_error_t *)libmemcached_malloc(memc, sizeof(struct memcached_error_t));
+
+  if (! error)
+    return;
+
+  error->root= memc;
+  error->query_id= memc->query_id;
+  error->rc= rc;
+  error->local_errno= local_errno;
+
+  if (str)
+  {
+    size_t length= str->size > (size_t)MAX_ERROR_LENGTH ? MAX_ERROR_LENGTH : str->size;
+    error->size= length;
+    memcpy(error->message, str->c_str, error->size);
+    error->message[error->size]= 0;
+  }
+  else
+  {
+    error->size= 0;
+  }
+
+  error->next= memc->error_messages;
+  memc->error_messages= error;
+}
+
+memcached_return_t memcached_set_error_string(memcached_st *memc, memcached_return_t rc, const char *str, size_t length)
+{
+  memcached_string_t tmp;
+  tmp.c_str= str;
+  tmp.size= length;
+  return memcached_set_error(memc, rc, &tmp);
+}
+
+memcached_return_t memcached_set_error(memcached_st *memc, memcached_return_t rc, memcached_string_t *str)
+{
+  if (rc == MEMCACHED_SUCCESS)
+    return MEMCACHED_SUCCESS;
+
+  _set(memc, str, rc, 0);
+
+  return rc;
+}
+
+memcached_return_t memcached_set_errno(memcached_st *memc, int local_errno, memcached_string_t *str)
+{
+  _set(memc, str, MEMCACHED_ERRNO, local_errno);
+
+  return MEMCACHED_ERRNO;
+}
+
+static void _error_print(const memcached_error_t *error)
+{
+  if (! error)
+    return;
+
+  if (! error->size)
+  {
+    fprintf(stderr, "%s\n", memcached_strerror(NULL, error->rc) );
+  }
+  else
+  {
+    fprintf(stderr, "%s %s\n", memcached_strerror(NULL, error->rc), error->message);
+  }
+
+  _error_print(error->next);
+}
+
+void memcached_error_print(const memcached_st *self)
+{
+  if (! self)
+    return;
+
+  _error_print(self->error_messages);
+}
+
+static void _error_free(memcached_error_t *error)
+{
+  if (! error)
+    return;
+
+  _error_free(error->next);
+
+  if (error && error->root)
+  {
+    libmemcached_free(error->root, error);
+  }
+  else if (error)
+  {
+    free(error);
+  }
+}
+
+void memcached_error_free(memcached_st *self)
+{
+  if (! self)
+    return;
+
+  _error_free(self->error_messages);
+}
+
+const char *memcached_last_error_message(memcached_st *memc)
+{
+  if (! memc)
+    return memcached_strerror(memc, MEMCACHED_INVALID_ARGUMENTS);
+
+  if (! memc->error_messages)
+    return memcached_strerror(memc, MEMCACHED_SUCCESS);
+
+  if (! memc->error_messages->size)
+  {
+    return memcached_strerror(memc, memc->error_messages->rc);
+  }
+
+  return memc->error_messages->message;
+}
+
+memcached_return_t memcached_last_error(memcached_st *memc)
+{
+  if (! memc)
+    return MEMCACHED_INVALID_ARGUMENTS;
+
+  if (! memc->error_messages)
+    return MEMCACHED_SUCCESS;
+
+  return memc->error_messages->rc;
+}
+
+int memcached_last_error_errno(memcached_st *memc)
+{
+  if (! memc)
+    return 0;
+
+  if (! memc->error_messages)
+    return 0;
+
+  return memc->error_messages->local_errno;
+}
index b10f05afba8869e7b439342b1cdaa67f8765cd43..5a4b8b09ed0fd9cdb8e073af0f12272b69b024d5 100644 (file)
@@ -92,7 +92,7 @@ libmemcached_libmemcachedcallbacks_la_SOURCES = libmemcached/callback.c
 # These symbols will not be exposed in the shipped .so
 noinst_LTLIBRARIES+= libmemcached/libmemcachedinternal.la
 libmemcached_libmemcachedinternal_la_SOURCES= \
-                                             libmemcached/error.c \
+                                             libmemcached/error.cc \
                                              libmemcached/string.c
 
 lib_LTLIBRARIES+= libmemcached/libmemcached.la
index e3817892139f3afcc784dfedeaca669026219b49..adf55e216464e09ad51e757f30bd681a31a73810 100644 (file)
@@ -156,7 +156,7 @@ struct memcached_st {
   memcached_trigger_delete_key_fn delete_trigger;
   memcached_callback_st *callbacks;
   struct memcached_sasl_st sasl;
-  struct memcached_error_st *error_messages;
+  struct memcached_error_t *error_messages;
   struct memcached_array_st *prefix_key;
   struct {
     struct memcached_array_st *filename;
index 0a27be982646889261dc69530cc70b85d1f7ad59..85fb8502afc88747568079f8dfa2ba3538d150d1 100644 (file)
@@ -47,13 +47,13 @@ LIBMEMCACHED_API
 LIBMEMCACHED_API
   memcached_return_t memcached_parse_configuration(memcached_st *ptr, const char *option_string, size_t length);
 
-LIBMEMCACHED_API
-  memcached_return_t memcached_parse_configure_file(memcached_st *ptr, const char *filename, size_t filename_length);
-
 LIBMEMCACHED_API
   void memcached_set_configuration_file(memcached_st *self, const char *filename, size_t filename_length);
 
-LIBMEMCACHED_API
+LIBMEMCACHED_LOCAL
+  memcached_return_t memcached_parse_configure_file(memcached_st *ptr, const char *filename, size_t filename_length);
+
+LIBMEMCACHED_LOCAL
   const char *memcached_parse_filename(memcached_st *memc);
 
 LIBMEMCACHED_LOCAL
index 89c1203bcbd6e96cd6acb8dbe179d183c1ea0a91..2ebb8c00eb707d57b0e3e0faefa74f2fe030d6af 100644 (file)
@@ -17,7 +17,7 @@ typedef struct memcached_stat_st memcached_stat_st;
 typedef struct memcached_analysis_st memcached_analysis_st;
 typedef struct memcached_result_st memcached_result_st;
 typedef struct memcached_array_st memcached_array_st;
-typedef struct memcached_error_st memcached_error_st;
+typedef struct memcached_error_t memcached_error_t;
 
 // All of the flavors of memcache_server_st
 typedef struct memcached_server_st memcached_server_st;
index c7b7dc09cd82e832d3d1e52ee4322638ea1b079f..b4c9f0588ca15fd2d5882a76fc8184a893253138 100644 (file)
@@ -336,8 +336,8 @@ test_return_t memcached_parse_configure_file_test(memcached_st*)
 
   test_true(memc_ptr);
 
-  memcached_return_t rc= memcached_parse_configure_file(memc_ptr, memcached_string_with_size(SUPPORT_EXAMPLE_CNF));
-  test_true_got(rc == MEMCACHED_SUCCESS, memcached_last_error_message(memc_ptr) ? memcached_last_error_message(memc_ptr) : memcached_strerror(NULL, rc));
+  memcached_set_configuration_file(memc_ptr, memcached_string_with_size(SUPPORT_EXAMPLE_CNF));
+  memcached_reset(memc_ptr);
   memcached_free(memc_ptr);
 
   return TEST_SUCCESS;
index 827d0f2ca15212dbd938adff635d09c52198aa6a..35d6eb41f259936f309358e411e0712923e4fed9 100644 (file)
@@ -160,8 +160,6 @@ test_return_t string_alloc_append_multiple(memcached_st *memc)
   memcached_string_append(error_string, memcached_string_make_from_cstr(memcached_strerror(NULL, MEMCACHED_SUCCESS)));
   memcached_string_append(error_string, memcached_string_with_size(")"));
 
-  memcached_set_error_string(memc, MEMCACHED_FAILURE, memcached_string_value(error_string), memcached_string_length(error_string));
-
   memcached_string_free(error_string);
 
   return TEST_SUCCESS;