Merge in all of build.
authorBrian Aker <brian@tangent.org>
Sun, 10 Apr 2011 16:41:51 +0000 (09:41 -0700)
committerBrian Aker <brian@tangent.org>
Sun, 10 Apr 2011 16:41:51 +0000 (09:41 -0700)
274 files changed:
.bzrignore
.quickly
ChangeLog
Makefile.am
config/pandora-plugin
configure.ac
docs/Makefile.am [deleted file]
docs/conf.py [new file with mode: 0644]
docs/hashkit_create.pod [deleted file]
docs/hashkit_create.rst [new file with mode: 0644]
docs/hashkit_functions.pod [deleted file]
docs/hashkit_functions.rst [new file with mode: 0644]
docs/hashkit_value.pod [deleted file]
docs/hashkit_value.rst [new file with mode: 0644]
docs/include.am [new file with mode: 0644]
docs/index.rst [new file with mode: 0644]
docs/libhashkit.rst [new file with mode: 0644]
docs/libmemcached.pod [deleted file]
docs/libmemcached.rst [new file with mode: 0644]
docs/libmemcached_configuration.rst [new file with mode: 0644]
docs/libmemcached_examples.pod [deleted file]
docs/libmemcached_examples.rst [new file with mode: 0644]
docs/libmemcachedutil.pod [deleted file]
docs/libmemcachedutil.rst [new file with mode: 0644]
docs/make_index.pl [deleted file]
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/libhashkit.3 [new file with mode: 0644]
docs/man/libmemcached.3 [new file with mode: 0644]
docs/man/libmemcached_check_configuration.3 [new file with mode: 0644]
docs/man/libmemcached_configuration.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/memaslap.1 [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_create_with_options.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.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/memaslap.pod [deleted file]
docs/memaslap.rst [new file with mode: 0644]
docs/memcached_analyze.pod [deleted file]
docs/memcached_analyze.rst [new file with mode: 0644]
docs/memcached_auto.pod [deleted file]
docs/memcached_auto.rst [new file with mode: 0644]
docs/memcached_behavior.pod [deleted file]
docs/memcached_behavior.rst [new file with mode: 0644]
docs/memcached_callback.pod [deleted file]
docs/memcached_callback.rst [new file with mode: 0644]
docs/memcached_create.pod [deleted file]
docs/memcached_create.rst [new file with mode: 0644]
docs/memcached_delete.pod [deleted file]
docs/memcached_delete.rst [new file with mode: 0644]
docs/memcached_dump.pod [deleted file]
docs/memcached_dump.rst [new file with mode: 0644]
docs/memcached_flush.pod [deleted file]
docs/memcached_flush.rst [new file with mode: 0644]
docs/memcached_flush_buffers.pod [deleted file]
docs/memcached_flush_buffers.rst [new file with mode: 0644]
docs/memcached_generate_hash_value.pod [deleted file]
docs/memcached_generate_hash_value.rst [new file with mode: 0644]
docs/memcached_get.pod [deleted file]
docs/memcached_get.rst [new file with mode: 0644]
docs/memcached_memory_allocators.pod [deleted file]
docs/memcached_memory_allocators.rst [new file with mode: 0644]
docs/memcached_pool.pod [deleted file]
docs/memcached_pool.rst [new file with mode: 0644]
docs/memcached_quit.pod [deleted file]
docs/memcached_quit.rst [new file with mode: 0644]
docs/memcached_result_st.pod [deleted file]
docs/memcached_result_st.rst [new file with mode: 0644]
docs/memcached_sasl.pod [deleted file]
docs/memcached_sasl.rst [new file with mode: 0644]
docs/memcached_server_st.pod [deleted file]
docs/memcached_server_st.rst [new file with mode: 0644]
docs/memcached_servers.pod [deleted file]
docs/memcached_servers.rst [new file with mode: 0644]
docs/memcached_set.pod [deleted file]
docs/memcached_set.rst [new file with mode: 0644]
docs/memcached_stats.pod [deleted file]
docs/memcached_stats.rst [new file with mode: 0644]
docs/memcached_strerror.pod [deleted file]
docs/memcached_strerror.rst [new file with mode: 0644]
docs/memcached_user_data.pod [deleted file]
docs/memcached_user_data.rst [new file with mode: 0644]
docs/memcached_verbosity.pod [deleted file]
docs/memcached_verbosity.rst [new file with mode: 0644]
docs/memcached_version.pod [deleted file]
docs/memcached_version.rst [new file with mode: 0644]
docs/memcapable.pod [deleted file]
docs/memcapable.rst [new file with mode: 0644]
docs/memcat.pod [deleted file]
docs/memcat.rst [new file with mode: 0644]
docs/memcp.pod [deleted file]
docs/memcp.rst [new file with mode: 0644]
docs/memdump.pod [deleted file]
docs/memdump.rst [new file with mode: 0644]
docs/memerror.pod [deleted file]
docs/memerror.rst [new file with mode: 0644]
docs/memflush.pod [deleted file]
docs/memflush.rst [new file with mode: 0644]
docs/memrm.pod [deleted file]
docs/memrm.rst [new file with mode: 0644]
docs/memslap.pod [deleted file]
docs/memslap.rst [new file with mode: 0644]
docs/memstat.pod [deleted file]
docs/memstat.rst [new file with mode: 0644]
libmemcached/behavior.c
libmemcached/common.h
libmemcached/constants.h
libmemcached/delete.c
libmemcached/dump.c
libmemcached/error.c [deleted file]
libmemcached/error.cc [new file with mode: 0644]
libmemcached/error.h
libmemcached/flush.c
libmemcached/get.c
libmemcached/hosts.c
libmemcached/include.am
libmemcached/initialize_query.cc [new file with mode: 0644]
libmemcached/initialize_query.h [new file with mode: 0644]
libmemcached/memcached.c
libmemcached/memcached.h
libmemcached/options.h
libmemcached/options/build.cc [deleted file]
libmemcached/options/build.h [deleted file]
libmemcached/options/context.h
libmemcached/options/include.am
libmemcached/options/parser.cc
libmemcached/options/parser.h
libmemcached/options/scanner.cc
libmemcached/options/scanner.h
libmemcached/quit.c
libmemcached/quit.h
libmemcached/server.c
libmemcached/stats.c
libmemcached/storage.c
libmemcached/types.h
libtest/server.c
m4/pandora_canonical.m4
m4/pandora_cinttypes.m4
m4/pandora_cstdint.m4
m4/pandora_have_libaio.m4 [new file with mode: 0644]
m4/pandora_have_libboost_filesystem.m4
m4/pandora_have_libboost_test.m4 [new file with mode: 0644]
m4/pandora_have_libhaildb.m4
m4/pandora_have_libuuid.m4
m4/pandora_plugins.m4
m4/pandora_stl_hash.m4
m4/pandora_vc_build.m4
m4/pandora_visibility.m4
m4/pandora_warnings.m4
m4/pandora_with_valgrind.m4 [new file with mode: 0644]
m4/pod2man.m4 [deleted file]
m4/podchecker.m4 [deleted file]
support/libmemcached-fc.spec.in
support/libmemcached.spec.in
tests/mem_functions.c
tests/parser.cc
tests/parser.h
tests/string.cc

index 1fe320b9ad0517d2e267e4a210d81fd70b274667..78b001ef0eb69e8858a4164399d5c8a43f8f1716 100644 (file)
@@ -48,24 +48,9 @@ config/top.h
 configure
 docs/*.[13]
 docs/*.html
-docs/pod2htmd.tmp
-docs/pod2htmi.tmp
+docs/doctest/
+docs/doctrees/
 example/memcached_light
-hashkit_clone.pop
-hashkit_crc32.pop
-hashkit_create.pop
-hashkit_fnv1_32.pop
-hashkit_fnv1_64.pop
-hashkit_fnv1a_32.pop
-hashkit_fnv1a_64.pop
-hashkit_free.pop
-hashkit_functions.pop
-hashkit_hsieh.pop
-hashkit_is_allocated.pop
-hashkit_jenkins.pop
-hashkit_md5.pop
-hashkit_murmur.pop
-hashkit_value.pop
 libhashkit/configure.h
 libmemcached-*.tar.gz
 libmemcached-0.30-1.src.rpm
@@ -75,106 +60,19 @@ libmemcached-0.31-1.x86_64.rpm
 libmemcached-0.37-1.src.rpm
 libmemcached-0.37-1.x86_64.rpm
 libmemcached-?.??/
-libmemcached.pop
 libmemcached/configure.h
 libmemcached/dtrace_probes.h
 libmemcached/generated_probes.h
 libmemcached/memcached_configure.h
-libmemcached_examples.pop
-libmemcachedutil.pop
 libtool
 libtool.m4
 ltoptions.m4
 ltsugar.m4
 ltversion.m4
 lt~obsolete.m4
-memcached_add.pop
-memcached_add_by_key.pop
-memcached_analyze.pop
-memcached_append.pop
-memcached_append_by_key.pop
-memcached_behavior_get.pop
-memcached_behavior_set.pop
-memcached_callback_get.pop
-memcached_callback_set.pop
-memcached_cas.pop
-memcached_cas_by_key.pop
-memcached_clone.pop
-memcached_create.pop
-memcached_decrement.pop
-memcached_decrement_with_initial.pop
-memcached_delete.pop
-memcached_delete_by_key.pop
-memcached_dump.pop
-memcached_fetch.pop
-memcached_fetch_execute.pop
-memcached_fetch_result.pop
-memcached_flush.pop
-memcached_flush_buffers.pop
-memcached_free.pop
-memcached_generate_hash_value.pop
-memcached_get.pop
-memcached_get_by_key.pop
-memcached_get_memory_allocators.pop
-memcached_get_user_data.pop
-memcached_increment.pop
-memcached_increment_with_initial.pop
-memcached_lib_version.pop
-memcached_mget.pop
-memcached_mget_by_key.pop
-memcached_mget_execute.pop
-memcached_mget_execute_by_key.pop
-memcached_pool_behavior_get.pop
-memcached_pool_behavior_set.pop
-memcached_pool_create.pop
-memcached_pool_destroy.pop
-memcached_pool_pop.pop
-memcached_pool_push.pop
-memcached_prepend.pop
-memcached_prepend_by_key.pop
-memcached_quit.pop
-memcached_replace.pop
-memcached_replace_by_key.pop
-memcached_result_cas.pop
-memcached_result_create.pop
-memcached_result_flags.pop
-memcached_result_free.pop
-memcached_result_key_length.pop
-memcached_result_key_value.pop
-memcached_result_length.pop
-memcached_result_st.pop
-memcached_result_value.pop
-memcached_server_add.pop
-memcached_server_add_unix_socket.pop
-memcached_server_count.pop
-memcached_server_list.pop
-memcached_server_list_append.pop
-memcached_server_list_count.pop
-memcached_server_list_free.pop
-memcached_server_push.pop
-memcached_servers_parse.pop
-memcached_set.pop
-memcached_set_by_key.pop
-memcached_set_memory_allocators.pop
-memcached_set_user_data.pop
-memcached_stat.pop
-memcached_stat_get_keys.pop
-memcached_stat_get_value.pop
-memcached_stat_servername.pop
-memcached_strerror.pop
-memcached_verbosity.pop
-memcached_version.pop
-memcapable.pop
-memcat.pop
-memcp.pop
-memdump.pop
-memerror.pop
-memflush.pop
-memrm.pop
-memslap.pop
-memstat.pop
-out
 patch
+docs/html/
+docs/linkcheck/
 patch2
 stamp-h1
 support/Makefile
@@ -192,4 +90,6 @@ tests/testapp
 tests/testhashkit
 tests/testplus
 tests/testudp
+tests/var/
 unittests/unittests
+.deps
index 398e2ab6780a0a2bbb816d1db60ed45b69bbe5aa..637e364ce93d2e28c9e47a3c343e7d4c9a34bcea 100644 (file)
--- a/.quickly
+++ b/.quickly
@@ -2,4 +2,4 @@ project = libmemcached
 version = 0.4.2
 template = pandora-build
 project-type = library
-pandora-version = 0.171
+pandora-version = 0.175
index 828dae77631ba1917d05647bbacebfe54f451217..933decf326a9f06a5343022a486eead5a96b2f33 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,8 +2,12 @@
   * Fix calls to auto methods so that if value is not passed in nothing bad happens.
   * New parser calls for generating memcached_st objects.
   * New error system.
+  * New flow control for messages means faster get/set calls.
+  * Added new documentation system.
   * A behavior change has been now made that if you specify a weight for any
   server, we enable the weight flag and do weight balancing.
+  * A behavior change has been now made that if you specify a weight for any server, we enable the weight flag and do weight balancing.  
+  * Added MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS to simplify the setting of AUTO REJECT for servers.
 
 0.48 Tue Mar 15 23:05:18 PDT 2011
   * Fix memory leak in server parse.
index b9fec57ec2c35695a95ea7d5c0efb1cd77c7b155..79b4cc7ae70ea59b7b77c80ed1054826f46ced13 100644 (file)
@@ -5,9 +5,11 @@ SUFFIXES =
 PHONY =
 TESTS =
 CLEANFILES =
+DISTCLEANFILES =
 bin_PROGRAMS =
 noinst_HEADERS =
 lib_LTLIBRARIES =
+man_MANS =
 noinst_LTLIBRARIES =
 noinst_PROGRAMS =
 include_HEADERS =
@@ -15,7 +17,6 @@ nobase_include_HEADERS =
 check_PROGRAMS =
 EXTRA_HEADERS =
 BUILT_SOURCES=
-DISTCLEANFILES=
 EXTRA_DIST= \
            ${srcdir}/m4/pandora_*.m4 \
            .quickly \
@@ -32,17 +33,7 @@ EXTRA_DIST= \
            m4/po.m4 \
            m4/progtest.m4
 
-TEST_DOCS=
-if BUILD_DOCS
-SUBDIRS = docs
-TEST_DOCS+=test-docs
-endif
-
-test-docs:
-       (cd docs && $(MAKE) test-docs)
-
 include libtest/include.am
-
 include libmemcached/include.am
 include clients/include.am
 include libhashkit/include.am
@@ -51,8 +42,10 @@ include example/include.am
 include support/include.am
 include poll/include.am
 include win32/include.am
+include docs/include.am
 
 TESTS += ${check_PROGRAMS}
+EXTRA_DIST+= ${man_MANS}
 
 
 fedora:
@@ -83,6 +76,9 @@ merge-clean:
        find ./ | $(GREP) \~$$ | xargs rm -f
        bzr unknowns
 
+clean-local:
+       -rm -rf docs/_build docs/doctrees
+
 lcov: lcov-clean check
        @echo
        @echo " ------------------------------------------------------"
index 91302914c3c1c40fbb251ceae52d40ed809f5e33..936dbd32f8e98300c9d0754c54fb1ae2f03b5f15 100755 (executable)
@@ -1,6 +1,7 @@
 #!/usr/bin/python
 
 #  Copyright (C) 2009 Sun Microsystems, Inc.
+#  Copyright (C) 2010, 2011 Monty Taylor
 #
 #  This program is free software; you can redistribute it and/or modify
 #  it under the terms of the GNU General Public License as published by
@@ -133,6 +134,7 @@ EXTRA_DIST = plugin.ini
 
 noinst_HEADERS=
 nobase_include_HEADERS=
+nobase_pkginclude_HEADERS=
 check_PROGRAMS=
 noinst_LTLIBRARIES=
 bin_PROGRAMS=
@@ -142,7 +144,7 @@ bin_PROGRAMS=
   if plugin['headers'] != "":
     plugin_file.write("noinst_HEADERS += %(headers)s\n" % plugin)
   if plugin['install_headers'] != "":
-    plugin_file.write("nobase_include_HEADERS += %(install_headers)s\n" % plugin)
+    plugin_file.write("nobase_pkginclude_HEADERS += %(install_headers)s\n" % plugin)
   if plugin['testsuite']:
     if plugin.has_key('testsuitedir') and plugin['testsuitedir'] != "":
       plugin_file.write("EXTRA_DIST += %(testsuitedir)s\n" % plugin)
@@ -151,7 +153,7 @@ pkgplugin_LTLIBRARIES=%(libname)s.la
 %(libname)s_la_LDFLAGS=-avoid-version -rpath $(pkgplugindir) $(AM_LDFLAGS) %(ldflags)s $(GCOV_LIBS)
 %(libname)s_la_LIBADD=%(libs)s
 %(libname)s_la_DEPENDENCIES=%(libs)s
-%(libname)s_la_CPPFLAGS=$(AM_CPPFLAGS) -DPANDORA_DYNAMIC_PLUGIN -DPANDORA_MODULE_NAME=%(module_name)s -DPANDORA_MODULE_AUTHOR='"%(author)s"' -DPANDORA_MODULE_TITLE='"%(title)s"' -DPANDORA_MODULE_VERSION='"%(version)s"' -DPANDORA_MODULE_LICENSE=%(license)s %(cppflags)s
+%(libname)s_la_CPPFLAGS=$(AM_CPPFLAGS) -DPANDORA_DYNAMIC_PLUGIN -DPANDORA_MODULE_NAME=%(module_name)s -DPANDORA_MODULE_AUTHOR='%(author)s' -DPANDORA_MODULE_TITLE='%(title)s' -DPANDORA_MODULE_VERSION='%(version)s' -DPANDORA_MODULE_LICENSE=%(license)s %(cppflags)s
 %(libname)s_la_CXXFLAGS=$(AM_CXXFLAGS) %(cxxflags)s
 %(libname)s_la_CFLAGS=$(AM_CFLAGS) %(cflags)s
 %(libname)s_la_SOURCES=%(sources)s
@@ -199,15 +201,18 @@ def write_plugin(plugin, plugin_ini_list):
 
   write_plugin_ac(plugin, plugin_ac_file)
   write_plugin_am(plugin, plugin_am_file)
-  write_plugin_docs(plugin, plugin_doc_index)
+  write_plugin_docs(plugin, plugin_doc_index, plugin_am_file)
   plugin['writing_status'] = 'done'
 
-def write_plugin_docs(plugin, doc_index):
+def write_plugin_docs(plugin, doc_index, plugin_am):
   if plugin['docs'] is not None and os.path.isdir("docs/plugins"):
     if not os.path.exists(os.path.join("docs/plugins",plugin["name"])):
       os.symlink(os.path.abspath(plugin["docs"]), os.path.join("docs/plugins",plugin["name"]))
     doc_index.write("""
    %(name)s/index""" % plugin)
+    plugin_am.write("""
+EXTRA_DIST+=${top_srcdir}/docs/plugins/%(name)s/*.rst
+""" % plugin)
 
 def write_plugin_ac(plugin, plugin_ac):
   #
@@ -243,6 +248,19 @@ AS_HELP_STRING([--without-%(name_with_dashes)s-plugin],[Disable building %(title
     with_%(name)s_plugin="%(enabled)s"
     requested_%(name)s_plugin="no"
   ])
+AC_ARG_WITH([static-%(name_with_dashes)s-plugin],[
+AS_HELP_STRING([--with-static-%(name_with_dashes)s-plugin],[Build Archive Storage Engine. @<:@default=%(static_yesno)s@:>@])
+AS_HELP_STRING([--without-static-%(name_with_dashes)s-plugin],[Disable building Archive Storage Engine])
+  ],[
+    with_static_%(name)s_plugin=${withval}
+  ],[
+    with_static_%(name)s_plugin=%(static_yesno)s
+])
+AS_IF([test "x${with_static_%(name)s_plugin}" = "xyes" -o "x${with_all_static}" = "xyes"],[
+  shared_%(name)s_plugin=no
+  ],[
+  shared_%(name)s_plugin=yes
+])
 AC_ARG_ENABLE([%(name_with_dashes)s-plugin],[
 dnl indented wierd to make the help output correct
 AS_HELP_STRING([--enable-%(name_with_dashes)s-plugin],[Enable loading %(title)s by default. @<:@default=%(default_yesno)s@:>@])
@@ -272,20 +290,24 @@ AS_IF([test %(build_conditional)s],
 """ % plugin)
   if not plugin['unconditional']:
     plugin_ac.write("""
+AM_CONDITIONAL([%(static_build_conditional_tag)s],
+               [test %(build_conditional)s -a ! %(shared_build)s])
+AM_CONDITIONAL([%(shared_build_conditional_tag)s],
+               [test %(build_conditional)s -a %(shared_build)s])
 AM_CONDITIONAL([%(build_conditional_tag)s],
                [test %(build_conditional)s])
     """ % plugin)
 
   plugin_ac.write("""
-AS_IF([test "x$with_%(name)s_plugin" = "xyes"],
-    [
+AS_IF([test "x$with_%(name)s_plugin" = "xyes"],[
 """ % plugin)
   if plugin['testsuite']:
     plugin_ac.write("""
       pandora_plugin_test_list="%(name)s,${pandora_plugin_test_list}"
     """ % plugin)
-  if plugin['static']:
-    plugin_ac.write("""
+  plugin_ac.write("""
+      AS_IF([test "x${with_static_%(name)s_plugin}" = "xyes" -o "x${with_all_static}" = "xyes"],[
+
         AS_IF([test "x$enable_%(name)s_plugin" = "xyes"],[
           pandora_builtin_load_list="%(module_name)s,${pandora_builtin_load_list}"
           pandora_builtin_load_symbols_list="_drizzled_%(module_name)s_plugin_,${pandora_builtin_load_symbols_list}"
@@ -294,15 +316,13 @@ AS_IF([test "x$with_%(name)s_plugin" = "xyes"],
         pandora_builtin_list="%(module_name)s,${pandora_builtin_list}"
         pandora_builtin_symbols_list="_drizzled_%(module_name)s_plugin_,${pandora_builtin_symbols_list}"
         pandora_plugin_libs="${pandora_plugin_libs} \${top_builddir}/%(root_plugin_dir)s/%(libname)s.la"
-    """ % plugin)
-
-  else:
-    plugin_ac.write("""
+     ],[
         AS_IF([test "x$enable_%(name)s_plugin" = "xyes"],[
           pandora_default_plugin_list="%(name)s,${pandora_default_plugin_list}"
         ])
+    ])
     """ % plugin)
-  plugin_ac.write("      ])\n")
+  plugin_ac.write("])\n")
 
 def fix_file_paths(plugin, files):
   # TODO: determine path to plugin dir relative to top_srcdir... append it to
@@ -347,7 +367,13 @@ def expand_plugin_ini(plugin):
       plugin['extra_dist']=" ".join([os.path.join(plugin['rel_path'],f) for f in plugin['extra_dist'].split()])
 
 
+    if plugin['static']:
+      plugin['static_yesno']="yes"
+    else:
+      plugin['static_yesno']="no"
     plugin['build_conditional_tag']= "BUILD_%s_PLUGIN" % plugin['name'].upper()
+    plugin['shared_build_conditional_tag']= "BUILD_%s_PLUGIN_SHARED" % plugin['name'].upper()
+    plugin['static_build_conditional_tag']= "BUILD_%s_PLUGIN_STATIC" % plugin['name'].upper()
     plugin['name_with_dashes']= plugin['name'].replace('_','-')
     if plugin.has_key('build_conditional'):
       plugin['has_build_conditional']=True
@@ -355,6 +381,7 @@ def expand_plugin_ini(plugin):
     else:
       plugin['has_build_conditional']=False
       plugin['build_conditional']='"x${with_%(name)s_plugin}" = "xyes"' %plugin
+    plugin['shared_build']='"x${shared_%(name)s_plugin}" = "xyes"' %plugin
 
     if plugin['install']:
       plugin['library_type']= 'pkgplugin'
@@ -510,7 +537,7 @@ EXTRA_DIST += %(rel_path)s/plugin.ini
   if plugin['headers'] != "":
     plugin_am.write("noinst_HEADERS += %(headers)s\n" % plugin)
   if plugin['install_headers'] != "":
-    plugin_am.write("nobase_include_HEADERS += %(install_headers)s\n" % plugin)
+    plugin_am.write("nobase_pkginclude_HEADERS += %(install_headers)s\n" % plugin)
   if plugin['testsuite']:
     if plugin.has_key('testsuitedir') and plugin['testsuitedir'] != "":
       plugin_am.write("EXTRA_DIST += %(rel_path)s/%(testsuitedir)s\n" % plugin)
@@ -518,33 +545,30 @@ EXTRA_DIST += %(rel_path)s/plugin.ini
     plugin_am.write("EXTRA_DIST += %(rel_path)s/%(dist_testsuite)s\n" % plugin)
   if plugin['docs'] is not None:
     plugin_am.write("EXTRA_DIST += ${top_srcdir}/%(rel_path)s/docs/*.rst\n" % plugin)
-  if plugin['static']:
-    plugin_am.write("""
+  plugin_am.write("""
 %(root_plugin_dir)s_%(plugin_prefix)s%(name)s_dir=${top_srcdir}/%(rel_path)s
-EXTRA_DIST += %(rel_path)s/plugin.ini
-if %(build_conditional_tag)s
+# Include sources in EXTRA_DIST because we might not build this, but we
+# still want the sources to wind up in a tarball
+EXTRA_DIST += %(rel_path)s/plugin.ini %(sources)s
+if %(static_build_conditional_tag)s
   noinst_LTLIBRARIES+=%(root_plugin_dir)s/%(libname)s.la
   %(root_plugin_dir)s_%(libname)s_la_LIBADD=%(libs)s
   %(root_plugin_dir)s_%(libname)s_la_DEPENDENCIES=%(libs)s
   %(root_plugin_dir)s_%(libname)s_la_LDFLAGS=$(AM_LDFLAGS) %(ldflags)s $(GCOV_LIBS)
-  %(root_plugin_dir)s_%(libname)s_la_CPPFLAGS=$(AM_CPPFLAGS) -DPANDORA_MODULE_NAME=%(module_name)s -DPANDORA_MODULE_AUTHOR='"%(author)s"' -DPANDORA_MODULE_TITLE='"%(title)s"' -DPANDORA_MODULE_VERSION='"%(version)s"' -DPANDORA_MODULE_LICENSE=%(license)s -DPANDORA_MODULE_DEPENDENCIES='"%(dependencies)s"' %(cppflags)s
+  %(root_plugin_dir)s_%(libname)s_la_CPPFLAGS=$(AM_CPPFLAGS) -DPANDORA_MODULE_NAME=%(module_name)s -DPANDORA_MODULE_AUTHOR='%(author)s' -DPANDORA_MODULE_TITLE='%(title)s' -DPANDORA_MODULE_VERSION='%(version)s' -DPANDORA_MODULE_LICENSE=%(license)s -DPANDORA_MODULE_DEPENDENCIES='%(dependencies)s' %(cppflags)s
   %(root_plugin_dir)s_%(libname)s_la_CXXFLAGS=$(AM_CXXFLAGS) %(cxxflags)s
   %(root_plugin_dir)s_%(libname)s_la_CFLAGS=$(AM_CFLAGS) %(cflags)s
   %(root_plugin_dir)s_%(libname)s_la_SOURCES=%(sources)s
   check_PROGRAMS += %(tests)s
   PANDORA_DYNAMIC_LDADDS+=${top_builddir}/%(root_plugin_dir)s/%(libname)s.la
 endif
-""" % plugin)
-  else:
-    plugin_am.write("""
-%(root_plugin_dir)s_%(plugin_prefix)s%(name)s_dir=${top_srcdir}/%(rel_path)s
 EXTRA_DIST += %(rel_path)s/plugin.ini
-if %(build_conditional_tag)s
+if %(shared_build_conditional_tag)s
   %(library_type)s_LTLIBRARIES+=%(root_plugin_dir)s/%(libname)s.la
   %(root_plugin_dir)s_%(libname)s_la_LDFLAGS=-avoid-version -rpath $(pkgplugindir) $(AM_LDFLAGS) %(ldflags)s $(GCOV_LIBS)
   %(root_plugin_dir)s_%(libname)s_la_LIBADD=%(libs)s
   %(root_plugin_dir)s_%(libname)s_la_DEPENDENCIES=%(libs)s
-  %(root_plugin_dir)s_%(libname)s_la_CPPFLAGS=$(AM_CPPFLAGS) -DPANDORA_DYNAMIC_PLUGIN -DPANDORA_MODULE_NAME=%(module_name)s -DPANDORA_MODULE_AUTHOR='"%(author)s"' -DPANDORA_MODULE_TITLE='"%(title)s"' -DPANDORA_MODULE_VERSION='"%(version)s"' -DPANDORA_MODULE_LICENSE=%(license)s -DPANDORA_MODULE_DEPENDENCIES='"%(dependencies)s"' %(cppflags)s
+  %(root_plugin_dir)s_%(libname)s_la_CPPFLAGS=$(AM_CPPFLAGS) -DPANDORA_DYNAMIC_PLUGIN -DPANDORA_MODULE_NAME=%(module_name)s -DPANDORA_MODULE_AUTHOR='%(author)s' -DPANDORA_MODULE_TITLE='%(title)s' -DPANDORA_MODULE_VERSION='%(version)s' -DPANDORA_MODULE_LICENSE=%(license)s -DPANDORA_MODULE_DEPENDENCIES='%(dependencies)s' %(cppflags)s
   %(root_plugin_dir)s_%(libname)s_la_CXXFLAGS=$(AM_CXXFLAGS) %(cxxflags)s
   %(root_plugin_dir)s_%(libname)s_la_CFLAGS=$(AM_CFLAGS) %(cflags)s
   %(root_plugin_dir)s_%(libname)s_la_SOURCES=%(sources)s
@@ -662,6 +686,15 @@ PANDORA_DYNAMIC_LDADDS=
 if not os.path.exists("config/pandora-plugin.ac") or "write" in actions:
   plugin_ac_file = ChangeProtectedFile(os.path.join('config', 'pandora-plugin.ac'))
   plugin_ac_file.write("dnl Generated file, run make to rebuild\n")
+  plugin_ac_file.write("""
+AC_ARG_WITH([all-static],[
+AS_HELP_STRING([--with-all-static],[Link all plugins staticly into the server @<:@default=no@:>@])
+],[
+    with_all_static="$withval"
+    ],[
+    with_all_static=no
+])
+  """)
 
 if os.path.exists("docs/plugins"):
   if not os.path.exists("docs/plugins/list.rst") or "write" in actions:
index b4581e9f7d15dd767d8b6003a38f65c48a862eee..ff9329bf028f24cc60a035b11c82ef09e8144878 100644 (file)
@@ -103,7 +103,6 @@ AC_SEARCH_LIBS(gethostbyname, nsl)
 
 AC_CHECK_FUNCS([getline])
 
-PANDORA_HAVE_LIBGTEST
 PANDORA_HAVE_LIBEVENT
 my_saved_libs="$LIBS"
 LIBS=
@@ -137,19 +136,6 @@ AS_IF([test "x$ac_cv_header_atomic_h" = "xyes"],[
                      [1],
                       [Define to true if you want to use functions from atomic.h])])])
 
-AC_ARG_WITH([docs],
-  [AS_HELP_STRING([--with-docs],
-    [Generate documentation (yes|no) @<:@default=yes@:>@])],
-  [with_docs=$withval],
-  [with_docs=yes])
-
-AS_IF([test "$with_docs" = "yes"],
-  [
-    REQUIRE_POD2MAN
-    REQUIRE_PODCHECKER
-  ])
-AM_CONDITIONAL(BUILD_DOCS, test "$with_docs" = "yes")
-
 AC_CHECK_HEADERS_ONCE(winsock2.h poll.h sys/wait.h fnmatch.h)
 AM_CONDITIONAL(BUILD_POLL, test "x$ac_cv_header_poll_h" = "xno")
 AM_CONDITIONAL(BUILD_WIN32_WRAPPERS, test "x$ac_cv_header_winsock2_h" = "xyes")
@@ -163,7 +149,6 @@ SOCKET_SEND_FLAGS
 
 AC_CONFIG_FILES([
   Makefile
-  docs/Makefile
   libhashkit/configure.h
   libmemcached/configure.h
   support/libmemcached.pc
@@ -197,13 +182,3 @@ case "$host_os" in
   ;;
 esac
 
-AS_IF(test "$with_docs" = "no",
-  [
-    echo "*****"
-    echo "*"
-    echo "*  WARNING: You are not generating any documentation."
-    echo "*           Please don't ship libmemcached to an end user"
-    echo "*           without documentation..."
-    echo "*"
-    echo "*****"
-  ])
diff --git a/docs/Makefile.am b/docs/Makefile.am
deleted file mode 100644 (file)
index 2d1c282..0000000
+++ /dev/null
@@ -1,566 +0,0 @@
-# This file generates all of man/html pages that we use for documentation.
-#
-# When hacking this file you need to know that we take .pod files and turn
-# them into .pop files. .pop files are 1=1 for man pages, but one .pod
-# file may generate many .pop files.
-#
-#    -Brian
-#
-#
-CLEANFILES= *.1 *.3 *.html *.pop *.tmp
-
-BUILT_SOURCES=
-
-EXTRA_DIST= make_index.pl
-
-AUTO_PAGES= \
-           memcached_increment.pop \
-           memcached_increment_with_initial.pop \
-           memcached_decrement.pop \
-           memcached_decrement_with_initial.pop
-BUILT_SOURCES += ${AUTO_PAGES}
-
-BEHAVIOR_PAGES= \
-               memcached_behavior_get.pop \
-               memcached_behavior_set.pop
-BUILT_SOURCES += ${BEHAVIOR_PAGES}
-
-CALLBACK_PAGES= \
-               memcached_callback_get.pop \
-               memcached_callback_set.pop
-BUILT_SOURCES += ${CALLBACK_PAGES}
-
-CREATE_PAGES= \
-             memcached_clone.pop \
-             memcached_create.pop \
-             memcached_free.pop \
-             memcached_servers_reset.pop
-BUILT_SOURCES += ${CREATE_PAGES}
-
-DELETE_PAGES= \
-             memcached_delete.pop \
-             memcached_delete_by_key.pop
-BUILT_SOURCES += ${DELETE_PAGES}
-
-GENERIC_PAGES= \
-              libmemcached.pop \
-              libmemcached_examples.pop \
-              libmemcachedutil.pop \
-              memcached_analyze.pop \
-              memcached_dump.pop \
-              memcached_flush.pop \
-              memcached_flush_buffers.pop \
-              memcached_generate_hash_value.pop \
-              memcached_quit.pop \
-              memcached_strerror.pop \
-              memcached_verbosity.pop \
-              memcapable.pop \
-              memcat.pop \
-              memcp.pop \
-              memdump.pop \
-              memerror.pop \
-              memflush.pop \
-              memrm.pop \
-              memaslap.pop \
-              memslap.pop \
-              memstat.pop
-BUILT_SOURCES += ${GENERIC_PAGES}
-
-GET_PAGES= \
-          memcached_get.pop \
-          memcached_get_by_key.pop \
-          memcached_fetch_result.pop \
-          memcached_fetch_execute.pop \
-          memcached_mget.pop \
-          memcached_mget_by_key.pop \
-          memcached_mget_execute.pop \
-          memcached_mget_execute_by_key.pop \
-          memcached_fetch.pop
-BUILT_SOURCES += ${GET_PAGES}
-
-MEMORY_ALLOCATORS_PAGES= \
-                        memcached_get_memory_allocators.pop \
-                        memcached_set_memory_allocators.pop \
-                        memcached_set_memory_allocators_context.pop
-BUILT_SOURCES += ${MEMORY_ALLOCATORS_PAGES}
-
-POOL_PAGES= \
-           memcached_pool_behavior_get.pop \
-           memcached_pool_behavior_set.pop \
-           memcached_pool_create.pop \
-           memcached_pool_destroy.pop \
-           memcached_pool_pop.pop \
-           memcached_pool_push.pop
-BUILT_SOURCES += ${POOL_PAGES}
-
-RESULT_PAGES= \
-             memcached_result_cas.pop \
-             memcached_result_create.pop \
-             memcached_result_flags.pop \
-             memcached_result_free.pop \
-             memcached_result_key_length.pop \
-             memcached_result_key_value.pop \
-             memcached_result_length.pop \
-             memcached_result_st.pop \
-             memcached_result_value.pop
-BUILT_SOURCES += ${RESULT_PAGES}
-
-
-SERVER_PAGES= \
-             memcached_server_count.pop \
-             memcached_server_cursor.pop \
-             memcached_server_list.pop \
-             memcached_server_add.pop \
-             memcached_server_add_unix_socket.pop \
-             memcached_server_push.pop
-BUILT_SOURCES += ${SERVER_PAGES}
-
-SERVER_ST_PAGES= \
-                memcached_server_list_free.pop \
-                memcached_server_list_count.pop \
-                memcached_server_list_append.pop \
-                memcached_servers_parse.pop
-BUILT_SOURCES += ${SERVER_ST_PAGES}
-
-SET_PAGES= \
-          memcached_set.pop \
-          memcached_set_by_key.pop \
-          memcached_cas.pop \
-          memcached_cas_by_key.pop \
-          memcached_replace.pop \
-          memcached_replace_by_key.pop \
-          memcached_add.pop \
-          memcached_add_by_key.pop \
-          memcached_prepend.pop \
-          memcached_prepend_by_key.pop \
-          memcached_append.pop \
-          memcached_append_by_key.pop
-BUILT_SOURCES += ${SET_PAGES}
-
-STATS_PAGES= \
-            memcached_stat.pop \
-            memcached_stat_execute.pop\
-            memcached_stat_get_keys.pop\
-            memcached_stat_get_value.pop \
-            memcached_stat_servername.pop
-BUILT_SOURCES += ${STATS_PAGES}
-
-USER_DATA_PAGES= \
-                memcached_get_user_data.pop \
-                memcached_set_user_data.pop
-BUILT_SOURCES += ${USER_DATA_PAGES}
-
-VERSION_PAGES= \
-              memcached_version.pop \
-              memcached_lib_version.pop
-BUILT_SOURCES += ${VERSION_PAGES}
-
-
-#
-# These are for libhashkit
-#
-HASHKIT_CREATE_PAGES= \
-                     hashkit_is_allocated.pop \
-                     hashkit_create.pop \
-                     hashkit_clone.pop \
-                     hashkit_free.pop
-BUILT_SOURCES += ${HASHKIT_CREATE_PAGES}
-
-HASHKIT_FUNCTIONS_PAGES= \
-                        hashkit_crc32.pop \
-                        hashkit_fnv1_32.pop \
-                        hashkit_fnv1_64.pop \
-                        hashkit_fnv1a_32.pop \
-                        hashkit_fnv1a_64.pop \
-                        hashkit_functions.pop \
-                        hashkit_hsieh.pop \
-                        hashkit_jenkins.pop \
-                        hashkit_md5.pop \
-                        hashkit_murmur.pop
-BUILT_SOURCES += ${HASHKIT_FUNCTIONS_PAGES}
-
-HASHKIT_ST_PAGES= \
-                 hashkit_value.pop
-BUILT_SOURCES += ${HASHKIT_ST_PAGES}
-
-
-HTML_FILES= \
-           hashkit_clone.html \
-           hashkit_crc32.html \
-           hashkit_create.html \
-           hashkit_fnv1_32.html \
-           hashkit_fnv1_64.html \
-           hashkit_fnv1a_32.html \
-           hashkit_fnv1a_64.html \
-           hashkit_free.html \
-           hashkit_functions.html \
-           hashkit_hsieh.html \
-           hashkit_is_allocated.html \
-           hashkit_jenkins.html \
-           hashkit_md5.html \
-           hashkit_murmur.html \
-           hashkit_value.html \
-           libmemcached_examples.html \
-           libmemcached.html \
-           libmemcachedutil.html \
-           memcached_add_by_key.html \
-           memcached_add.html \
-           memcached_analyze.html \
-           memcached_append_by_key.html \
-           memcached_append.html \
-           memcached_behavior_get.html \
-           memcached_behavior_set.html \
-           memcached_callback_get.html \
-           memcached_callback_set.html \
-           memcached_cas_by_key.html \
-           memcached_cas.html \
-           memcached_clone.html \
-           memcached_create.html \
-           memcached_decrement.html \
-           memcached_decrement_with_initial.html \
-           memcached_delete_by_key.html \
-           memcached_delete.html \
-           memcached_dump.html \
-           memcached_fetch_execute.html \
-           memcached_fetch.html \
-           memcached_fetch_result.html \
-           memcached_flush_buffers.html \
-           memcached_flush.html \
-           memcached_free.html \
-           memcached_generate_hash_value.html \
-           memcached_get_by_key.html \
-           memcached_get_memory_allocators.html \
-           memcached_get.html \
-           memcached_get_user_data.html \
-           memcached_increment.html \
-           memcached_increment_with_initial.html \
-           memcached_lib_version.html \
-           memcached_mget_by_key.html \
-           memcached_mget_execute_by_key.html \
-           memcached_mget_execute.html \
-           memcached_mget.html \
-           memcached_pool_behavior_get.html \
-           memcached_pool_behavior_set.html \
-           memcached_pool_create.html \
-           memcached_pool_destroy.html \
-           memcached_pool_pop.html \
-           memcached_pool_push.html \
-           memcached_prepend_by_key.html \
-           memcached_prepend.html \
-           memcached_quit.html \
-           memcached_replace_by_key.html \
-           memcached_replace.html \
-           memcached_result_cas.html \
-           memcached_result_create.html \
-           memcached_result_flags.html \
-           memcached_result_free.html \
-           memcached_result_key_length.html \
-           memcached_result_key_value.html \
-           memcached_result_length.html \
-           memcached_result_st.html \
-           memcached_result_value.html \
-           memcached_server_add.html \
-           memcached_server_add_unix_socket.html \
-           memcached_server_count.html \
-           memcached_server_cursor.html \
-           memcached_server_list_append.html \
-           memcached_server_list_count.html \
-           memcached_server_list_free.html \
-           memcached_server_list.html \
-           memcached_server_push.html \
-           memcached_servers_parse.html \
-           memcached_set_by_key.html \
-           memcached_set_memory_allocators.html \
-           memcached_set.html \
-           memcached_set_user_data.html \
-           memcached_stat_execute.html \
-           memcached_stat_get_keys.html \
-           memcached_stat_get_value.html \
-           memcached_stat.html \
-           memcached_stat_servername.html \
-           memcached_strerror.html \
-           memcached_verbosity.html \
-           memcached_version.html \
-           memcapable.html \
-           memcat.html \
-           memcp.html \
-           memdump.html \
-           memerror.html \
-           memflush.html \
-           memrm.html \
-           memaslap.html \
-           memslap.html \
-           memstat.html
-
-POD_FILES= \
-          hashkit_create.pod \
-          hashkit_functions.pod \
-          hashkit_value.pod \
-          libmemcached.pod \
-          libmemcached_examples.pod \
-          libmemcachedutil.pod \
-          memcached_analyze.pod \
-          memcached_auto.pod \
-          memcached_behavior.pod \
-          memcached_callback.pod \
-          memcached_create.pod \
-          memcached_delete.pod \
-          memcached_dump.pod \
-          memcached_flush.pod \
-          memcached_flush_buffers.pod \
-          memcached_generate_hash_value.pod \
-          memcached_get.pod \
-          memcached_memory_allocators.pod \
-          memcached_pool.pod \
-          memcached_quit.pod \
-          memcached_result_st.pod \
-          memcached_sasl.pod \
-          memcached_server_st.pod \
-          memcached_servers.pod \
-          memcached_set.pod \
-          memcached_stats.pod \
-          memcached_strerror.pod \
-          memcached_user_data.pod \
-          memcached_verbosity.pod \
-          memcached_version.pod \
-          memcapable.pod \
-          memcat.pod \
-          memcp.pod \
-          memdump.pod \
-          memerror.pod \
-          memflush.pod \
-          memrm.pod \
-          memaslap.pod \
-          memslap.pod \
-          memstat.pod
-EXTRA_DIST+= $(POD_FILES)
-
-man_MANS = \
-          hashkit_clone.3 \
-          hashkit_crc32.3 \
-          hashkit_create.3 \
-          hashkit_fnv1_32.3 \
-          hashkit_fnv1_64.3 \
-          hashkit_fnv1a_32.3 \
-          hashkit_fnv1a_64.3 \
-          hashkit_free.3 \
-          hashkit_functions.3 \
-          hashkit_hsieh.3 \
-          hashkit_is_allocated.3 \
-          hashkit_jenkins.3 \
-          hashkit_md5.3 \
-          hashkit_murmur.3 \
-          hashkit_value.3 \
-          libmemcached.3 \
-          libmemcached_examples.3 \
-          memcached_add.3 \
-          memcached_add_by_key.3 \
-          memcached_analyze.3 \
-          memcached_append.3 \
-          memcached_append_by_key.3 \
-          memcached_behavior_get.3 \
-          memcached_behavior_set.3 \
-          memcached_callback_get.3 \
-          memcached_callback_set.3 \
-          memcached_cas.3 \
-          memcached_cas_by_key.3 \
-          memcached_clone.3 \
-          memcached_create.3 \
-          memcached_decrement.3 \
-          memcached_decrement_with_initial.3 \
-          memcached_delete.3 \
-          memcached_delete_by_key.3 \
-          memcached_dump.3 \
-          memcached_fetch.3 \
-          memcached_fetch_execute.3 \
-          memcached_fetch_result.3 \
-          memcached_flush_buffers.3 \
-          memcached_free.3 \
-          memcached_generate_hash_value.3 \
-          memcached_get.3 \
-          memcached_get_by_key.3 \
-          memcached_get_memory_allocators.3 \
-          memcached_get_user_data.3 \
-          memcached_increment.3 \
-          memcached_increment_with_initial.3 \
-          memcached_lib_version.3 \
-          memcached_mget.3 \
-          memcached_mget_by_key.3 \
-          memcached_mget_execute.3  \
-          memcached_mget_execute_by_key.3  \
-          memcached_prepend.3 \
-          memcached_prepend_by_key.3 \
-          memcached_quit.3 \
-          memcached_replace.3 \
-          memcached_replace_by_key.3 \
-          memcached_server_add.3 \
-          memcached_server_count.3 \
-          memcached_server_cursor.3 \
-          memcached_server_list.3 \
-          memcached_server_list_append.3 \
-          memcached_server_list_count.3 \
-          memcached_server_list_free.3 \
-          memcached_server_push.3 \
-          memcached_servers_parse.3 \
-          memcached_set.3 \
-          memcached_set_by_key.3 \
-          memcached_set_memory_allocators.3 \
-          memcached_set_user_data.3 \
-          memcached_stat.3 \
-          memcached_stat_execute.3 \
-          memcached_stat_get_keys.3 \
-          memcached_stat_get_value.3 \
-          memcached_stat_servername.3 \
-          memcached_strerror.3 \
-          memcached_verbosity.3 \
-          memcached_version.3 \
-          memcapable.1 \
-          memcat.1 \
-          memcp.1 \
-          memdump.1 \
-          memerror.1 \
-          memflush.1 \
-          memrm.1 \
-          memaslap.1 \
-          memslap.1 \
-          memstat.1
-
-if HAVE_SASL
-POD_FILES+= memcached_sasl.pod
-man_MANS+= \
-           memcached_destroy_sasl_auth_data.3 \
-           memcached_get_sasl_callbacks.3 \
-           memcached_sasl_set_auth_data.3 \
-           memcached_set_sasl_callbacks.3
-
-HTML_FILES+= \
-           memcached_destroy_sasl_auth_data.html \
-           memcached_get_sasl_callbacks.html \
-           memcached_sasl_set_auth_data.html \
-           memcached_set_sasl_callbacks.html
-
-
-SASL_PAGES= \
-           memcached_destroy_sasl_auth_data.pop \
-           memcached_get_sasl_callbacks.pop \
-           memcached_sasl_set_auth_data.pop \
-           memcached_set_sasl_callbacks.pop
-BUILT_SOURCES += ${SASL_PAGES}
-
-${SASL_PAGES}:
-       @rm -f $@
-       ln -s ${top_srcdir}/docs/memcached_sasl.pod ${top_builddir}/docs/$@
-
-endif
-
-if BUILD_LIBMEMCACHEDUTIL
-man_MANS+= \
-         libmemcachedutil.3 \
-         memcached_pool_behavior_set.3 \
-         memcached_pool_behavior_get.3 \
-         memcached_pool_create.3 \
-         memcached_pool_destroy.3 \
-         memcached_pool_push.3 \
-         memcached_pool_pop.3
-endif
-
-
-${CREATE_PAGES}:
-       @rm -f $@
-       ln -s ${top_srcdir}/docs/memcached_create.pod ${top_builddir}/docs/$@
-
-${SET_PAGES}:
-       @rm -f $@
-       ln -s ${top_srcdir}/docs/memcached_set.pod ${top_builddir}/docs/$@
-
-${DELETE_PAGES}:
-       @rm -f $@
-       ln -s ${top_srcdir}/docs/memcached_delete.pod ${top_builddir}/docs/$@
-
-${AUTO_PAGES}:
-       @rm -f $@
-       ln -s ${top_srcdir}/docs/memcached_auto.pod ${top_builddir}/docs/$@
-
-${GET_PAGES}:
-       @rm -f $@
-       ln -s ${top_srcdir}/docs/memcached_get.pod ${top_builddir}/docs/$@
-
-${SERVER_PAGES}:
-       @rm -f $@
-       ln -s ${top_srcdir}/docs/memcached_servers.pod ${top_builddir}/docs/$@
-
-${SERVER_ST_PAGES}:
-       @rm -f $@
-       ln -s ${top_srcdir}/docs/memcached_server_st.pod ${top_builddir}/docs/$@
-
-${GENERIC_PAGES}:
-       @rm -f $@
-       ln -s ${top_srcdir}/docs/$*.pod ${top_builddir}/docs/$@
-
-${BEHAVIOR_PAGES}:
-       @rm -f $@
-       ln -s ${top_srcdir}/docs/memcached_behavior.pod ${top_builddir}/docs/$@
-
-${CALLBACK_PAGES}:
-       @rm -f $@
-       ln -s ${top_srcdir}/docs/memcached_callback.pod ${top_builddir}/docs/$@
-
-${STATS_PAGES}:
-       @rm -f $@
-       ln -s ${top_srcdir}/docs/memcached_stats.pod ${top_builddir}/docs/$@
-
-${RESULT_PAGES}:
-       @rm -f $@
-       ln -s ${top_srcdir}/docs/memcached_result_st.pod ${top_builddir}/docs/$@
-
-${VERSION_PAGES}:
-       @rm -f $@
-       ln -s ${top_srcdir}/docs/memcached_version.pod ${top_builddir}/docs/$@
-
-${MEMORY_ALLOCATORS_PAGES}:
-       @rm -f $@
-       ln -s ${top_srcdir}/docs/memcached_memory_allocators.pod ${top_builddir}/docs/$@
-
-${USER_DATA_PAGES}:
-       @rm -f $@
-       ln -s ${top_srcdir}/docs/memcached_user_data.pod ${top_builddir}/docs/$@
-
-${POOL_PAGES}:
-       @rm -f $@
-       ln -s ${top_srcdir}/docs/memcached_pool.pod ${top_builddir}/docs/$@
-
-${HASHKIT_CREATE_PAGES}:
-       @rm -f $@
-       ln -s ${top_srcdir}/docs/hashkit_create.pod ${top_builddir}/docs/$@
-
-
-${HASHKIT_FUNCTIONS_PAGES}:
-       @rm -f $@
-       ln -s ${top_srcdir}/docs/hashkit_functions.pod ${top_builddir}/docs/$@
-
-${HASHKIT_ST_PAGES}:
-       @rm -f $@
-       ln -s ${top_srcdir}/docs/hashkit_value.pod ${top_builddir}/docs/$@
-
-test-docs: $(POD_FILES)
-       ${PODCHECKER} $(top_srcdir)/docs/$?
-
-html-local: html-pages html-index
-
-html-pages: $(HTML_FILES)
-
-html-index: html-pages
-       perl make_index.pl *.html > index.html
-
-SUFFIXES= .pop .pod .html .1 .3
-
-.pop: ${_set}
-
-.pop.html:
-       pod2html --infile=$< >  $@
-
-.pop.1:
-       ${POD2MAN} -c "$*" -r "" -s 1 $< >  $@
-
-.pop.3:
-       ${POD2MAN} -c "$*" -r "" -s 3 $< >  $@
diff --git a/docs/conf.py b/docs/conf.py
new file mode 100644 (file)
index 0000000..d4cd9f9
--- /dev/null
@@ -0,0 +1,347 @@
+# -*- coding: utf-8 -*-
+#
+# libmemcached documentation build configuration file, created by
+# sphinx-quickstart on Sun Mar  6 12:05:53 2011.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys, os
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration -----------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = []
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'libmemcached'
+copyright = u'2011, Brian Aker DataDifferential, http://datadifferential.com/'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '0.47'
+# The full version, including alpha/beta/rc tags.
+release = '0.47'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['_build']
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents.  If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar.  Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_domain_indices = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'libmemcacheddoc'
+
+
+# -- Options for LaTeX output --------------------------------------------------
+
+# The paper size ('letter' or 'a4').
+#latex_paper_size = 'letter'
+
+# The font size ('10pt', '11pt' or '12pt').
+#latex_font_size = '10pt'
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass [howto/manual]).
+latex_documents = [
+  ('index', 'libmemcached.tex', u'libmemcached Documentation',
+   u'Brian Aker', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Additional stuff for the LaTeX preamble.
+#latex_preamble = ''
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output --------------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+  ('libhashkit', 'libhashkit', u'libhashkit Documentation', [u'Brian Aker'], 3),
+  ('hashkit_create', 'hashkit_clone', u'libhashkit Documentation', [u'Brian Aker'], 3),
+  ('hashkit_create', 'hashkit_create', u'libhashkit Documentation', [u'Brian Aker'], 3),
+  ('hashkit_create', 'hashkit_free', u'libhashkit Documentation', [u'Brian Aker'], 3),
+  ('hashkit_create', 'hashkit_is_allocated', u'libhashkit Documentation', [u'Brian Aker'], 3),
+  ('hashkit_functions', 'hashkit_crc32', u'libhashkit Documentation', [u'Brian Aker'], 3),
+  ('hashkit_functions', 'hashkit_fnv1_32', u'libhashkit Documentation', [u'Brian Aker'], 3),
+  ('hashkit_functions', 'hashkit_fnv1_64', u'libhashkit Documentation', [u'Brian Aker'], 3),
+  ('hashkit_functions', 'hashkit_fnv1a_32', u'libhashkit Documentation', [u'Brian Aker'], 3),
+  ('hashkit_functions', 'hashkit_fnv1a_64', u'libhashkit Documentation', [u'Brian Aker'], 3),
+  ('hashkit_functions', 'hashkit_functions', u'libhashkit Documentation', [u'Brian Aker'], 3),
+  ('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_functions', 'hashkit_hsieh', u'libhashkit Documentation', [u'Brian Aker'], 3),
+  ('hashkit_value', 'hashkit_value', u'libhashkit Documentation', [u'Brian Aker'], 3),
+  ('libmemcached', 'libmemcached', u'Introducing the C Client Library for memcached', [u'Brian Aker'], 3),
+  ('libmemcached_examples', 'libmemcached_examples', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('libmemcached_configuration', 'libmemcached_configuration', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('libmemcached_configuration', 'memcached_create_with_options', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('libmemcached_configuration', 'libmemcached_check_configuration', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('libmemcachedutil', 'libmemcachedutil', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_analyze', 'memcached_analyze', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_auto', 'memcached_auto', u'Incrementing and Decrementing Values', [u'Brian Aker'], 3),
+  ('memcached_auto', 'memcached_decrement', u'Incrementing and Decrementing Values', [u'Brian Aker'], 3),
+  ('memcached_auto', 'memcached_decrement_with_initial', u'Incrementing and Decrementing Values', [u'Brian Aker'], 3),
+  ('memcached_auto', 'memcached_increment', u'Incrementing and Decrementing Values', [u'Brian Aker'], 3),
+  ('memcached_auto', 'memcached_increment_with_initial', u'Incrementing and Decrementing Values', [u'Brian Aker'], 3),
+  ('memcached_behavior', 'memcached_behavior', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_behavior', 'memcached_behavior_get', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_behavior', 'memcached_behavior_set', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_callback', 'memcached_callback', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_callback', 'memcached_callback_get', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_callback', 'memcached_callback_set', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_create', 'memcached_clone', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_create', 'memcached_create', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_create', 'memcached_free', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_create', 'memcached_servers_reset', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_delete', 'memcached_delete', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_delete', 'memcached_delete_by_key', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_dump', 'memcached_dump', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_flush', 'memcached_flush', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_flush_buffers', 'memcached_flush_buffers', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_generate_hash_value', 'memcached_generate_hash_value', u'Generating hash values directly', [u'Brian Aker'], 3),
+  ('memcached_generate_hash_value', 'memcached_generate_hash', u'Generating hash values directly', [u'Brian Aker'], 3),
+  ('memcached_get', 'memcached_fetch', u'Retrieving data from the server', [u'Brian Aker'], 3),
+  ('memcached_get', 'memcached_fetch_execute', u'Retrieving data from the server', [u'Brian Aker'], 3),
+  ('memcached_get', 'memcached_fetch_result', u'Retrieving data from the server', [u'Brian Aker'], 3),
+  ('memcached_get', 'memcached_get', u'Retrieving data from the server', [u'Brian Aker'], 3),
+  ('memcached_get', 'memcached_get_by_key', u'Retrieving data from the server', [u'Brian Aker'], 3),
+  ('memcached_get', 'memcached_mget', u'Retrieving data from the server', [u'Brian Aker'], 3),
+  ('memcached_get', 'memcached_mget_by_key', u'Retrieving data from the server', [u'Brian Aker'], 3),
+  ('memcached_get', 'memcached_mget_execute', u'Retrieving data from the server', [u'Brian Aker'], 3),
+  ('memcached_get', 'memcached_mget_execute_by_key', u'Retrieving data from the server', [u'Brian Aker'], 3),
+  ('memcached_memory_allocators', 'memcached_get_memory_allocators', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_memory_allocators', 'memcached_memory_allocators', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_memory_allocators', 'memcached_set_memory_allocators', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_memory_allocators', 'memcached_set_memory_allocators_context', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_pool', 'memcached_pool', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_pool', 'memcached_pool_behavior_get', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_pool', 'memcached_pool_behavior_set', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_pool', 'memcached_pool_create', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_pool', 'memcached_pool_destroy', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_pool', 'memcached_pool_push', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_pool', 'memcached_pool_pop', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_pool', 'memcached_pool_push', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_quit', 'memcached_quit', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_result_st', 'memcached_result_cas', u'Working with result sets', [u'Brian Aker'], 3),
+  ('memcached_result_st', 'memcached_result_create', u'Working with result sets', [u'Brian Aker'], 3),
+  ('memcached_result_st', 'memcached_result_flags', u'Working with result sets', [u'Brian Aker'], 3),
+  ('memcached_result_st', 'memcached_result_free', u'Working with result sets', [u'Brian Aker'], 3),
+  ('memcached_result_st', 'memcached_result_key_length', u'Working with result sets', [u'Brian Aker'], 3),
+  ('memcached_result_st', 'memcached_result_key_value', u'Working with result sets', [u'Brian Aker'], 3),
+  ('memcached_result_st', 'memcached_result_length', u'Working with result sets', [u'Brian Aker'], 3),
+  ('memcached_result_st', 'memcached_result_st', u'Working with result sets', [u'Brian Aker'], 3),
+  ('memcached_result_st', 'memcached_result_value', u'Working with result sets', [u'Brian Aker'], 3),
+  ('memcached_sasl', 'memcached_destroy_sasl_auth_data', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_sasl', 'memcached_get_sasl_callbacks', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_sasl', 'memcached_sasl', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_sasl', 'memcached_set_sasl_callbacks', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_sasl', 'memcached_sasl_set_auth_data', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_server_st', 'memcached_server_list_append', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_server_st', 'memcached_server_list_count', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_server_st', 'memcached_server_list_free', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_server_st', 'memcached_servers_parse', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_servers', 'memcached_server_add', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_servers', 'memcached_server_add_unix_socket', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_servers', 'memcached_server_count', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_servers', 'memcached_server_cursor', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_servers', 'memcached_server_list', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_servers', 'memcached_server_push', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_servers', 'memcached_server_st', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_servers', 'memcached_servers', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_set', 'memcached_add', u'Storing and Replacing Data', [u'Brian Aker'], 3),
+  ('memcached_set', 'memcached_add_by_key', u'Storing and Replacing Data', [u'Brian Aker'], 3),
+  ('memcached_set', 'memcached_append', u'Storing and Replacing Data', [u'Brian Aker'], 3),
+  ('memcached_set', 'memcached_append_by_key', u'Storing and Replacing Data', [u'Brian Aker'], 3),
+  ('memcached_set', 'memcached_cas', u'Storing and Replacing Data', [u'Brian Aker'], 3),
+  ('memcached_set', 'memcached_cas_by_key', u'Storing and Replacing Data', [u'Brian Aker'], 3),
+  ('memcached_set', 'memcached_prepend', u'Storing and Replacing Data', [u'Brian Aker'], 3),
+  ('memcached_set', 'memcached_prepend_by_key', u'Storing and Replacing Data', [u'Brian Aker'], 3),
+  ('memcached_set', 'memcached_replace', u'Storing and Replacing Data', [u'Brian Aker'], 3),
+  ('memcached_set', 'memcached_replace_by_key', u'Storing and Replacing Data', [u'Brian Aker'], 3),
+  ('memcached_set', 'memcached_set', u'Storing and Replacing Data', [u'Brian Aker'], 3),
+  ('memcached_set', 'memcached_set_by_key', u'Storing and Replacing Data', [u'Brian Aker'], 3),
+  ('memcached_stats', 'memcached_stat', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_stats', 'memcached_stat_execute', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_stats', 'memcached_stat_get_keys', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_stats', 'memcached_stat_get_value', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_stats', 'memcached_stat_servername', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_stats', 'memcached_stats', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_strerror', 'memcached_strerror', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_user_data', 'memcached_get_user_data', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_user_data', 'memcached_set_user_data', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_user_data', 'memcached_user_data', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_verbosity', 'memcached_verbosity', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_version', 'memcached_lib_version', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_version', 'memcached_version', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcapable', 'memcapable', u'libmemcached Documentation', [u'Brian Aker'], 1),
+  ('memcat', 'memcat', u'libmemcached Documentation', [u'Brian Aker'], 1),
+  ('memcp', 'memcp', u'libmemcached Documentation', [u'Brian Aker'], 1),
+  ('memdump', 'memdump', u'libmemcached Documentation', [u'Brian Aker'], 1),
+  ('memerror', 'memerror', u'libmemcached Documentation', [u'Brian Aker'], 1),
+  ('memcapable', 'memcapable', u'libmemcached Documentation', [u'Brian Aker'], 1),
+  ('memcat', 'memcat', u'libmemcached Documentation', [u'Brian Aker'], 1),
+  ('memcp', 'memcp', u'libmemcached Documentation', [u'Brian Aker'], 1),
+  ('memdump', 'memdump', u'libmemcached Documentation', [u'Brian Aker'], 1),
+  ('memerror', 'memerror', u'libmemcached Documentation', [u'Brian Aker'], 1),
+  ('memaslap', 'memaslap', u'libmemcached Documentation', [u'Brian Aker'], 1),
+  ('memflush', 'memflush', u'libmemcached Documentation', [u'Brian Aker'], 1),
+  ('memrm', 'memrm', u'libmemcached Documentation', [u'Brian Aker'], 1),
+  ('memslap', 'memslap', u'libmemcached Documentation', [u'Brian Aker'], 1),
+  ('memstat', 'memstat', u'libmemcached Documentation', [u'Brian Aker'], 1),
+  ]
diff --git a/docs/hashkit_create.pod b/docs/hashkit_create.pod
deleted file mode 100644 (file)
index bcd5390..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-=head1 NAME
-
-hashkit_create, hashkit_clone, hashkit_free, hashkit_is_allocated -
-Create and destroy hashkit objects
-
-=head1 LIBRARY
-
-C Library for hashing algorithms (libhashkit, -lhashkit)
-
-=head1 SYNOPSIS
-
-  #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);
-
-=head1 DESCRIPTION
-
-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.
-
-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.
-
-The hashkit_free() frees any resources being consumed by the hashkit
-objects that were initialized with hashkit_create() or hashkit_clone().
-
-The hashkit_is_allocated() reports where the memory was allocated 
-for a hashkit object.
-
-=head1 RETURN VALUE
-
-hashkit_create() and hashkit_clone() will return NULL on failure or
-non-NULL on success.
-
-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.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=cut
diff --git a/docs/hashkit_create.rst b/docs/hashkit_create.rst
new file mode 100644 (file)
index 0000000..3d801b1
--- /dev/null
@@ -0,0 +1,77 @@
+============================
+Creating a hashkit structure
+============================
+
+
+Create and destroy hashkit objects
+
+
+-------
+LIBRARY
+-------
+
+
+C Library for hashing algorithms (libmemcached, -lhashkit)
+
+
+--------
+SYNOPSIS
+--------
+
+
+
+.. code-block:: perl
+
+   #include <libmemcached/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);
+
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+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.
+
+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.
+
+The hashkit_free() frees any resources being consumed by the hashkit
+objects that were initialized with hashkit_create() or hashkit_clone().
+
+The hashkit_is_allocated() reports where the memory was allocated 
+for a hashkit object.
+
+
+------------
+RETURN VALUE
+------------
+
+
+hashkit_create() and hashkit_clone() will return NULL on failure or
+non-NULL on success.
+
+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.
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
diff --git a/docs/hashkit_functions.pod b/docs/hashkit_functions.pod
deleted file mode 100644 (file)
index 4af8418..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-=head1 NAME
-
-hashkit_default, hashkit_fnv1_64, hashkit_fnv1a_64, hashkit_fnv1_32,
-hashkit_fnv1a_32, hashkit_crc32, hashkit_hsieh, hashkit_murmur,
-hashkit_jenkins, hashkit_md5 - Various hash functions to use for
-calculating values for keys
-
-=head1 LIBRARY
-
-C Library for hashing algorithms (libhashkit, -lhashkit)
-
-=head1 SYNOPSIS
-
-  #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);
-
-=head1 DESCRIPTION
-
-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).
-
-The hashkit_hsieh() is only available if the library is built with
-the appropriate flag enabled.
-
-=head1 RETURN VALUE
-
-A 32-bit hash value.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-hashkit_create(3) hashkit_value(3) hashkit_set_hash_fn(3)
-hashkit_set_continuum_hash_fn(3)
-
-=cut
diff --git a/docs/hashkit_functions.rst b/docs/hashkit_functions.rst
new file mode 100644 (file)
index 0000000..542fd95
--- /dev/null
@@ -0,0 +1,77 @@
+================
+Available Hashes
+================
+
+
+Various hash functions to use for calculating values for keys
+
+
+-------
+LIBRARY
+-------
+
+
+C Library for hashing algorithms (libmemcached, -lhashkit)
+
+
+--------
+SYNOPSIS
+--------
+
+
+
+.. code-block:: perl
+
+   #include <libmemcached/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);
+
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+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).
+
+The hashkit_hsieh() is only available if the library is built with
+the appropriate flag enabled.
+
+
+------------
+RETURN VALUE
+------------
+
+
+A 32-bit hash value.
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+--------
+SEE ALSO
+--------
+
+
+hashkit_create(3) hashkit_value(3) hashkit_set_hash_fn(3)
+hashkit_set_continuum_hash_fn(3)
+
diff --git a/docs/hashkit_value.pod b/docs/hashkit_value.pod
deleted file mode 100644 (file)
index db594bc..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-=head1 NAME
-
-hashkit_value - Generate a value for the given key
-
-=head1 LIBRARY
-
-C Library for hashing algorithms (libhashkit, -lhashkit)
-
-=head1 SYNOPSIS
-
-  #include <libhashkit/hashkit.h>
-
-  uint32_t hashkit_value(hashkit_st *hash,
-                         const char *key,
-                         size_t key_length);
-
-=head1 DESCRIPTION
-
-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.
-
-=head1 RETURN VALUE
-
-A 32-bit hash value.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-hashkit_create(3) hashkit_set_distribution(3) hashkit_set_hash_fn(3)
-
-=cut
diff --git a/docs/hashkit_value.rst b/docs/hashkit_value.rst
new file mode 100644 (file)
index 0000000..c318487
--- /dev/null
@@ -0,0 +1,67 @@
+=============
+hashkit_value
+=============
+
+
+Generate a value for the given key
+
+
+-------
+LIBRARY
+-------
+
+
+C Library for hashing algorithms (libmemcached, -lhashkit)
+
+
+--------
+SYNOPSIS
+--------
+
+
+
+.. code-block:: perl
+
+   #include <libmemcached/hashkit.h>
+   uint32_t hashkit_value(hashkit_st *hash,
+                          const char *key,
+                          size_t key_length);
+
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+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.
+
+
+------------
+RETURN VALUE
+------------
+
+
+A 32-bit hash value.
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+--------
+SEE ALSO
+--------
+
+
+hashkit_create(3) hashkit_set_distribution(3) hashkit_set_hash_fn(3)
+
diff --git a/docs/include.am b/docs/include.am
new file mode 100644 (file)
index 0000000..28cea23
--- /dev/null
@@ -0,0 +1,284 @@
+# vim:ft=automake
+# included from Top Level Makefile.am
+# All paths should be given relative to the root
+
+EXTRA_DIST+= \
+            docs/conf.py \
+            docs/hashkit_create.rst \
+            docs/hashkit_functions.rst \
+            docs/hashkit_value.rst \
+            docs/index.rst \
+            docs/libhashkit.rst \
+            docs/libmemcached.rst \
+            docs/libmemcached_configuration.rst \
+            docs/libmemcached_examples.rst \
+            docs/libmemcachedutil.rst \
+            docs/memaslap.rst \
+            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_pool.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 \
+            docs/memcapable.rst \
+            docs/memcat.rst \
+            docs/memcp.rst \
+            docs/memdump.rst \
+            docs/memerror.rst \
+            docs/memflush.rst \
+            docs/memrm.rst \
+            docs/memslap.rst \
+            docs/memstat.rst
+
+# Makefile for Sphinx documentation
+#
+
+SPHINXOPTS    = ${SPHINX_WARNINGS} -D release=${PANDORA_RELEASE_VERSION}
+PAPER         =
+SPHINX_BUILDDIR      = ${top_builddir}/docs
+
+# Internal variables.
+PAPEROPT_a4     = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS   = -d $(SPHINX_BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) ${top_srcdir}/docs
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
+
+man_MANS+= \
+          docs/man/hashkit_clone.3 \
+          docs/man/hashkit_crc32.3 \
+          docs/man/hashkit_create.3 \
+          docs/man/hashkit_fnv1_32.3 \
+          docs/man/hashkit_fnv1_64.3 \
+          docs/man/hashkit_fnv1a_32.3 \
+          docs/man/hashkit_fnv1a_64.3 \
+          docs/man/hashkit_free.3 \
+          docs/man/hashkit_functions.3 \
+          docs/man/hashkit_hsieh.3 \
+          docs/man/hashkit_is_allocated.3 \
+          docs/man/hashkit_jenkins.3 \
+          docs/man/hashkit_md5.3 \
+          docs/man/hashkit_murmur.3 \
+          docs/man/hashkit_value.3 \
+          docs/man/libhashkit.3 \
+          docs/man/libmemcached.3 \
+          docs/man/libmemcached_examples.3 \
+          docs/man/libmemcachedutil.3 \
+          docs/man/memaslap.1 \
+          docs/man/memcached_add.3 \
+          docs/man/memcached_add_by_key.3 \
+          docs/man/memcached_analyze.3 \
+          docs/man/memcached_append.3 \
+          docs/man/memcached_append_by_key.3 \
+          docs/man/memcached_behavior_get.3 \
+          docs/man/memcached_behavior_set.3 \
+          docs/man/memcached_callback_get.3 \
+          docs/man/memcached_callback_set.3 \
+          docs/man/memcached_cas.3 \
+          docs/man/memcached_cas_by_key.3 \
+          docs/man/memcached_clone.3 \
+          docs/man/memcached_create.3 \
+          docs/man/memcached_decrement.3 \
+          docs/man/memcached_decrement_with_initial.3 \
+          docs/man/memcached_delete.3 \
+          docs/man/memcached_delete_by_key.3 \
+          docs/man/memcached_destroy_sasl_auth_data.3 \
+          docs/man/memcached_dump.3 \
+          docs/man/memcached_fetch.3 \
+          docs/man/memcached_fetch_execute.3 \
+          docs/man/memcached_fetch_result.3 \
+          docs/man/memcached_flush_buffers.3 \
+          docs/man/memcached_free.3 \
+          docs/man/memcached_generate_hash.3 \
+          docs/man/libmemcached_check_configuration.3 \
+          docs/man/libmemcached_configuration.3 \
+          docs/man/memcached_create_with_options.3 \
+          docs/man/memcached_generate_hash_value.3 \
+          docs/man/memcached_get.3 \
+          docs/man/memcached_get_by_key.3 \
+          docs/man/memcached_get_memory_allocators.3 \
+          docs/man/memcached_get_sasl_callbacks.3 \
+          docs/man/memcached_get_user_data.3 \
+          docs/man/memcached_increment.3 \
+          docs/man/memcached_increment_with_initial.3 \
+          docs/man/memcached_lib_version.3 \
+          docs/man/memcached_mget.3 \
+          docs/man/memcached_mget_by_key.3 \
+          docs/man/memcached_mget_execute.3  \
+          docs/man/memcached_mget_execute_by_key.3  \
+          docs/man/memcached_pool_behavior_get.3 \
+          docs/man/memcached_pool_behavior_set.3 \
+          docs/man/memcached_pool_create.3 \
+          docs/man/memcached_pool_destroy.3 \
+          docs/man/memcached_pool_pop.3 \
+          docs/man/memcached_pool_push.3 \
+          docs/man/memcached_prepend.3 \
+          docs/man/memcached_prepend_by_key.3 \
+          docs/man/memcached_quit.3 \
+          docs/man/memcached_replace.3 \
+          docs/man/memcached_replace_by_key.3 \
+          docs/man/memcached_sasl_set_auth_data.3 \
+          docs/man/memcached_server_add.3 \
+          docs/man/memcached_server_count.3 \
+          docs/man/memcached_server_cursor.3 \
+          docs/man/memcached_server_list.3 \
+          docs/man/memcached_server_list_append.3 \
+          docs/man/memcached_server_list_count.3 \
+          docs/man/memcached_server_list_free.3 \
+          docs/man/memcached_server_push.3 \
+          docs/man/memcached_servers_parse.3 \
+          docs/man/memcached_set.3 \
+          docs/man/memcached_set_by_key.3 \
+          docs/man/memcached_set_memory_allocators.3 \
+          docs/man/memcached_set_sasl_callbacks.3 \
+          docs/man/memcached_set_user_data.3 \
+          docs/man/memcached_stat.3 \
+          docs/man/memcached_stat_execute.3 \
+          docs/man/memcached_stat_get_keys.3 \
+          docs/man/memcached_stat_get_value.3 \
+          docs/man/memcached_stat_servername.3 \
+          docs/man/memcached_strerror.3 \
+          docs/man/memcached_verbosity.3 \
+          docs/man/memcached_version.3 \
+          docs/man/memcapable.1 \
+          docs/man/memcat.1 \
+          docs/man/memcp.1 \
+          docs/man/memdump.1 \
+          docs/man/memerror.1 \
+          docs/man/memflush.1 \
+          docs/man/memrm.1 \
+          docs/man/memslap.1 \
+          docs/man/memstat.1
+
+
+if HAVE_SPHINX
+sphinx-help:
+       @echo "Please use \`make <target>' where <target> is one of"
+       @echo "  html       to make standalone HTML files"
+       @echo "  dirhtml    to make HTML files named index.html in directories"
+       @echo "  singlehtml to make a single large HTML file"
+       @echo "  pickle     to make pickle files"
+       @echo "  json       to make JSON files"
+       @echo "  htmlhelp   to make HTML files and a HTML help project"
+       @echo "  qthelp     to make HTML files and a qthelp project"
+       @echo "  devhelp    to make HTML files and a Devhelp project"
+       @echo "  epub       to make an epub"
+       @echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+       @echo "  latexpdf   to make LaTeX files and run them through pdflatex"
+       @echo "  text       to make text files"
+       @echo "  man        to make manual pages"
+       @echo "  changes    to make an overview of all changed/added/deprecated items"
+       @echo "  linkcheck  to check all external links for integrity"
+       @echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
+
+html-local:
+       PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/html
+       @echo
+       @echo "Build finished. The HTML pages are in $(SPHINX_BUILDDIR)/html."
+
+dirhtml:
+       PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/dirhtml
+       @echo
+       @echo "Build finished. The HTML pages are in $(SPHINX_BUILDDIR)/dirhtml."
+
+singlehtml:
+       PYTHONPATH=${top_srcdir}/docs  $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/singlehtml
+       @echo
+       @echo "Build finished. The HTML page is in $(SPHINX_BUILDDIR)/singlehtml."
+
+pickle:
+       PYTHONPATH=${top_srcdir}/docs  $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/pickle
+       @echo
+       @echo "Build finished; now you can process the pickle files."
+
+json:
+       PYTHONPATH=${top_srcdir}/docs  $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/json
+       @echo
+       @echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+       PYTHONPATH=${top_srcdir}/docs  $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/htmlhelp
+       @echo
+       @echo "Build finished; now you can run HTML Help Workshop with the" \
+             ".hhp project file in $(SPHINX_BUILDDIR)/htmlhelp."
+
+qthelp:
+       PYTHONPATH=${top_srcdir}/docs  $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/qthelp
+       @echo
+       @echo "Build finished; now you can run "qcollectiongenerator" with the" \
+             ".qhcp project file in $(SPHINX_BUILDDIR)/qthelp, like this:"
+       @echo "# qcollectiongenerator $(SPHINX_BUILDDIR)/qthelp/Libmemcached.qhcp"
+       @echo "To view the help file:"
+       @echo "# assistant -collectionFile $(SPHINX_BUILDDIR)/qthelp/Libmemcached.qhc"
+
+devhelp:
+       PYTHONPATH=${top_srcdir}/docs  $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/devhelp
+       @echo
+       @echo "Build finished."
+       @echo "To view the help file:"
+       @echo "# mkdir -p $$HOME/.local/share/devhelp/Libmemcached"
+       @echo "# ln -s $(SPHINX_BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Libmemcached"
+       @echo "# devhelp"
+
+epub:
+       PYTHONPATH=${top_srcdir}/docs  $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/epub
+       @echo
+       @echo "Build finished. The epub file is in $(SPHINX_BUILDDIR)/epub."
+
+latex:
+       PYTHONPATH=${top_srcdir}/docs  $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/latex
+       @echo
+       @echo "Build finished; the LaTeX files are in $(SPHINX_BUILDDIR)/latex."
+       @echo "Run \`make' in that directory to run these through (pdf)latex" \
+             "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf: latex
+       PYTHONPATH=${top_srcdir}/docs  $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/latex
+       @echo "Running LaTeX files through pdflatex..."
+       make -C $(SPHINX_BUILDDIR)/latex all-pdf
+       @echo "pdflatex finished; the PDF files are in $(SPHINX_BUILDDIR)/latex."
+
+text:
+       PYTHONPATH=${top_srcdir}/docs  $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/text
+       @echo
+       @echo "Build finished. The text files are in $(SPHINX_BUILDDIR)/text."
+
+man:
+       PYTHONPATH=${top_srcdir}/docs  $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/man
+       @echo
+       @echo "Build finished. The manual pages are in $(SPHINX_BUILDDIR)/man."
+
+changes:
+       PYTHONPATH=${top_srcdir}/docs  $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/changes
+       @echo
+       @echo "The overview file is in $(SPHINX_BUILDDIR)/changes."
+
+linkcheck:
+       PYTHONPATH=${top_srcdir}/docs  $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/linkcheck
+       @echo
+       @echo "Link check complete; look for any errors in the above output " \
+             "or in $(SPHINX_BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+       PYTHONPATH=${top_srcdir}/docs  $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/doctest
+       @echo "Testing of doctests in the sources finished, look at the " \
+             "results in $(SPHINX_BUILDDIR)/doctest/output.txt."
+endif
diff --git a/docs/index.rst b/docs/index.rst
new file mode 100644 (file)
index 0000000..00a437d
--- /dev/null
@@ -0,0 +1,85 @@
+=========================================
+Welcome to the libmemcached documentation
+=========================================
+
+------------
+Libmemcached
+------------
+
+.. toctree::
+   :maxdepth: 1
+
+   libmemcached
+   libmemcached_examples
+   libmemcached_configuration
+   memcached_analyze
+   memcached_auto
+   memcached_behavior
+   memcached_callback
+   memcached_create
+   memcached_delete
+   memcached_dump
+   memcached_flush_buffers
+   memcached_flush
+   memcached_generate_hash_value
+   memcached_get
+   memcached_memory_allocators
+   memcached_quit
+   memcached_result_st
+   memcached_sasl
+   memcached_servers
+   memcached_server_st
+   memcached_set
+   memcached_stats
+   memcached_strerror
+   memcached_user_data
+   memcached_verbosity
+   memcached_version
+
+----------------
+Libmemcachedutil
+----------------
+
+.. toctree::
+   :maxdepth: 1
+
+   libmemcachedutil
+   memcached_pool
+
+-------------------
+Client Applications
+-------------------
+
+.. toctree::
+   :maxdepth: 1
+
+   memcapable
+   memcat
+   memcp
+   memdump
+   memerror
+   memflush
+   memrm
+   memslap
+   memaslap
+   memstat
+
+----------
+Libhashkit
+----------
+
+.. toctree::
+   :maxdepth: 1
+
+   libhashkit
+   hashkit_create
+   hashkit_functions
+   hashkit_value
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+
diff --git a/docs/libhashkit.rst b/docs/libhashkit.rst
new file mode 100644 (file)
index 0000000..a5870c5
--- /dev/null
@@ -0,0 +1,49 @@
+======================
+Introducing libhashkit
+======================
+
+
+-------
+LIBRARY
+-------
+
+
+C library collection of useful hashing algorithm (libhashkit, -lhashkit)
+
+
+--------
+SYNOPSIS
+--------
+
+
+.. code-block:: perl
+
+   cc [ flag ... ] file ... -lhashkit
+   #include <libhashkit/hashkit.h>
+
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+\ **libhashkit**\  is a small and thread-safe client library that provides a collection of useful hashing algorithm. libhashkit is distributed with libmemcached.
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+--------
+SEE ALSO
+--------
+
+:manpage:`libmemcached(3)`
+
diff --git a/docs/libmemcached.pod b/docs/libmemcached.pod
deleted file mode 100644 (file)
index 46fc2da..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-=head1 NAME
-
-libmemcached - Client library for memcached
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-=head1 DESCRIPTION
-
-"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." L<http://danga.com/memcached/>
-
-B<libmemcached> 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.
-
-There are multiple implemented routing and hashing methods. See the
-memcached_behavior_set() manpage.
-
-All operations are performed against a C<memcached_st> 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 C<memcached_st>. It is not
-recommended that you operate directly against the structure.
-
-Nearly all functions return a C<memcached_return_t> value.
-This value can be translated to a printable string with memcached_strerror(3).
-
-Partitioning based on keys is supported in the library. Using the key partioning 
-functions it is possible to group sets of object onto servers.
-
-C<memcached_st> 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.
-
-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. 
-
-PKG_CHECK_MODULES(DEPS, libmemcached >= 0.8.0)
-AC_SUBST(DEPS_CFLAGS)
-AC_SUBST(DEPS_LIBS)
-
-Some features of the library must be enabled through memcached_behavior_set(). 
-
-Hope you enjoy it!
-
-=head1 CONSTANTS
-
-A number of constants have been provided for in the library.
-
-=over 4
-
-=item MEMCACHED_DEFAULT_PORT
-
-The default port used by memcached(3).
-
-=item MEMCACHED_MAX_KEY
-
-Default maximum size of a key (which includes the null pointer). Master keys
-have no limit, this only applies to keys used for storage.
-
-=item MEMCACHED_MAX_KEY
-
-Default size of key (which includes the null pointer).
-
-=item MEMCACHED_STRIDE
-
-This is the "stride" used in the consistent hash used between replicas.
-
-=item MEMCACHED_MAX_HOST_LENGTH
-
-Maximum allowed size of the hostname.
-
-=item MEMCACHED_VERSION_STRING
-
-String value of libmemcached version such as "1.23.4"
-
-=item MEMCACHED_MAJOR_VERSION
-
-Major version value. Such as 1.23.4, would be 1 
-
-=item MEMCACHED_MINOR_VERSION
-
-Major version value. Such as 1.23.4, would be 23 
-
-=item MEMCACHED_MICRO_VERSION
-
-Major version value. Such as 1.23.4, would be 4 
-
-
-=back
-
-
-
-=head1 THREADS AND PROCESSES
-
-When using threads or forked processes it is important to keep an instance
-of C<memcached_st> per process or thread. Without creating your own locking
-structures you can not share a single C<memcached_st>. You can though call
-memcached_quit(3) on a C<memcached_st> and then use the resulting cloned
-structure.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-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)
-
-=cut
-
diff --git a/docs/libmemcached.rst b/docs/libmemcached.rst
new file mode 100644 (file)
index 0000000..c60cf99
--- /dev/null
@@ -0,0 +1,146 @@
+==============================================
+Introducing the C Client Library for memcached
+==============================================
+
+--------
+SYNOPSIS
+--------
+
+#include <libmemcached/memcached.h>
+
+Compile and link with -lmemcached
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+"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." `http://danga.com/memcached/ <http://danga.com/memcached/>`_
+
+\ **libmemcached**\  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.
+
+There are multiple implemented routing and hashing methods. See the
+memcached_behavior_set() manpage.
+
+All operations are performed against a \ ``memcached_st``\  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 \ ``memcached_st``\ . It is not
+recommended that you operate directly against the structure.
+
+Nearly all functions return a \ ``memcached_return_t``\  value.
+This value can be translated to a printable string with memcached_strerror(3).
+
+Partitioning based on keys is testsed in the library. Using the key partioning 
+functions it is possible to group sets of object onto servers.
+
+\ ``memcached_st``\  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.
+
+If you are working with GNU autotools you will want to add the following to
+your COPYING to properly include libmemcached in your application.
+
+PKG_CHECK_MODULES(DEPS, libmemcached >= 0.8.0)
+AC_SUBST(DEPS_CFLAGS)
+AC_SUBST(DEPS_LIBS)
+
+Some features of the library must be enabled through memcached_behavior_set().
+
+Hope you enjoy it!
+
+
+---------
+CONSTANTS
+---------
+
+
+A number of constants have been provided for in the library.
+
+
+.. c:var:: MEMCACHED_DEFAULT_PORT
+ The default port used by memcached(3).
+
+
+.. c:var:: MEMCACHED_MAX_KEY
+ Default maximum size of a key (which includes the null pointer). Master keys
+ have no limit, this only applies to keys used for storage.
+
+
+.. c:var:: MEMCACHED_MAX_KEY
+ Default size of key (which includes the null pointer).
+
+
+.. c:var:: MEMCACHED_STRIDE
+ This is the "stride" used in the consistent hash used between replicas.
+
+
+.. c:var:: MEMCACHED_MAX_HOST_LENGTH
+ Maximum allowed size of the hostname.
+
+.. c:var:: LIBMEMCACHED_VERSION_STRING
+ String value of libmemcached version such as "1.23.4"
+
+
+.. c:var:: LIBMEMCACHED_VERSION_HEX
+ Hex value of the version number. "0x00048000" This can be used for comparing versions based on number.
+
+
+
+---------------------
+THREADS AND PROCESSES
+---------------------
+
+
+When using threads or forked processes it is important to keep an instance
+of \ ``memcached_st``\  per process or thread. Without creating your own locking
+structures you can not share a single \ ``memcached_st``\ . You can though call
+memcached_quit(3) on a \ ``memcached_st``\  and then use the resulting cloned
+structure.
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+--------
+SEE ALSO
+--------
+
+
+:manpage:`memcached(1)` :manpage:`libmemcached_examples(3)` :manpage:`libmemcached(1)` :manpage:`memcat(1)` :manpage:`memcp(1)` :manpage:`memflush(1)` :manpage:`memrm(1)` :manpage:`memslap(1)` :manpage:`memstat(1)` :manpage:`memcached_fetch(3)` :manpage:`memcached_replace(3)` :manpage:`memcached_server_list_free(3)` :manpage:`libmemcached_examples(3)` :manpage:`memcached_clone(3)` :manpage:`memcached_free(3)`
+:manpage:`memcached_server_add(3)` :manpage:`memcached_server_push(3)` :manpage:`memcached_add(3)` :manpage:`memcached_get(3)` :manpage:`memcached_server_count(3)` :manpage:`memcached_servers_parse(3)` :manpage:`memcached_create(3)` :manpage:`memcached_increment(3)` :manpage:`memcached_server_list(3)` :manpage:`memcached_set(3)`
+:manpage:`memcached_decrement(3)` :manpage:`memcached_mget(3)` :manpage:`memcached_server_list_append(3)` :manpage:`memcached_strerror(3)` :manpage:`memcached_delete(3)` :manpage:`memcached_quit(3)` :manpage:`memcached_server_list_count(3)` :manpage:`memcached_verbosity(3)` :manpage:`memcached_server_add_unix_socket(3)` :manpage:`memcached_result_create(3)`  :manpage:`memcached_result_free(3)`
+:manpage:`memcached_result_key_value(3)`  :manpage:`memcached_result_key_length(3)`  :manpage:`memcached_result_value(3)`  :manpage:`memcached_result_length(3)`  :manpage:`memcached_result_flags(3)`  
+:manpage:`memcached_result_cas(3)` :manpage:`memcached_result_st(3)` :manpage:`memcached_append(3)` :manpage:`memcached_prepend(3)` :manpage:`memcached_fetch_result(3)` 
+:manpage:`memerror(1)` :manpage:`memcached_get_by_key(3)` :manpage:`memcached_mget_by_key(3)` :manpage:`memcached_delete_by_key(3)` 
+:manpage:`memcached_fetch_execute(3)` :manpage:`memcached_callback_get(3)` :manpage:`memcached_callback_set(3)` :manpage:`memcached_version(3)` 
+:manpage:`memcached_lib_version(3)` :manpage:`memcached_result_set_value(3)` :manpage:`memcached_dump(3)` :manpage:`memdump(1)`
+:manpage:`memcached_set_memory_allocators(3)` :manpage:`memcached_get_memory_allocators(3)` :manpage:`memcached_get_user_data(3)` :manpage:`memcached_set_user_data(3)`
diff --git a/docs/libmemcached_configuration.rst b/docs/libmemcached_configuration.rst
new file mode 100644 (file)
index 0000000..10103f5
--- /dev/null
@@ -0,0 +1,188 @@
+========================
+Configuring Libmemcached
+========================
+
+-------- 
+SYNOPSIS 
+--------
+
+
+.. c:function:: memcached_st *memcached_create_with_options(const char *string, size_t string_length)
+
+
+.. c:function:: memcached_return_t libmemcached_check_configuration(const char *option_string, size_t length, char *error_buffer, size_t error_buffer_size)
+
+Compile and link with -lmemcached
+
+
+
+-----------
+DESCRIPTION
+-----------
+
+Libmemcached implements a custom language for configuring and modifying
+servers. By passing in an option string you can generate a memcached_st object
+that you can use in your application directly.
+
+
+.. describe:: --SERVER=<servername>:<optional_port>/?<optional_weight>
+
+Provide a servername to be used by the client. Providing a weight will cause weighting to occur with all hosts with each server getting a default weight of 1.
+
+.. describe:: --VERIFY-KEY
+
+Verify that keys that are being used fit within the design of the protocol being used.
+
+.. describe:: --REMOVE_FAILED_SERVERS
+
+Enable the behavior MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS.
+
+.. describe:: --BINARY-PROTOCOL
+
+Force all connections to use the binary protocol.
+
+.. describe:: --BUFFER-REQUESTS
+
+Enable MEMCACHED_BEHAVIOR_BUFFER_REQUESTS.
+
+.. describe:: --CONFIGURE-FILE=
+
+Provide a configuration file to be used to load requests. Beware that by using a configuration file libmemcached will reset memcached_st based on information only contained in the file.
+
+.. describe:: --CONNECT-TIMEOUT=
+
+Enable MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT. 
+
+.. describe:: --DISTRIBUTION=
+
+Set the distribution model used by the client.  See :manpage:`` for more details.
+
+.. describe:: --HASH=
+
+Set the hashing alogrthm used for placing keys on servers.
+
+.. describe:: --HASH-WITH-PREFIX_KEY
+
+.. describe:: --IO-BYTES-WATERMARK=
+
+.. describe:: --IO-KEY-PREFETCH=
+
+.. describe:: --IO-MSG-WATERMARK=
+
+.. describe:: --NOREPLY
+
+.. describe:: --NUMBER-OF-REPLICAS=
+
+Set the nummber of servers that keys will be replicated to.
+
+.. describe:: --POLL-TIMEOUT=
+
+.. describe:: --RANDOMIZE-REPLICA-READ
+
+Select randomly the server within the replication pool to read from.
+
+.. describe:: --RCV-TIMEOUT=
+
+.. describe:: --RETRY-TIMEOUT=
+
+See :manpage:`memcached_behavior_set(3)` for MEMCACHED_BEHAVIOR_RETRY_TIMEOUT
+
+.. describe:: --SERVER-FAILURE-LIMIT=
+
+See :manpage:`memcached_behavior_set(3)` for MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+
+.. describe:: --SND-TIMEOUT=
+
+See :manpage:`memcached_behavior_set(3)` for MEMCACHED_BEHAVIOR_SND_TIMEOUT
+
+.. describe:: --SOCKET-RECV-SIZE=
+
+See :manpage:`memcached_behavior_set(3)` for MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE
+
+.. describe:: --SOCKET-SEND-SIZE=
+
+See :manpage:`memcached_behavior_set(3)` for MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE
+
+.. describe:: --SORT-HOSTS
+
+When adding new servers always calculate their distribution based on sorted naming order.
+
+.. describe:: --SUPPORT-CAS
+
+See :manpage:`memcached_behavior_set(3)` for MEMCACHED_BEHAVIOR_SUPPORT_CAS
+
+.. describe:: --TCP-NODELAY
+
+See :manpage:`memcached_behavior_set(3)` for MEMCACHED_BEHAVIOR_TCP_NODELAY
+
+.. describe:: --TCP-KEEPALIVE
+
+See :manpage:`memcached_behavior_set(3)` for MEMCACHED_BEHAVIOR_TCP_KEEPALIVE
+
+.. describe:: --TCP-KEEPIDLE
+
+.. describe:: --USE-UDP
+
+See :manpage:`memcached_behavior_set(3)` for MEMCACHED_BEHAVIOR_USE_UDP
+
+.. describe:: --PREFIX-KEY=
+
+.. describe:: INCLUDE
+
+Include a file in configuration. Unlike --CONFIGURE-FILE= this will not reset memcached_st
+
+.. describe:: RESET
+
+Reset memcached_st and continue to process.
+
+.. describe:: END
+
+End configutation processing.
+
+.. describe:: ERROR
+
+End configutation processing and throw an error.
+
+
+------
+RETURN
+------
+
+
+memcached_create_with_options() returns a pointer to the memcached_st that was
+created (or initialized).  On an allocation failure, it returns NULL.
+
+
+
+------- 
+EXAMPLE 
+-------
+
+
+.. code-block:: c
+
+   const char *config_string= "--SERVER=host10.example.com --SERVER=host11.example.com --SERVER=host10.example.com"
+   memcached_st *memc= memcached_create_with_options(config_string, strlen(config_string);
+   {
+    ...
+   }
+   memcached_free(memc);
+
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+
+--------
+SEE ALSO
+--------
+
+
+:manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)`
diff --git a/docs/libmemcached_examples.pod b/docs/libmemcached_examples.pod
deleted file mode 100644 (file)
index 1c937fe..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-=head1 NAME
-
-libmemcached_examples - Examples for libmemcached
-
-=head1 DESCRIPTION
-
-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.
-
-=head2 Creating and Freeing structure
-
-  memcached_st *memc;
-  memcached_return_t rc;
-
-  memc= memcached_create(NULL);
-  ...do stuff...
-  memcached_free(memc);
-
-The above code would create a connection and then free the connection when
-finished.
-
-=head2 Connecting to servers
-
-  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);
-
-In the above code you create a C<memcached_st> object that you then feed in a
-single host into. In the for loop you build a C<memcached_server_st>
-pointer that you then later feed via memcached_server_push() into the
-C<memcached_st> structure.
-
-You can reuse the C<memcached_server_st> object with multile C<memcached_st>
-structures.
-
-=head2 Adding a value to the server
-
-  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);
-
-It is best practice to always look at the return value of any operation.
-
-=head2 Fetching multiple values
-
-  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++;
-  }
-
-Notice that you freed values returned from memcached_fetch(). The define
-C<MEMCACHED_MAX_KEY> is provided for usage.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1)
-
-=cut
-
diff --git a/docs/libmemcached_examples.rst b/docs/libmemcached_examples.rst
new file mode 100644 (file)
index 0000000..922ee14
--- /dev/null
@@ -0,0 +1,137 @@
+========
+Examples
+========
+
+Examples for libmemcached
+
+-----------
+DESCRIPTION
+-----------
+
+
+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.
+
+------------------------------
+Creating and Freeing structure
+------------------------------
+
+
+.. code-block:: c
+
+   memcached_st *memc;
+   memcached_return_t rc;
+   memc= memcached_create(NULL);
+   ...do stuff...
+   memcached_free(memc);
+
+
+The above code would create a connection and then free the connection when
+finished.
+
+
+---------------------
+Connecting to servers
+---------------------
+
+
+
+.. code-block:: c
+
+   const char *config_string= "--SERVER=host10.example.com --SERVER=host11.example.com --SERVER=host10.example.com"
+   memcached_st *memc= memcached_create_with_options(config_string, strlen(config_string);
+   {
+    ...
+   }
+   memcached_free(memc);
+
+
+In the above code you create a \ ``memcached_st``\  object with three server by making use of :manpage:`memcached_create_with_options(3)`.
+
+
+----------------------------
+Adding a value to the server
+----------------------------
+
+
+
+.. code-block:: 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);
+
+
+It is best practice to always look at the return value of any operation.
+
+
+------------------------
+Fetching multiple values
+------------------------
+
+
+
+.. code-block:: 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++;
+   }
+
+
+Notice that you freed values returned from memcached_fetch(). The define
+\ ``MEMCACHED_MAX_KEY``\  is provided for usage.
+
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+--------
+SEE ALSO
+--------
+
+
+:manpage:`memcached(1)`
+
diff --git a/docs/libmemcachedutil.pod b/docs/libmemcachedutil.pod
deleted file mode 100644 (file)
index fd2e4f6..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-=head1 NAME
-
-libmemcachedutil - Utility library for libmemcached
-
-=head1 LIBRARY
-
-C Client Library containing utility functions for libmemcached (libmemcachedutil, -lmemcachedutil)
-
-=head1 SYNOPSIS
-
-  cc [ flag ... ] file ... -lmemcachedutil
-
-  #include <libmemcached/memcached_util.h>
-
-=head1 DESCRIPTION
-
-B<libmemcachedutil> is a small and thread-safe client library that provides
-extra functionality built on top of B<libmemcached>.
-
-=head1 THREADS
-
-Do not try to access an instance of C<memcached_st> from multiple threads
-at the same time. If you want to access memcached from multiple threads
-you should either clone the C<memcached_st>, or use the memcached pool
-implementation. see memcached_pool_create(3).
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Trond Norbye, E<lt>trond.norbye@gmail.comE<gt>
-
-=head1 SEE ALSO
-
-libmemcached(3) memcached_pool_create(3) memcached_pool_destroy(3) memcached_pool_pop(3) memcached_pool_push(3)
-
-=cut
diff --git a/docs/libmemcachedutil.rst b/docs/libmemcachedutil.rst
new file mode 100644 (file)
index 0000000..b942ed7
--- /dev/null
@@ -0,0 +1,66 @@
+===========
+Introducing
+===========
+
+
+Utility library for libmemcached
+
+
+-------
+LIBRARY
+-------
+
+
+C Client Library containing utility functions for libmemcached (libmemcachedutil, -lmemcachedutil -lmemcached)
+
+
+--------
+SYNOPSIS
+--------
+
+
+.. code-block:: perl
+
+   cc [ flag ... ] file ... -lmemcachedutil
+   #include <libmemcached/memcached_util.h>
+
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+\ **libmemcachedutil**\  is a small and thread-safe client library that provides
+extra functionality built on top of \ **libmemcached**\ .
+
+
+-------
+THREADS
+-------
+
+
+Do not try to access an instance of \ ``memcached_st``\  from multiple threads
+at the same time. If you want to access memcached from multiple threads
+you should either clone the \ ``memcached_st``\ , or use the memcached pool
+implementation. see memcached_pool_create(3).
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+--------
+SEE ALSO
+--------
+
+
+:manpage:`libmemcached(3)`
+:manpage:`memcached_pool_create(3)` :manpage:`memcached_pool_destroy(3)` :manpage:`memcached_pool_pop(3)` :manpage:`memcached_pool_push(3)`
+
diff --git a/docs/make_index.pl b/docs/make_index.pl
deleted file mode 100644 (file)
index cb0d190..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/perl -w
-
-use strict;
-use CGI;
-
-sub main {
-  my $cgi = new CGI;
-
-  print $cgi->start_html('Libmemcached Documentation') . "\n";
-  print $cgi->h1('Libmemcached Documentation') . "\n";
-
-  print $cgi->a({ href => "libmemcached.html" }, "Introduction to Libmemcached") . $cgi->br() . "\n";
-  print $cgi->a({ href => "libmemcached_examples.html" }, "Libmemcached Examples") . $cgi->br() . "\n";
-  print $cgi->br() . "\n";
-  print $cgi->br() . "\n";
-
-  foreach (@ARGV)
-  {
-    my $url=  $_;
-    my $name= $_;
-    $name  =~ s/\.html//g;
-    next if $name eq 'index'; 
-    next if $name eq 'libmemcached'; 
-    next if $name eq 'libmemcached_examples'; 
-    print "<li\>" . $cgi->a({ href => $url }, $name) . $cgi->br() . "\n";
-  }
-  print $cgi->end_html; 
-}
-
-main();
diff --git a/docs/man/hashkit_clone.3 b/docs/man/hashkit_clone.3
new file mode 100644 (file)
index 0000000..cd2bf02
--- /dev/null
@@ -0,0 +1,87 @@
+.TH "HASHKIT_CLONE" "3" "April 09, 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 (libmemcached, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/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
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..cd6ee8c
--- /dev/null
@@ -0,0 +1,81 @@
+.TH "HASHKIT_CRC32" "3" "April 09, 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 (libmemcached, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/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 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 DataDifferential, http://datadifferential.com/
+.\" 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..b3f78c6
--- /dev/null
@@ -0,0 +1,87 @@
+.TH "HASHKIT_CREATE" "3" "April 09, 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 (libmemcached, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/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
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..6ca4983
--- /dev/null
@@ -0,0 +1,81 @@
+.TH "HASHKIT_FNV1_32" "3" "April 09, 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 (libmemcached, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/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 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 DataDifferential, http://datadifferential.com/
+.\" 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..3112bea
--- /dev/null
@@ -0,0 +1,81 @@
+.TH "HASHKIT_FNV1_64" "3" "April 09, 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 (libmemcached, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/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 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 DataDifferential, http://datadifferential.com/
+.\" 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..0e1fb59
--- /dev/null
@@ -0,0 +1,81 @@
+.TH "HASHKIT_FNV1A_32" "3" "April 09, 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 (libmemcached, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/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 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 DataDifferential, http://datadifferential.com/
+.\" 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..3cbc785
--- /dev/null
@@ -0,0 +1,81 @@
+.TH "HASHKIT_FNV1A_64" "3" "April 09, 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 (libmemcached, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/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 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 DataDifferential, http://datadifferential.com/
+.\" 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..0c072cf
--- /dev/null
@@ -0,0 +1,87 @@
+.TH "HASHKIT_FREE" "3" "April 09, 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 (libmemcached, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/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
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..c0386cb
--- /dev/null
@@ -0,0 +1,81 @@
+.TH "HASHKIT_FUNCTIONS" "3" "April 09, 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 (libmemcached, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/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 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 DataDifferential, http://datadifferential.com/
+.\" 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..9815ff0
--- /dev/null
@@ -0,0 +1,81 @@
+.TH "HASHKIT_HSIEH" "3" "April 09, 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 (libmemcached, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/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 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 DataDifferential, http://datadifferential.com/
+.\" 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..9b556f8
--- /dev/null
@@ -0,0 +1,87 @@
+.TH "HASHKIT_IS_ALLOCATED" "3" "April 09, 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 (libmemcached, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/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
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..7096ff6
--- /dev/null
@@ -0,0 +1,81 @@
+.TH "HASHKIT_JENKINS" "3" "April 09, 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 (libmemcached, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/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 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 DataDifferential, http://datadifferential.com/
+.\" 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..21b278a
--- /dev/null
@@ -0,0 +1,81 @@
+.TH "HASHKIT_MD5" "3" "April 09, 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 (libmemcached, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/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 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 DataDifferential, http://datadifferential.com/
+.\" 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..966707b
--- /dev/null
@@ -0,0 +1,81 @@
+.TH "HASHKIT_MURMUR" "3" "April 09, 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 (libmemcached, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/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 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 DataDifferential, http://datadifferential.com/
+.\" 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..8893b0b
--- /dev/null
@@ -0,0 +1,71 @@
+.TH "HASHKIT_VALUE" "3" "April 09, 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 (libmemcached, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/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 SEE ALSO
+.sp
+hashkit_create(3) hashkit_set_distribution(3) hashkit_set_hash_fn(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/libhashkit.3 b/docs/man/libhashkit.3
new file mode 100644 (file)
index 0000000..cb73506
--- /dev/null
@@ -0,0 +1,61 @@
+.TH "LIBHASHKIT" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+libhashkit \- 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.
+.
+.SH LIBRARY
+.sp
+C library collection of useful hashing algorithm (libhashkit, \-lhashkit)
+.SH SYNOPSIS
+.sp
+.nf
+.ft C
+cc [ flag ... ] file ... \-lhashkit
+
+#include <libhashkit/hashkit.h>
+.ft P
+.fi
+.SH DESCRIPTION
+.sp
+\fBlibhashkit\fP is a small and thread\-safe client library that provides a collection of useful hashing algorithm. libhashkit is distributed with libmemcached.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH SEE ALSO
+.sp
+\fIlibmemcached(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/libmemcached.3 b/docs/man/libmemcached.3
new file mode 100644 (file)
index 0000000..d70d225
--- /dev/null
@@ -0,0 +1,155 @@
+.TH "LIBMEMCACHED" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+libmemcached \- Introducing the C Client Library for memcached
+.
+.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.
+.
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.sp
+Compile and link with \-lmemcached
+.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 testsed 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 COPYING 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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_DEFAULT_PORT
+.
+The default port used by memcached(3).
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_MAX_KEY
+.
+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
+.INDENT 0.0
+.TP
+.B MEMCACHED_MAX_KEY
+.
+Default size of key (which includes the null pointer).
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_STRIDE
+.
+This is the "stride" used in the consistent hash used between replicas.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_MAX_HOST_LENGTH
+.
+Maximum allowed size of the hostname.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B LIBMEMCACHED_VERSION_STRING
+.
+String value of libmemcached version such as "1.23.4"
+.UNINDENT
+.INDENT 0.0
+.TP
+.B LIBMEMCACHED_VERSION_HEX
+.
+Hex value of the version number. "0x00048000" This can be used for comparing versions based on number.
+.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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached_examples(3)\fP \fIlibmemcached(1)\fP \fImemcat(1)\fP \fImemcp(1)\fP \fImemflush(1)\fP \fImemrm(1)\fP \fImemslap(1)\fP \fImemstat(1)\fP \fImemcached_fetch(3)\fP \fImemcached_replace(3)\fP \fImemcached_server_list_free(3)\fP \fIlibmemcached_examples(3)\fP \fImemcached_clone(3)\fP \fImemcached_free(3)\fP
+\fImemcached_server_add(3)\fP \fImemcached_server_push(3)\fP \fImemcached_add(3)\fP \fImemcached_get(3)\fP \fImemcached_server_count(3)\fP \fImemcached_servers_parse(3)\fP \fImemcached_create(3)\fP \fImemcached_increment(3)\fP \fImemcached_server_list(3)\fP \fImemcached_set(3)\fP
+\fImemcached_decrement(3)\fP \fImemcached_mget(3)\fP \fImemcached_server_list_append(3)\fP \fImemcached_strerror(3)\fP \fImemcached_delete(3)\fP \fImemcached_quit(3)\fP \fImemcached_server_list_count(3)\fP \fImemcached_verbosity(3)\fP \fImemcached_server_add_unix_socket(3)\fP \fImemcached_result_create(3)\fP  \fImemcached_result_free(3)\fP
+\fImemcached_result_key_value(3)\fP  \fImemcached_result_key_length(3)\fP  \fImemcached_result_value(3)\fP  \fImemcached_result_length(3)\fP  \fImemcached_result_flags(3)\fP
+\fImemcached_result_cas(3)\fP \fImemcached_result_st(3)\fP \fImemcached_append(3)\fP \fImemcached_prepend(3)\fP \fImemcached_fetch_result(3)\fP
+\fImemerror(1)\fP \fImemcached_get_by_key(3)\fP \fImemcached_mget_by_key(3)\fP \fImemcached_delete_by_key(3)\fP
+\fImemcached_fetch_execute(3)\fP \fImemcached_callback_get(3)\fP \fImemcached_callback_set(3)\fP \fImemcached_version(3)\fP
+\fImemcached_lib_version(3)\fP \fImemcached_result_set_value(3)\fP \fImemcached_dump(3)\fP \fImemdump(1)\fP
+\fImemcached_set_memory_allocators(3)\fP \fImemcached_get_memory_allocators(3)\fP \fImemcached_get_user_data(3)\fP \fImemcached_set_user_data(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/libmemcached_check_configuration.3 b/docs/man/libmemcached_check_configuration.3
new file mode 100644 (file)
index 0000000..c5a81df
--- /dev/null
@@ -0,0 +1,264 @@
+.TH "LIBMEMCACHED_CHECK_CONFIGURATION" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+libmemcached_check_configuration \- 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.
+.
+.SH SYNOPSIS
+.INDENT 0.0
+.TP
+.B memcached_st *memcached_create_with_options(const char\fI\ *string\fP, size_t\fI\ string_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t libmemcached_check_configuration(const char\fI\ *option_string\fP, size_t\fI\ length\fP, char\fI\ *error_buffer\fP, size_t\fI\ error_buffer_size\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+Libmemcached implements a custom language for configuring and modifying
+servers. By passing in an option string you can generate a memcached_st object
+that you can use in your application directly.
+.INDENT 0.0
+.TP
+.B \-\-SERVER=<servername>:<optional_port>/?<optional_weight>
+.UNINDENT
+.sp
+Provide a servername to be used by the client. Providing a weight will cause weighting to occur with all hosts with each server getting a default weight of 1.
+.INDENT 0.0
+.TP
+.B \-\-VERIFY\-KEY
+.UNINDENT
+.sp
+Verify that keys that are being used fit within the design of the protocol being used.
+.INDENT 0.0
+.TP
+.B \-\-REMOVE_FAILED_SERVERS
+.UNINDENT
+.sp
+Enable the behavior MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS.
+.INDENT 0.0
+.TP
+.B \-\-BINARY\-PROTOCOL
+.UNINDENT
+.sp
+Force all connections to use the binary protocol.
+.INDENT 0.0
+.TP
+.B \-\-BUFFER\-REQUESTS
+.UNINDENT
+.sp
+Enable MEMCACHED_BEHAVIOR_BUFFER_REQUESTS.
+.INDENT 0.0
+.TP
+.B \-\-CONFIGURE\-FILE=
+.UNINDENT
+.sp
+Provide a configuration file to be used to load requests. Beware that by using a configuration file libmemcached will reset memcached_st based on information only contained in the file.
+.INDENT 0.0
+.TP
+.B \-\-CONNECT\-TIMEOUT=
+.UNINDENT
+.sp
+Enable MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT.
+.INDENT 0.0
+.TP
+.B \-\-DISTRIBUTION=
+.UNINDENT
+.sp
+Set the distribution model used by the client.  See :manpage:\(ga\(ga for more details.
+.INDENT 0.0
+.TP
+.B \-\-HASH=
+.UNINDENT
+.sp
+Set the hashing alogrthm used for placing keys on servers.
+.INDENT 0.0
+.TP
+.B \-\-HASH\-WITH\-PREFIX_KEY
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-IO\-BYTES\-WATERMARK=
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-IO\-KEY\-PREFETCH=
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-IO\-MSG\-WATERMARK=
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-NOREPLY
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-NUMBER\-OF\-REPLICAS=
+.UNINDENT
+.sp
+Set the nummber of servers that keys will be replicated to.
+.INDENT 0.0
+.TP
+.B \-\-POLL\-TIMEOUT=
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-RANDOMIZE\-REPLICA\-READ
+.UNINDENT
+.sp
+Select randomly the server within the replication pool to read from.
+.INDENT 0.0
+.TP
+.B \-\-RCV\-TIMEOUT=
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-RETRY\-TIMEOUT=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_RETRY_TIMEOUT
+.INDENT 0.0
+.TP
+.B \-\-SERVER\-FAILURE\-LIMIT=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+.INDENT 0.0
+.TP
+.B \-\-SND\-TIMEOUT=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SND_TIMEOUT
+.INDENT 0.0
+.TP
+.B \-\-SOCKET\-RECV\-SIZE=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE
+.INDENT 0.0
+.TP
+.B \-\-SOCKET\-SEND\-SIZE=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE
+.INDENT 0.0
+.TP
+.B \-\-SORT\-HOSTS
+.UNINDENT
+.sp
+When adding new servers always calculate their distribution based on sorted naming order.
+.INDENT 0.0
+.TP
+.B \-\-SUPPORT\-CAS
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SUPPORT_CAS
+.INDENT 0.0
+.TP
+.B \-\-TCP\-NODELAY
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_TCP_NODELAY
+.INDENT 0.0
+.TP
+.B \-\-TCP\-KEEPALIVE
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_TCP_KEEPALIVE
+.INDENT 0.0
+.TP
+.B \-\-TCP\-KEEPIDLE
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-USE\-UDP
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_USE_UDP
+.INDENT 0.0
+.TP
+.B \-\-PREFIX\-KEY=
+.UNINDENT
+.INDENT 0.0
+.TP
+.B INCLUDE
+.UNINDENT
+.sp
+Include a file in configuration. Unlike \-\-CONFIGURE\-FILE= this will not reset memcached_st
+.INDENT 0.0
+.TP
+.B RESET
+.UNINDENT
+.sp
+Reset memcached_st and continue to process.
+.INDENT 0.0
+.TP
+.B END
+.UNINDENT
+.sp
+End configutation processing.
+.INDENT 0.0
+.TP
+.B ERROR
+.UNINDENT
+.sp
+End configutation processing and throw an error.
+.SH RETURN
+.sp
+memcached_create_with_options() returns a pointer to the memcached_st that was
+created (or initialized).  On an allocation failure, it returns NULL.
+.SH EXAMPLE
+.sp
+.nf
+.ft C
+const char *config_string= "\-\-SERVER=host10.example.com \-\-SERVER=host11.example.com \-\-SERVER=host10.example.com"
+memcached_st *memc= memcached_create_with_options(config_string, strlen(config_string);
+{
+ ...
+}
+memcached_free(memc);
+.ft P
+.fi
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/libmemcached_configuration.3 b/docs/man/libmemcached_configuration.3
new file mode 100644 (file)
index 0000000..dac97b9
--- /dev/null
@@ -0,0 +1,264 @@
+.TH "LIBMEMCACHED_CONFIGURATION" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+libmemcached_configuration \- 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.
+.
+.SH SYNOPSIS
+.INDENT 0.0
+.TP
+.B memcached_st *memcached_create_with_options(const char\fI\ *string\fP, size_t\fI\ string_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t libmemcached_check_configuration(const char\fI\ *option_string\fP, size_t\fI\ length\fP, char\fI\ *error_buffer\fP, size_t\fI\ error_buffer_size\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+Libmemcached implements a custom language for configuring and modifying
+servers. By passing in an option string you can generate a memcached_st object
+that you can use in your application directly.
+.INDENT 0.0
+.TP
+.B \-\-SERVER=<servername>:<optional_port>/?<optional_weight>
+.UNINDENT
+.sp
+Provide a servername to be used by the client. Providing a weight will cause weighting to occur with all hosts with each server getting a default weight of 1.
+.INDENT 0.0
+.TP
+.B \-\-VERIFY\-KEY
+.UNINDENT
+.sp
+Verify that keys that are being used fit within the design of the protocol being used.
+.INDENT 0.0
+.TP
+.B \-\-REMOVE_FAILED_SERVERS
+.UNINDENT
+.sp
+Enable the behavior MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS.
+.INDENT 0.0
+.TP
+.B \-\-BINARY\-PROTOCOL
+.UNINDENT
+.sp
+Force all connections to use the binary protocol.
+.INDENT 0.0
+.TP
+.B \-\-BUFFER\-REQUESTS
+.UNINDENT
+.sp
+Enable MEMCACHED_BEHAVIOR_BUFFER_REQUESTS.
+.INDENT 0.0
+.TP
+.B \-\-CONFIGURE\-FILE=
+.UNINDENT
+.sp
+Provide a configuration file to be used to load requests. Beware that by using a configuration file libmemcached will reset memcached_st based on information only contained in the file.
+.INDENT 0.0
+.TP
+.B \-\-CONNECT\-TIMEOUT=
+.UNINDENT
+.sp
+Enable MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT.
+.INDENT 0.0
+.TP
+.B \-\-DISTRIBUTION=
+.UNINDENT
+.sp
+Set the distribution model used by the client.  See :manpage:\(ga\(ga for more details.
+.INDENT 0.0
+.TP
+.B \-\-HASH=
+.UNINDENT
+.sp
+Set the hashing alogrthm used for placing keys on servers.
+.INDENT 0.0
+.TP
+.B \-\-HASH\-WITH\-PREFIX_KEY
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-IO\-BYTES\-WATERMARK=
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-IO\-KEY\-PREFETCH=
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-IO\-MSG\-WATERMARK=
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-NOREPLY
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-NUMBER\-OF\-REPLICAS=
+.UNINDENT
+.sp
+Set the nummber of servers that keys will be replicated to.
+.INDENT 0.0
+.TP
+.B \-\-POLL\-TIMEOUT=
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-RANDOMIZE\-REPLICA\-READ
+.UNINDENT
+.sp
+Select randomly the server within the replication pool to read from.
+.INDENT 0.0
+.TP
+.B \-\-RCV\-TIMEOUT=
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-RETRY\-TIMEOUT=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_RETRY_TIMEOUT
+.INDENT 0.0
+.TP
+.B \-\-SERVER\-FAILURE\-LIMIT=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+.INDENT 0.0
+.TP
+.B \-\-SND\-TIMEOUT=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SND_TIMEOUT
+.INDENT 0.0
+.TP
+.B \-\-SOCKET\-RECV\-SIZE=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE
+.INDENT 0.0
+.TP
+.B \-\-SOCKET\-SEND\-SIZE=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE
+.INDENT 0.0
+.TP
+.B \-\-SORT\-HOSTS
+.UNINDENT
+.sp
+When adding new servers always calculate their distribution based on sorted naming order.
+.INDENT 0.0
+.TP
+.B \-\-SUPPORT\-CAS
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SUPPORT_CAS
+.INDENT 0.0
+.TP
+.B \-\-TCP\-NODELAY
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_TCP_NODELAY
+.INDENT 0.0
+.TP
+.B \-\-TCP\-KEEPALIVE
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_TCP_KEEPALIVE
+.INDENT 0.0
+.TP
+.B \-\-TCP\-KEEPIDLE
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-USE\-UDP
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_USE_UDP
+.INDENT 0.0
+.TP
+.B \-\-PREFIX\-KEY=
+.UNINDENT
+.INDENT 0.0
+.TP
+.B INCLUDE
+.UNINDENT
+.sp
+Include a file in configuration. Unlike \-\-CONFIGURE\-FILE= this will not reset memcached_st
+.INDENT 0.0
+.TP
+.B RESET
+.UNINDENT
+.sp
+Reset memcached_st and continue to process.
+.INDENT 0.0
+.TP
+.B END
+.UNINDENT
+.sp
+End configutation processing.
+.INDENT 0.0
+.TP
+.B ERROR
+.UNINDENT
+.sp
+End configutation processing and throw an error.
+.SH RETURN
+.sp
+memcached_create_with_options() returns a pointer to the memcached_st that was
+created (or initialized).  On an allocation failure, it returns NULL.
+.SH EXAMPLE
+.sp
+.nf
+.ft C
+const char *config_string= "\-\-SERVER=host10.example.com \-\-SERVER=host11.example.com \-\-SERVER=host10.example.com"
+memcached_st *memc= memcached_create_with_options(config_string, strlen(config_string);
+{
+ ...
+}
+memcached_free(memc);
+.ft P
+.fi
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..d274724
--- /dev/null
@@ -0,0 +1,139 @@
+.TH "LIBMEMCACHED_EXAMPLES" "3" "April 09, 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.
+.SH 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.
+.SH CONNECTING TO SERVERS
+.sp
+.nf
+.ft C
+const char *config_string= "\-\-SERVER=host10.example.com \-\-SERVER=host11.example.com \-\-SERVER=host10.example.com"
+memcached_st *memc= memcached_create_with_options(config_string, strlen(config_string);
+{
+ ...
+}
+memcached_free(memc);
+.ft P
+.fi
+.sp
+In the above code you create a \fBmemcached_st\fP object with three server by making use of \fImemcached_create_with_options(3)\fP.
+.SH 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.
+.SH 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 SEE ALSO
+.sp
+\fImemcached(1)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/libmemcachedutil.3 b/docs/man/libmemcachedutil.3
new file mode 100644 (file)
index 0000000..ca993e1
--- /dev/null
@@ -0,0 +1,71 @@
+.TH "LIBMEMCACHEDUTIL" "3" "April 09, 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
+Utility library for libmemcached
+.SH LIBRARY
+.sp
+C Client Library containing utility functions for libmemcached (libmemcachedutil, \-lmemcachedutil \-lmemcached)
+.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 SEE ALSO
+.sp
+\fIlibmemcached(3)\fP
+\fImemcached_pool_create(3)\fP \fImemcached_pool_destroy(3)\fP \fImemcached_pool_pop(3)\fP \fImemcached_pool_push(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memaslap.1 b/docs/man/memaslap.1
new file mode 100644 (file)
index 0000000..ca4926a
--- /dev/null
@@ -0,0 +1,1220 @@
+.TH "MEMASLAP" "1" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memaslap \- 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.
+.
+.SH SYNOPSIS
+.INDENT 0.0
+.TP
+.B \-\-help
+.UNINDENT
+.SH DESCRIPTION
+.sp
+\fBmemaslap\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 testss 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 memaslap 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 memaslap, both TCP and UDP use non\-blocking network IO. All
+the network events are managed by libevent as memcached. The network module
+of memaslap is similar to memcached. Libevent can ensure
+memaslap 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 testss 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 memaslap 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,
+memaslap 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,
+memaslap 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 memaslap 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, memaslap 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
+memaslap with different window sizes can get different cache
+miss rates. If memaslap adds enough objects into the windows at
+the beginning, and the cache of memcached cannot store all the objects
+initialized, then memaslap 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, memaslap can assign
+different threads to handle different memcached servers. This is just one of
+the ways in which memaslap testss multiple servers. The only
+limitation is that the number of servers cannot be greater than the number
+of threads. The other way to tests multiple servers is for replication
+test. Each concurrency has one socket connection to each memcached server.
+For the implementation, memaslap 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, memaslap will collect enough get commands and
+pack and send the commands together.
+.sp
+Memslap testss 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
+testss 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
+memaslap \-s 127.0.0.1:11211 \-S 5s
+.sp
+memaslap \-s 127.0.0.1:11211 \-t 2m \-v 0.2 \-e 0.05 \-b
+.sp
+memaslap \-s 127.0.0.1:11211 \-F config \-t 2m \-w 40k \-S 20s \-o 0.2
+.sp
+memaslap \-s 127.0.0.1:11211 \-F config \-t 2m \-T 4 \-c 128 \-d 20 \-P 40k
+.sp
+memaslap \-s 127.0.0.1:11211 \-F config \-t 2m \-d 50 \-a \-n 40
+.sp
+memaslap \-s 127.0.0.1:11211,127.0.0.1:11212 \-F config \-t 2m
+.sp
+memaslap \-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 memaslap. 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,
+memaslap 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, memaslap only testss set and get commands. And it
+testss 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 memaslap 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 testss setting CPU affinity and the number of threads
+specified by the user is greater than 1, memaslap will try to
+bind each thread to a different CPU core. So if you want to get the best
+performance memaslap, 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 memaslap 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 memaslap, there
+are two ways to do this:
+.sp
+Decrease the number of threads and concurrencies.
+Use the option “\-\-tps” that memaslap
+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 testss 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 testss both data verification and expire\-time
+verification. The user can use "\-\-verify=" or "\-v" to specify the proportion
+of data verification. In theory, it testss 100% data verification. The
+user can use "\-\-exp_verify=" or "\-e" to specify the proportion of
+expire\-time verification. In theory, it testss 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, memaslap will verify the expire\-time and
+value.
+.SS multi\-servers and multi\-config
+.sp
+Memslap testss 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 memaslap are self\-governed.
+.sp
+So is memaslap. The user can start up several
+memaslap instances. The user can run memaslap on different client
+machines to communicate with the same memcached server at the same. It is
+recommended that the user start different memaslap on different
+machines using the same configuration.
+.SS Run with execute number mode or time mode
+.sp
+The default memaslap runs with time mode. The default run time
+is 10 minutes. If it times out, memaslap 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 testss data
+verification and expire\-time verification for multi\-get.
+.sp
+Memslap testss 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,
+memaslap sends one “multi\-get” to the server once. For the
+binary protocol, memaslap sends several single get commands
+together as “multi\-get” to the server.
+.SS UDP and TCP
+.sp
+Memslap testss both UDP and TCP. For TCP,
+memaslap does not reconnect the memcached server if socket connections are
+lost. If all the socket connections are lost or memcached server crashes,
+memaslap 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 testsed by the binary protocol because the binary protocol of
+memcached does not tests that.
+.sp
+UDP doesn’t tests 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 memaslap 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,
+memaslap 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,
+memaslap will only get objects from server 1. If server 0 comes
+back to life again, memaslap will reconnect server 0. If both
+server 0 and server 1 crash, memaslap will exit.
+.SS Supports thousands of TCP connections
+.sp
+Start memaslap with "\-\-conn_sock=" or "\-n" to enable this
+feature. Make sure that your system can tests opening thousands of files
+and creating thousands of sockets. However, this feature does not tests
+reconnection if sockets disconnect.
+.sp
+For example:
+.sp
+\-\-threads=8 \-\-concurrency=128 \-\-conn_sock=128
+.sp
+The above command means that memaslap 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 memaslap with "\-\-binary" or "\-B" options to enable this
+feature. It testss 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,
+memaslap does not tests UDP. In addition, memcached 1.3.3 does not tests
+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 memaslap reads the default
+one located at ~/.memaslap.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
+#memaslap 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
+#memaslap 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 memaslap only testss 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, memaslap 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 memaslap.
+.UNINDENT
+.UNINDENT
+.sp
+threads count
+.INDENT 0.0
+.INDENT 3.5
+.sp
+The number of threads memaslap runs with.
+.UNINDENT
+.UNINDENT
+.sp
+concurrency
+.INDENT 0.0
+.INDENT 3.5
+.sp
+The number of concurrencies memaslap runs with.
+.UNINDENT
+.UNINDENT
+.sp
+run time
+.INDENT 0.0
+.INDENT 3.5
+.sp
+How long to run memaslap.
+.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, memaslap 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 tests, when connection is closed it will be reconnected.
+.TP
+.B \-U,  \-\-udp
+.
+UDP tests, default memaslap 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
+memaslap \-s 127.0.0.1:11211 \-S 5s
+.sp
+memaslap \-s 127.0.0.1:11211 \-t 2m \-v 0.2 \-e 0.05 \-b
+.sp
+memaslap \-s 127.0.0.1:11211 \-F config \-t 2m \-w 40k \-S 20s \-o 0.2
+.sp
+memaslap \-s 127.0.0.1:11211 \-F config \-t 2m \-T 4 \-c 128 \-d 20 \-P 40k
+.sp
+memaslap \-s 127.0.0.1:11211 \-F config \-t 2m \-d 50 \-a \-n 40
+.sp
+memaslap \-s 127.0.0.1:11211,127.0.0.1:11212 \-F config \-t 2m
+.sp
+memaslap \-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
+\fImemcached(1)\fP \fIlibmemcached(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..17ecbe0
--- /dev/null
@@ -0,0 +1,165 @@
+.TH "MEMCACHED_ADD" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_add \- Storing and Replacing Data
+.
+.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 SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_prepend(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_append(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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 tests 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 tests
+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 testsed 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 SEE ALSO
+.sp
+memcached(1) libmemached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..b133171
--- /dev/null
@@ -0,0 +1,165 @@
+.TH "MEMCACHED_ADD_BY_KEY" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_add_by_key \- Storing and Replacing Data
+.
+.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 SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_prepend(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_append(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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 tests 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 tests
+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 testsed 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 SEE ALSO
+.sp
+memcached(1) libmemached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..68cbec4
--- /dev/null
@@ -0,0 +1,83 @@
+.TH "MEMCACHED_ANALYZE" "3" "April 09, 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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..4da04b8
--- /dev/null
@@ -0,0 +1,165 @@
+.TH "MEMCACHED_APPEND" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_append \- Storing and Replacing Data
+.
+.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 SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_prepend(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_append(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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 tests 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 tests
+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 testsed 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 SEE ALSO
+.sp
+memcached(1) libmemached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..b51fdce
--- /dev/null
@@ -0,0 +1,165 @@
+.TH "MEMCACHED_APPEND_BY_KEY" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_append_by_key \- Storing and Replacing Data
+.
+.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 SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_prepend(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_append(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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 tests 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 tests
+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 testsed 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 SEE ALSO
+.sp
+memcached(1) libmemached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..39530a2
--- /dev/null
@@ -0,0 +1,124 @@
+.TH "MEMCACHED_AUTO" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_auto \- Incrementing and Decrementing Values
+.
+.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.
+.
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_increment (memcached_st *ptr, const char *key, size_t key_length, unsigned int offset, uint64_t *value);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_decrement (memcached_st *ptr, const char *key, size_t key_length, unsigned int offset, uint64_t *value);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fImemcached(1)\fP 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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..826497f
--- /dev/null
@@ -0,0 +1,334 @@
+.TH "MEMCACHED_BEHAVIOR" "3" "April 09, 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
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B uint64_t memcached_behavior_get (memcached_st *ptr, memcached_behavior flag);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_behavior_set (memcached_st *ptr, memcached_behavior flag, uint64_t data);
+.UNINDENT
+.SH DESCRIPTION
+.sp
+\fIlibmemcached(3)\fP 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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_USE_UDP
+.UNINDENT
+.sp
+Causes \fIlibmemcached(3)\fP to use the UDP transport when communicating
+with a memcached server. Not all I/O operations are testsed
+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 testsed 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
+\fIlibmemcached(3)\fP 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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_NO_BLOCK
+.UNINDENT
+.sp
+Causes \fIlibmemcached(3)\fP to use asychronous IO. This is the fastest transport
+available for storage functions.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SND_TIMEOUT
+.UNINDENT
+.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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_RCV_TIMEOUT
+.UNINDENT
+.sp
+This sets the microsecond behavior of the socket against the SO_RCVTIMEO flag.
+.sp
+In cases where you cannot use non\-blocking IO this will allow you to still have timeouts on the reading of data.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_TCP_NODELAY
+.UNINDENT
+.sp
+Turns on the no\-delay feature for connecting sockets (may be faster in some
+environments).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_HASH
+.UNINDENT
+.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.
+.sp
+Each hash has it\(aqs advantages and it\(aqs weaknesses. If you don\(aqt know or don\(aqt care, just go with the default.
+.sp
+Support for MEMCACHED_HASH_HSIEH is a compile time option that is disabled by default. To enable tests for this hashing algorithm, configure and build libmemcached with the \-\-enable\-hash_hsieh.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_DISTRIBUTION
+.UNINDENT
+.sp
+Using this you can enable different means of distributing values to servers.
+.sp
+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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_CACHE_LOOKUPS
+.UNINDENT
+.sp
+DEPRECATED. Memcached can cache named lookups so that DNS lookups are made only once.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SUPPORT_CAS
+.UNINDENT
+.sp
+Support CAS operations (this is not enabled by default at this point in the server since it imposes a slight performance penalty).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KETAMA
+.UNINDENT
+.sp
+Sets the default distribution to MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA and the hash to MEMCACHED_HASH_MD5.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED
+.UNINDENT
+.sp
+Sets the default distribution to MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA with the weighted tests.  and the hash to MEMCACHED_HASH_MD5.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KETAMA_HASH
+.UNINDENT
+.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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KETAMA_COMPAT
+.UNINDENT
+.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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_POLL_TIMEOUT
+.UNINDENT
+.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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_USER_DATA
+.UNINDENT
+.sp
+DEPRECATED
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_BUFFER_REQUESTS
+.UNINDENT
+.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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_VERIFY_KEY
+.UNINDENT
+.sp
+Enabling this will cause \fIlibmemcached(3)\fP to test all keys to verify that they are valid keys.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SORT_HOSTS
+.UNINDENT
+.sp
+Enabling this will cause hosts that are added to be placed in the host list in sorted order. This will defeat consisten hashing.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT
+.UNINDENT
+.sp
+In non\-blocking mode this changes the value of the timeout during socket connection.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_BINARY_PROTOCOL
+.UNINDENT
+.sp
+Enable the use of the binary protocol. Please note that you cannot toggle this flag on an open connection.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+.UNINDENT
+.sp
+Set this value to enable the server be removed after continuous MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT times connection failure.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK
+.UNINDENT
+.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).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK
+.UNINDENT
+.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).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH
+.UNINDENT
+.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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_NOREPLY
+.UNINDENT
+.sp
+Set this value to specify that you really don\(aqt care about the result from your storage commands (set, add, replace, append, prepend).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS
+.UNINDENT
+.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).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ
+.UNINDENT
+.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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_CORK
+.UNINDENT
+.sp
+This open has been deprecated with the behavior now built and used appropriately on selected platforms.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KEEPALIVE
+.UNINDENT
+.sp
+Enable TCP_KEEPALIVE behavior.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KEEPALIVE_IDLE
+.UNINDENT
+.sp
+Specify time, in seconds, to mark a connection as idle. This is only available as an option Linux.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE
+.UNINDENT
+.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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE
+.UNINDENT
+.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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+.UNINDENT
+.sp
+DEPRECATED, please see MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS. This number of times a host can have an error before it is disabled.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS
+.UNINDENT
+.sp
+DEPRECATED, please see MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS. 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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS
+.UNINDENT
+.sp
+If enabled any hosts which have been flagged as disabled will be removed from the list of servers in the memcached_st structure.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_RETRY_TIMEOUT
+.UNINDENT
+.sp
+When enabled a host which is problematic will only be checked for usage based on the amount of time set by this behavior.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY
+.UNINDENT
+.sp
+When enabled the prefix key will be added to the key when determining server by hash.
+.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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..9b39d56
--- /dev/null
@@ -0,0 +1,334 @@
+.TH "MEMCACHED_BEHAVIOR_GET" "3" "April 09, 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
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B uint64_t memcached_behavior_get (memcached_st *ptr, memcached_behavior flag);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_behavior_set (memcached_st *ptr, memcached_behavior flag, uint64_t data);
+.UNINDENT
+.SH DESCRIPTION
+.sp
+\fIlibmemcached(3)\fP 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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_USE_UDP
+.UNINDENT
+.sp
+Causes \fIlibmemcached(3)\fP to use the UDP transport when communicating
+with a memcached server. Not all I/O operations are testsed
+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 testsed 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
+\fIlibmemcached(3)\fP 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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_NO_BLOCK
+.UNINDENT
+.sp
+Causes \fIlibmemcached(3)\fP to use asychronous IO. This is the fastest transport
+available for storage functions.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SND_TIMEOUT
+.UNINDENT
+.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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_RCV_TIMEOUT
+.UNINDENT
+.sp
+This sets the microsecond behavior of the socket against the SO_RCVTIMEO flag.
+.sp
+In cases where you cannot use non\-blocking IO this will allow you to still have timeouts on the reading of data.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_TCP_NODELAY
+.UNINDENT
+.sp
+Turns on the no\-delay feature for connecting sockets (may be faster in some
+environments).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_HASH
+.UNINDENT
+.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.
+.sp
+Each hash has it\(aqs advantages and it\(aqs weaknesses. If you don\(aqt know or don\(aqt care, just go with the default.
+.sp
+Support for MEMCACHED_HASH_HSIEH is a compile time option that is disabled by default. To enable tests for this hashing algorithm, configure and build libmemcached with the \-\-enable\-hash_hsieh.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_DISTRIBUTION
+.UNINDENT
+.sp
+Using this you can enable different means of distributing values to servers.
+.sp
+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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_CACHE_LOOKUPS
+.UNINDENT
+.sp
+DEPRECATED. Memcached can cache named lookups so that DNS lookups are made only once.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SUPPORT_CAS
+.UNINDENT
+.sp
+Support CAS operations (this is not enabled by default at this point in the server since it imposes a slight performance penalty).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KETAMA
+.UNINDENT
+.sp
+Sets the default distribution to MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA and the hash to MEMCACHED_HASH_MD5.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED
+.UNINDENT
+.sp
+Sets the default distribution to MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA with the weighted tests.  and the hash to MEMCACHED_HASH_MD5.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KETAMA_HASH
+.UNINDENT
+.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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KETAMA_COMPAT
+.UNINDENT
+.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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_POLL_TIMEOUT
+.UNINDENT
+.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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_USER_DATA
+.UNINDENT
+.sp
+DEPRECATED
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_BUFFER_REQUESTS
+.UNINDENT
+.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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_VERIFY_KEY
+.UNINDENT
+.sp
+Enabling this will cause \fIlibmemcached(3)\fP to test all keys to verify that they are valid keys.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SORT_HOSTS
+.UNINDENT
+.sp
+Enabling this will cause hosts that are added to be placed in the host list in sorted order. This will defeat consisten hashing.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT
+.UNINDENT
+.sp
+In non\-blocking mode this changes the value of the timeout during socket connection.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_BINARY_PROTOCOL
+.UNINDENT
+.sp
+Enable the use of the binary protocol. Please note that you cannot toggle this flag on an open connection.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+.UNINDENT
+.sp
+Set this value to enable the server be removed after continuous MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT times connection failure.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK
+.UNINDENT
+.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).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK
+.UNINDENT
+.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).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH
+.UNINDENT
+.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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_NOREPLY
+.UNINDENT
+.sp
+Set this value to specify that you really don\(aqt care about the result from your storage commands (set, add, replace, append, prepend).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS
+.UNINDENT
+.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).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ
+.UNINDENT
+.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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_CORK
+.UNINDENT
+.sp
+This open has been deprecated with the behavior now built and used appropriately on selected platforms.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KEEPALIVE
+.UNINDENT
+.sp
+Enable TCP_KEEPALIVE behavior.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KEEPALIVE_IDLE
+.UNINDENT
+.sp
+Specify time, in seconds, to mark a connection as idle. This is only available as an option Linux.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE
+.UNINDENT
+.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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE
+.UNINDENT
+.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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+.UNINDENT
+.sp
+DEPRECATED, please see MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS. This number of times a host can have an error before it is disabled.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS
+.UNINDENT
+.sp
+DEPRECATED, please see MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS. 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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS
+.UNINDENT
+.sp
+If enabled any hosts which have been flagged as disabled will be removed from the list of servers in the memcached_st structure.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_RETRY_TIMEOUT
+.UNINDENT
+.sp
+When enabled a host which is problematic will only be checked for usage based on the amount of time set by this behavior.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY
+.UNINDENT
+.sp
+When enabled the prefix key will be added to the key when determining server by hash.
+.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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..57574fa
--- /dev/null
@@ -0,0 +1,334 @@
+.TH "MEMCACHED_BEHAVIOR_SET" "3" "April 09, 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
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B uint64_t memcached_behavior_get (memcached_st *ptr, memcached_behavior flag);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_behavior_set (memcached_st *ptr, memcached_behavior flag, uint64_t data);
+.UNINDENT
+.SH DESCRIPTION
+.sp
+\fIlibmemcached(3)\fP 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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_USE_UDP
+.UNINDENT
+.sp
+Causes \fIlibmemcached(3)\fP to use the UDP transport when communicating
+with a memcached server. Not all I/O operations are testsed
+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 testsed 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
+\fIlibmemcached(3)\fP 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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_NO_BLOCK
+.UNINDENT
+.sp
+Causes \fIlibmemcached(3)\fP to use asychronous IO. This is the fastest transport
+available for storage functions.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SND_TIMEOUT
+.UNINDENT
+.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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_RCV_TIMEOUT
+.UNINDENT
+.sp
+This sets the microsecond behavior of the socket against the SO_RCVTIMEO flag.
+.sp
+In cases where you cannot use non\-blocking IO this will allow you to still have timeouts on the reading of data.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_TCP_NODELAY
+.UNINDENT
+.sp
+Turns on the no\-delay feature for connecting sockets (may be faster in some
+environments).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_HASH
+.UNINDENT
+.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.
+.sp
+Each hash has it\(aqs advantages and it\(aqs weaknesses. If you don\(aqt know or don\(aqt care, just go with the default.
+.sp
+Support for MEMCACHED_HASH_HSIEH is a compile time option that is disabled by default. To enable tests for this hashing algorithm, configure and build libmemcached with the \-\-enable\-hash_hsieh.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_DISTRIBUTION
+.UNINDENT
+.sp
+Using this you can enable different means of distributing values to servers.
+.sp
+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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_CACHE_LOOKUPS
+.UNINDENT
+.sp
+DEPRECATED. Memcached can cache named lookups so that DNS lookups are made only once.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SUPPORT_CAS
+.UNINDENT
+.sp
+Support CAS operations (this is not enabled by default at this point in the server since it imposes a slight performance penalty).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KETAMA
+.UNINDENT
+.sp
+Sets the default distribution to MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA and the hash to MEMCACHED_HASH_MD5.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED
+.UNINDENT
+.sp
+Sets the default distribution to MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA with the weighted tests.  and the hash to MEMCACHED_HASH_MD5.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KETAMA_HASH
+.UNINDENT
+.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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KETAMA_COMPAT
+.UNINDENT
+.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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_POLL_TIMEOUT
+.UNINDENT
+.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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_USER_DATA
+.UNINDENT
+.sp
+DEPRECATED
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_BUFFER_REQUESTS
+.UNINDENT
+.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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_VERIFY_KEY
+.UNINDENT
+.sp
+Enabling this will cause \fIlibmemcached(3)\fP to test all keys to verify that they are valid keys.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SORT_HOSTS
+.UNINDENT
+.sp
+Enabling this will cause hosts that are added to be placed in the host list in sorted order. This will defeat consisten hashing.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT
+.UNINDENT
+.sp
+In non\-blocking mode this changes the value of the timeout during socket connection.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_BINARY_PROTOCOL
+.UNINDENT
+.sp
+Enable the use of the binary protocol. Please note that you cannot toggle this flag on an open connection.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+.UNINDENT
+.sp
+Set this value to enable the server be removed after continuous MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT times connection failure.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK
+.UNINDENT
+.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).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK
+.UNINDENT
+.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).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH
+.UNINDENT
+.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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_NOREPLY
+.UNINDENT
+.sp
+Set this value to specify that you really don\(aqt care about the result from your storage commands (set, add, replace, append, prepend).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS
+.UNINDENT
+.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).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ
+.UNINDENT
+.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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_CORK
+.UNINDENT
+.sp
+This open has been deprecated with the behavior now built and used appropriately on selected platforms.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KEEPALIVE
+.UNINDENT
+.sp
+Enable TCP_KEEPALIVE behavior.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KEEPALIVE_IDLE
+.UNINDENT
+.sp
+Specify time, in seconds, to mark a connection as idle. This is only available as an option Linux.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE
+.UNINDENT
+.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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE
+.UNINDENT
+.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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+.UNINDENT
+.sp
+DEPRECATED, please see MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS. This number of times a host can have an error before it is disabled.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS
+.UNINDENT
+.sp
+DEPRECATED, please see MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS. 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.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS
+.UNINDENT
+.sp
+If enabled any hosts which have been flagged as disabled will be removed from the list of servers in the memcached_st structure.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_RETRY_TIMEOUT
+.UNINDENT
+.sp
+When enabled a host which is problematic will only be checked for usage based on the amount of time set by this behavior.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY
+.UNINDENT
+.sp
+When enabled the prefix key will be added to the key when determining server by hash.
+.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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..6b3c13a
--- /dev/null
@@ -0,0 +1,162 @@
+.TH "MEMCACHED_CALLBACK" "3" "April 09, 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
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_callback_set (memcached_st *ptr, memcached_callback_t flag, void *data);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void * memcached_callback_get (memcached_st *ptr, memcached_callback_t flag, memcached_return_t *error);
+.UNINDENT
+.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
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_CLEANUP_FUNCTION
+.
+When memcached_delete() is called this function will be excuted. At the
+point of its execution all connections have been closed.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_CLONE_FUNCTION
+.
+When memcached_delete() is called this function will be excuted. At the
+point of its execution all connections have been closed.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_PREFIX_KEY
+.
+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
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_USER_DATA
+.
+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
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_MALLOC_FUNCTION
+.
+DEPRECATED: use memcached_set_memory_allocators instead.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_REALLOC_FUNCTION
+.
+DEPRECATED: use memcached_set_memory_allocators instead.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_FREE_FUNCTION
+.
+DEPRECATED: use memcached_set_memory_allocators instead.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_GET_FAILURE
+.
+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
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_DELETE_TRIGGER
+.UNINDENT
+.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);
+.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
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..df265fb
--- /dev/null
@@ -0,0 +1,162 @@
+.TH "MEMCACHED_CALLBACK_GET" "3" "April 09, 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
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_callback_set (memcached_st *ptr, memcached_callback_t flag, void *data);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void * memcached_callback_get (memcached_st *ptr, memcached_callback_t flag, memcached_return_t *error);
+.UNINDENT
+.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
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_CLEANUP_FUNCTION
+.
+When memcached_delete() is called this function will be excuted. At the
+point of its execution all connections have been closed.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_CLONE_FUNCTION
+.
+When memcached_delete() is called this function will be excuted. At the
+point of its execution all connections have been closed.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_PREFIX_KEY
+.
+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
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_USER_DATA
+.
+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
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_MALLOC_FUNCTION
+.
+DEPRECATED: use memcached_set_memory_allocators instead.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_REALLOC_FUNCTION
+.
+DEPRECATED: use memcached_set_memory_allocators instead.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_FREE_FUNCTION
+.
+DEPRECATED: use memcached_set_memory_allocators instead.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_GET_FAILURE
+.
+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
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_DELETE_TRIGGER
+.UNINDENT
+.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);
+.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
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..fa5c0c9
--- /dev/null
@@ -0,0 +1,162 @@
+.TH "MEMCACHED_CALLBACK_SET" "3" "April 09, 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
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_callback_set (memcached_st *ptr, memcached_callback_t flag, void *data);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void * memcached_callback_get (memcached_st *ptr, memcached_callback_t flag, memcached_return_t *error);
+.UNINDENT
+.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
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_CLEANUP_FUNCTION
+.
+When memcached_delete() is called this function will be excuted. At the
+point of its execution all connections have been closed.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_CLONE_FUNCTION
+.
+When memcached_delete() is called this function will be excuted. At the
+point of its execution all connections have been closed.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_PREFIX_KEY
+.
+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
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_USER_DATA
+.
+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
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_MALLOC_FUNCTION
+.
+DEPRECATED: use memcached_set_memory_allocators instead.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_REALLOC_FUNCTION
+.
+DEPRECATED: use memcached_set_memory_allocators instead.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_FREE_FUNCTION
+.
+DEPRECATED: use memcached_set_memory_allocators instead.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_GET_FAILURE
+.
+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
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_DELETE_TRIGGER
+.UNINDENT
+.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);
+.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
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..48d9ca3
--- /dev/null
@@ -0,0 +1,165 @@
+.TH "MEMCACHED_CAS" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_cas \- Storing and Replacing Data
+.
+.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 SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_prepend(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_append(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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 tests 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 tests
+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 testsed 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 SEE ALSO
+.sp
+memcached(1) libmemached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..c728816
--- /dev/null
@@ -0,0 +1,165 @@
+.TH "MEMCACHED_CAS_BY_KEY" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_cas_by_key \- Storing and Replacing Data
+.
+.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 SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_prepend(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_append(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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 tests 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 tests
+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 testsed 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 SEE ALSO
+.sp
+memcached(1) libmemached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..798e6d8
--- /dev/null
@@ -0,0 +1,101 @@
+.TH "MEMCACHED_CLONE" "3" "April 09, 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 SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_st *memcached_create (memcached_st *ptr);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void memcached_free (memcached_st *ptr);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st *memcached_clone (memcached_st *destination, memcached_st *source);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void memcached_servers_reset(memcached_st);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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
+Please note, when you write new application use memcached_create_with_options() over memcached_create().
+.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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..601175a
--- /dev/null
@@ -0,0 +1,101 @@
+.TH "MEMCACHED_CREATE" "3" "April 09, 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 SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_st *memcached_create (memcached_st *ptr);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void memcached_free (memcached_st *ptr);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st *memcached_clone (memcached_st *destination, memcached_st *source);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void memcached_servers_reset(memcached_st);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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
+Please note, when you write new application use memcached_create_with_options() over memcached_create().
+.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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_create_with_options.3 b/docs/man/memcached_create_with_options.3
new file mode 100644 (file)
index 0000000..eac5782
--- /dev/null
@@ -0,0 +1,264 @@
+.TH "MEMCACHED_CREATE_WITH_OPTIONS" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_create_with_options \- 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.
+.
+.SH SYNOPSIS
+.INDENT 0.0
+.TP
+.B memcached_st *memcached_create_with_options(const char\fI\ *string\fP, size_t\fI\ string_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t libmemcached_check_configuration(const char\fI\ *option_string\fP, size_t\fI\ length\fP, char\fI\ *error_buffer\fP, size_t\fI\ error_buffer_size\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+Libmemcached implements a custom language for configuring and modifying
+servers. By passing in an option string you can generate a memcached_st object
+that you can use in your application directly.
+.INDENT 0.0
+.TP
+.B \-\-SERVER=<servername>:<optional_port>/?<optional_weight>
+.UNINDENT
+.sp
+Provide a servername to be used by the client. Providing a weight will cause weighting to occur with all hosts with each server getting a default weight of 1.
+.INDENT 0.0
+.TP
+.B \-\-VERIFY\-KEY
+.UNINDENT
+.sp
+Verify that keys that are being used fit within the design of the protocol being used.
+.INDENT 0.0
+.TP
+.B \-\-REMOVE_FAILED_SERVERS
+.UNINDENT
+.sp
+Enable the behavior MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS.
+.INDENT 0.0
+.TP
+.B \-\-BINARY\-PROTOCOL
+.UNINDENT
+.sp
+Force all connections to use the binary protocol.
+.INDENT 0.0
+.TP
+.B \-\-BUFFER\-REQUESTS
+.UNINDENT
+.sp
+Enable MEMCACHED_BEHAVIOR_BUFFER_REQUESTS.
+.INDENT 0.0
+.TP
+.B \-\-CONFIGURE\-FILE=
+.UNINDENT
+.sp
+Provide a configuration file to be used to load requests. Beware that by using a configuration file libmemcached will reset memcached_st based on information only contained in the file.
+.INDENT 0.0
+.TP
+.B \-\-CONNECT\-TIMEOUT=
+.UNINDENT
+.sp
+Enable MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT.
+.INDENT 0.0
+.TP
+.B \-\-DISTRIBUTION=
+.UNINDENT
+.sp
+Set the distribution model used by the client.  See :manpage:\(ga\(ga for more details.
+.INDENT 0.0
+.TP
+.B \-\-HASH=
+.UNINDENT
+.sp
+Set the hashing alogrthm used for placing keys on servers.
+.INDENT 0.0
+.TP
+.B \-\-HASH\-WITH\-PREFIX_KEY
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-IO\-BYTES\-WATERMARK=
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-IO\-KEY\-PREFETCH=
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-IO\-MSG\-WATERMARK=
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-NOREPLY
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-NUMBER\-OF\-REPLICAS=
+.UNINDENT
+.sp
+Set the nummber of servers that keys will be replicated to.
+.INDENT 0.0
+.TP
+.B \-\-POLL\-TIMEOUT=
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-RANDOMIZE\-REPLICA\-READ
+.UNINDENT
+.sp
+Select randomly the server within the replication pool to read from.
+.INDENT 0.0
+.TP
+.B \-\-RCV\-TIMEOUT=
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-RETRY\-TIMEOUT=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_RETRY_TIMEOUT
+.INDENT 0.0
+.TP
+.B \-\-SERVER\-FAILURE\-LIMIT=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+.INDENT 0.0
+.TP
+.B \-\-SND\-TIMEOUT=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SND_TIMEOUT
+.INDENT 0.0
+.TP
+.B \-\-SOCKET\-RECV\-SIZE=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE
+.INDENT 0.0
+.TP
+.B \-\-SOCKET\-SEND\-SIZE=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE
+.INDENT 0.0
+.TP
+.B \-\-SORT\-HOSTS
+.UNINDENT
+.sp
+When adding new servers always calculate their distribution based on sorted naming order.
+.INDENT 0.0
+.TP
+.B \-\-SUPPORT\-CAS
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SUPPORT_CAS
+.INDENT 0.0
+.TP
+.B \-\-TCP\-NODELAY
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_TCP_NODELAY
+.INDENT 0.0
+.TP
+.B \-\-TCP\-KEEPALIVE
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_TCP_KEEPALIVE
+.INDENT 0.0
+.TP
+.B \-\-TCP\-KEEPIDLE
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-USE\-UDP
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_USE_UDP
+.INDENT 0.0
+.TP
+.B \-\-PREFIX\-KEY=
+.UNINDENT
+.INDENT 0.0
+.TP
+.B INCLUDE
+.UNINDENT
+.sp
+Include a file in configuration. Unlike \-\-CONFIGURE\-FILE= this will not reset memcached_st
+.INDENT 0.0
+.TP
+.B RESET
+.UNINDENT
+.sp
+Reset memcached_st and continue to process.
+.INDENT 0.0
+.TP
+.B END
+.UNINDENT
+.sp
+End configutation processing.
+.INDENT 0.0
+.TP
+.B ERROR
+.UNINDENT
+.sp
+End configutation processing and throw an error.
+.SH RETURN
+.sp
+memcached_create_with_options() returns a pointer to the memcached_st that was
+created (or initialized).  On an allocation failure, it returns NULL.
+.SH EXAMPLE
+.sp
+.nf
+.ft C
+const char *config_string= "\-\-SERVER=host10.example.com \-\-SERVER=host11.example.com \-\-SERVER=host10.example.com"
+memcached_st *memc= memcached_create_with_options(config_string, strlen(config_string);
+{
+ ...
+}
+memcached_free(memc);
+.ft P
+.fi
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..e6b8b69
--- /dev/null
@@ -0,0 +1,124 @@
+.TH "MEMCACHED_DECREMENT" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_decrement \- Incrementing and Decrementing Values
+.
+.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.
+.
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_increment (memcached_st *ptr, const char *key, size_t key_length, unsigned int offset, uint64_t *value);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_decrement (memcached_st *ptr, const char *key, size_t key_length, unsigned int offset, uint64_t *value);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fImemcached(1)\fP 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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..4ce2deb
--- /dev/null
@@ -0,0 +1,124 @@
+.TH "MEMCACHED_DECREMENT_WITH_INITIAL" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_decrement_with_initial \- Incrementing and Decrementing Values
+.
+.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.
+.
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_increment (memcached_st *ptr, const char *key, size_t key_length, unsigned int offset, uint64_t *value);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_decrement (memcached_st *ptr, const char *key, size_t key_length, unsigned int offset, uint64_t *value);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fImemcached(1)\fP 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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..2e71543
--- /dev/null
@@ -0,0 +1,83 @@
+.TH "MEMCACHED_DELETE" "3" "April 09, 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.
+.
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_delete (memcached_st *ptr, const char *key, size_t key_length, time_t expiration);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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 tests 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
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..ac8c46e
--- /dev/null
@@ -0,0 +1,83 @@
+.TH "MEMCACHED_DELETE_BY_KEY" "3" "April 09, 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.
+.
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_delete (memcached_st *ptr, const char *key, size_t key_length, time_t expiration);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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 tests 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
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..f7a8c32
--- /dev/null
@@ -0,0 +1,94 @@
+.TH "MEMCACHED_DESTROY_SASL_AUTH_DATA" "3" "April 09, 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.
+.
+.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
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..0b82f27
--- /dev/null
@@ -0,0 +1,85 @@
+.TH "MEMCACHED_DUMP" "3" "April 09, 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 testsed.
+.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
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..f0ce008
--- /dev/null
@@ -0,0 +1,166 @@
+.TH "MEMCACHED_FETCH" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_fetch \- Retrieving data from the server
+.
+.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.
+.
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_result_st * memcached_fetch_result (memcached_st *ptr, memcached_result_st *result, memcached_return_t *error);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_get (memcached_st *ptr, const char *key, size_t key_length, size_t *value_length, uint32_t *flags, memcached_return_t *error);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget (memcached_st *ptr, const char * const *keys, const size_t *key_length, size_t number_of_keys);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_fetch (memcached_st *ptr, char *key, size_t *key_length, size_t *value_length, uint32_t *flags, memcached_return_t *error);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_fetch_execute (memcached_st *ptr, memcached_execute_fn *callback, void *context, uint32_t number_of_callbacks);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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 testsed 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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..132cbb8
--- /dev/null
@@ -0,0 +1,166 @@
+.TH "MEMCACHED_FETCH_EXECUTE" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_fetch_execute \- Retrieving data from the server
+.
+.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.
+.
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_result_st * memcached_fetch_result (memcached_st *ptr, memcached_result_st *result, memcached_return_t *error);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_get (memcached_st *ptr, const char *key, size_t key_length, size_t *value_length, uint32_t *flags, memcached_return_t *error);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget (memcached_st *ptr, const char * const *keys, const size_t *key_length, size_t number_of_keys);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_fetch (memcached_st *ptr, char *key, size_t *key_length, size_t *value_length, uint32_t *flags, memcached_return_t *error);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_fetch_execute (memcached_st *ptr, memcached_execute_fn *callback, void *context, uint32_t number_of_callbacks);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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 testsed 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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..e7cdf56
--- /dev/null
@@ -0,0 +1,166 @@
+.TH "MEMCACHED_FETCH_RESULT" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_fetch_result \- Retrieving data from the server
+.
+.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.
+.
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_result_st * memcached_fetch_result (memcached_st *ptr, memcached_result_st *result, memcached_return_t *error);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_get (memcached_st *ptr, const char *key, size_t key_length, size_t *value_length, uint32_t *flags, memcached_return_t *error);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget (memcached_st *ptr, const char * const *keys, const size_t *key_length, size_t number_of_keys);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_fetch (memcached_st *ptr, char *key, size_t *key_length, size_t *value_length, uint32_t *flags, memcached_return_t *error);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_fetch_execute (memcached_st *ptr, memcached_execute_fn *callback, void *context, uint32_t number_of_callbacks);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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 testsed 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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..0535097
--- /dev/null
@@ -0,0 +1,73 @@
+.TH "MEMCACHED_FLUSH" "3" "April 09, 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 SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_flush (memcached_st *ptr, time_t expiration);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..1b0446e
--- /dev/null
@@ -0,0 +1,73 @@
+.TH "MEMCACHED_FLUSH_BUFFERS" "3" "April 09, 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
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_flush_buffers (memcached_st *ptr);
+.UNINDENT
+.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
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..ddf508a
--- /dev/null
@@ -0,0 +1,101 @@
+.TH "MEMCACHED_FREE" "3" "April 09, 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 SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_st *memcached_create (memcached_st *ptr);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void memcached_free (memcached_st *ptr);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st *memcached_clone (memcached_st *destination, memcached_st *source);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void memcached_servers_reset(memcached_st);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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
+Please note, when you write new application use memcached_create_with_options() over memcached_create().
+.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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcached_generate_hash.3 b/docs/man/memcached_generate_hash.3
new file mode 100644 (file)
index 0000000..3c81b38
--- /dev/null
@@ -0,0 +1,85 @@
+.TH "MEMCACHED_GENERATE_HASH" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_generate_hash \- Generating hash values directly
+.
+.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 SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B uint32_t memcached_generate_hash_value (const char *key, size_t key_length, memcached_hash_t hash_algorithm);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t memcached_generate_hash (memcached_st *ptr, const char *key, size_t key_length);
+.UNINDENT
+.sp
+Compile and link with \-lmemcachedutil \-lmemcached
+.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). For more information please see its documentation.
+.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
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..d047f5d
--- /dev/null
@@ -0,0 +1,85 @@
+.TH "MEMCACHED_GENERATE_HASH_VALUE" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_generate_hash_value \- Generating hash values directly
+.
+.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 SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B uint32_t memcached_generate_hash_value (const char *key, size_t key_length, memcached_hash_t hash_algorithm);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t memcached_generate_hash (memcached_st *ptr, const char *key, size_t key_length);
+.UNINDENT
+.sp
+Compile and link with \-lmemcachedutil \-lmemcached
+.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). For more information please see its documentation.
+.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
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..88aaa6f
--- /dev/null
@@ -0,0 +1,166 @@
+.TH "MEMCACHED_GET" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_get \- Retrieving data from the server
+.
+.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.
+.
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_result_st * memcached_fetch_result (memcached_st *ptr, memcached_result_st *result, memcached_return_t *error);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_get (memcached_st *ptr, const char *key, size_t key_length, size_t *value_length, uint32_t *flags, memcached_return_t *error);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget (memcached_st *ptr, const char * const *keys, const size_t *key_length, size_t number_of_keys);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_fetch (memcached_st *ptr, char *key, size_t *key_length, size_t *value_length, uint32_t *flags, memcached_return_t *error);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_fetch_execute (memcached_st *ptr, memcached_execute_fn *callback, void *context, uint32_t number_of_callbacks);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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 testsed 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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..147131b
--- /dev/null
@@ -0,0 +1,166 @@
+.TH "MEMCACHED_GET_BY_KEY" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_get_by_key \- Retrieving data from the server
+.
+.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.
+.
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_result_st * memcached_fetch_result (memcached_st *ptr, memcached_result_st *result, memcached_return_t *error);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_get (memcached_st *ptr, const char *key, size_t key_length, size_t *value_length, uint32_t *flags, memcached_return_t *error);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget (memcached_st *ptr, const char * const *keys, const size_t *key_length, size_t number_of_keys);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_fetch (memcached_st *ptr, char *key, size_t *key_length, size_t *value_length, uint32_t *flags, memcached_return_t *error);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_fetch_execute (memcached_st *ptr, memcached_execute_fn *callback, void *context, uint32_t number_of_callbacks);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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 testsed 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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..f68a526
--- /dev/null
@@ -0,0 +1,102 @@
+.TH "MEMCACHED_GET_MEMORY_ALLOCATORS" "3" "April 09, 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. This enables libmemcached to be used inside of applications that have their own malloc implementation.
+.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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..fdbf6b7
--- /dev/null
@@ -0,0 +1,94 @@
+.TH "MEMCACHED_GET_SASL_CALLBACKS" "3" "April 09, 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.
+.
+.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
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..487b533
--- /dev/null
@@ -0,0 +1,82 @@
+.TH "MEMCACHED_GET_USER_DATA" "3" "April 09, 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)
+.SS 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
+.SS 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>
+.SS SEE ALSO
+.sp
+memcached(1) libmemcached(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..e81aa2e
--- /dev/null
@@ -0,0 +1,124 @@
+.TH "MEMCACHED_INCREMENT" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_increment \- Incrementing and Decrementing Values
+.
+.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.
+.
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_increment (memcached_st *ptr, const char *key, size_t key_length, unsigned int offset, uint64_t *value);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_decrement (memcached_st *ptr, const char *key, size_t key_length, unsigned int offset, uint64_t *value);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fImemcached(1)\fP 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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..c8a9ad4
--- /dev/null
@@ -0,0 +1,124 @@
+.TH "MEMCACHED_INCREMENT_WITH_INITIAL" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_increment_with_initial \- Incrementing and Decrementing Values
+.
+.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.
+.
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_increment (memcached_st *ptr, const char *key, size_t key_length, unsigned int offset, uint64_t *value);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_decrement (memcached_st *ptr, const char *key, size_t key_length, unsigned int offset, uint64_t *value);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fImemcached(1)\fP 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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..ed8817d
--- /dev/null
@@ -0,0 +1,85 @@
+.TH "MEMCACHED_LIB_VERSION" "3" "April 09, 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)
+.SS 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
+.SS 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>
+.SS SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..4ee5ede
--- /dev/null
@@ -0,0 +1,102 @@
+.TH "MEMCACHED_MEMORY_ALLOCATORS" "3" "April 09, 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. This enables libmemcached to be used inside of applications that have their own malloc implementation.
+.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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..8f4f7d3
--- /dev/null
@@ -0,0 +1,166 @@
+.TH "MEMCACHED_MGET" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_mget \- Retrieving data from the server
+.
+.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.
+.
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_result_st * memcached_fetch_result (memcached_st *ptr, memcached_result_st *result, memcached_return_t *error);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_get (memcached_st *ptr, const char *key, size_t key_length, size_t *value_length, uint32_t *flags, memcached_return_t *error);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget (memcached_st *ptr, const char * const *keys, const size_t *key_length, size_t number_of_keys);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_fetch (memcached_st *ptr, char *key, size_t *key_length, size_t *value_length, uint32_t *flags, memcached_return_t *error);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_fetch_execute (memcached_st *ptr, memcached_execute_fn *callback, void *context, uint32_t number_of_callbacks);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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 testsed 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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..2457318
--- /dev/null
@@ -0,0 +1,166 @@
+.TH "MEMCACHED_MGET_BY_KEY" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_mget_by_key \- Retrieving data from the server
+.
+.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.
+.
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_result_st * memcached_fetch_result (memcached_st *ptr, memcached_result_st *result, memcached_return_t *error);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_get (memcached_st *ptr, const char *key, size_t key_length, size_t *value_length, uint32_t *flags, memcached_return_t *error);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget (memcached_st *ptr, const char * const *keys, const size_t *key_length, size_t number_of_keys);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_fetch (memcached_st *ptr, char *key, size_t *key_length, size_t *value_length, uint32_t *flags, memcached_return_t *error);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_fetch_execute (memcached_st *ptr, memcached_execute_fn *callback, void *context, uint32_t number_of_callbacks);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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 testsed 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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..62c92bf
--- /dev/null
@@ -0,0 +1,166 @@
+.TH "MEMCACHED_MGET_EXECUTE" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_mget_execute \- Retrieving data from the server
+.
+.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.
+.
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_result_st * memcached_fetch_result (memcached_st *ptr, memcached_result_st *result, memcached_return_t *error);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_get (memcached_st *ptr, const char *key, size_t key_length, size_t *value_length, uint32_t *flags, memcached_return_t *error);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget (memcached_st *ptr, const char * const *keys, const size_t *key_length, size_t number_of_keys);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_fetch (memcached_st *ptr, char *key, size_t *key_length, size_t *value_length, uint32_t *flags, memcached_return_t *error);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_fetch_execute (memcached_st *ptr, memcached_execute_fn *callback, void *context, uint32_t number_of_callbacks);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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 testsed 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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..653e206
--- /dev/null
@@ -0,0 +1,166 @@
+.TH "MEMCACHED_MGET_EXECUTE_BY_KEY" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_mget_execute_by_key \- Retrieving data from the server
+.
+.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.
+.
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_result_st * memcached_fetch_result (memcached_st *ptr, memcached_result_st *result, memcached_return_t *error);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_get (memcached_st *ptr, const char *key, size_t key_length, size_t *value_length, uint32_t *flags, memcached_return_t *error);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget (memcached_st *ptr, const char * const *keys, const size_t *key_length, size_t number_of_keys);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_fetch (memcached_st *ptr, char *key, size_t *key_length, size_t *value_length, uint32_t *flags, memcached_return_t *error);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_fetch_execute (memcached_st *ptr, memcached_execute_fn *callback, void *context, uint32_t number_of_callbacks);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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 testsed 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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..350f43c
--- /dev/null
@@ -0,0 +1,129 @@
+.TH "MEMCACHED_POOL" "3" "April 09, 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.
+.
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached_pool.h>
+.INDENT 0.0
+.TP
+.B memcached_pool_st * memcached_pool_create(memcached_st* mmc, int initial, int max);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st * memcached_pool_destroy(memcached_pool_st* pool);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st * memcached_pool_pop (memcached_pool_st* pool, bool block, memcached_return_t *rc);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_push(memcached_pool_st* pool, memcached_st *mmc);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st *memcached_create (memcached_st *ptr);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_set(memcached_pool_st\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ data\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_get(memcached_pool_st\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcachedutil \-lmemcached
+.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
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..15f16cf
--- /dev/null
@@ -0,0 +1,129 @@
+.TH "MEMCACHED_POOL_BEHAVIOR_GET" "3" "April 09, 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.
+.
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached_pool.h>
+.INDENT 0.0
+.TP
+.B memcached_pool_st * memcached_pool_create(memcached_st* mmc, int initial, int max);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st * memcached_pool_destroy(memcached_pool_st* pool);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st * memcached_pool_pop (memcached_pool_st* pool, bool block, memcached_return_t *rc);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_push(memcached_pool_st* pool, memcached_st *mmc);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st *memcached_create (memcached_st *ptr);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_set(memcached_pool_st\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ data\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_get(memcached_pool_st\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcachedutil \-lmemcached
+.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
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..b4667c6
--- /dev/null
@@ -0,0 +1,129 @@
+.TH "MEMCACHED_POOL_BEHAVIOR_SET" "3" "April 09, 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.
+.
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached_pool.h>
+.INDENT 0.0
+.TP
+.B memcached_pool_st * memcached_pool_create(memcached_st* mmc, int initial, int max);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st * memcached_pool_destroy(memcached_pool_st* pool);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st * memcached_pool_pop (memcached_pool_st* pool, bool block, memcached_return_t *rc);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_push(memcached_pool_st* pool, memcached_st *mmc);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st *memcached_create (memcached_st *ptr);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_set(memcached_pool_st\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ data\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_get(memcached_pool_st\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcachedutil \-lmemcached
+.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
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..7e3538e
--- /dev/null
@@ -0,0 +1,129 @@
+.TH "MEMCACHED_POOL_CREATE" "3" "April 09, 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.
+.
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached_pool.h>
+.INDENT 0.0
+.TP
+.B memcached_pool_st * memcached_pool_create(memcached_st* mmc, int initial, int max);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st * memcached_pool_destroy(memcached_pool_st* pool);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st * memcached_pool_pop (memcached_pool_st* pool, bool block, memcached_return_t *rc);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_push(memcached_pool_st* pool, memcached_st *mmc);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st *memcached_create (memcached_st *ptr);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_set(memcached_pool_st\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ data\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_get(memcached_pool_st\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcachedutil \-lmemcached
+.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
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..c874b6f
--- /dev/null
@@ -0,0 +1,129 @@
+.TH "MEMCACHED_POOL_DESTROY" "3" "April 09, 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.
+.
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached_pool.h>
+.INDENT 0.0
+.TP
+.B memcached_pool_st * memcached_pool_create(memcached_st* mmc, int initial, int max);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st * memcached_pool_destroy(memcached_pool_st* pool);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st * memcached_pool_pop (memcached_pool_st* pool, bool block, memcached_return_t *rc);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_push(memcached_pool_st* pool, memcached_st *mmc);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st *memcached_create (memcached_st *ptr);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_set(memcached_pool_st\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ data\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_get(memcached_pool_st\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcachedutil \-lmemcached
+.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
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..cb294d0
--- /dev/null
@@ -0,0 +1,129 @@
+.TH "MEMCACHED_POOL_POP" "3" "April 09, 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.
+.
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached_pool.h>
+.INDENT 0.0
+.TP
+.B memcached_pool_st * memcached_pool_create(memcached_st* mmc, int initial, int max);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st * memcached_pool_destroy(memcached_pool_st* pool);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st * memcached_pool_pop (memcached_pool_st* pool, bool block, memcached_return_t *rc);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_push(memcached_pool_st* pool, memcached_st *mmc);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st *memcached_create (memcached_st *ptr);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_set(memcached_pool_st\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ data\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_get(memcached_pool_st\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcachedutil \-lmemcached
+.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
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..64d70c6
--- /dev/null
@@ -0,0 +1,129 @@
+.TH "MEMCACHED_POOL_PUSH" "3" "April 09, 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.
+.
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached_pool.h>
+.INDENT 0.0
+.TP
+.B memcached_pool_st * memcached_pool_create(memcached_st* mmc, int initial, int max);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st * memcached_pool_destroy(memcached_pool_st* pool);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st * memcached_pool_pop (memcached_pool_st* pool, bool block, memcached_return_t *rc);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_push(memcached_pool_st* pool, memcached_st *mmc);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st *memcached_create (memcached_st *ptr);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_set(memcached_pool_st\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ data\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_get(memcached_pool_st\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcachedutil \-lmemcached
+.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
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..4aa5f87
--- /dev/null
@@ -0,0 +1,165 @@
+.TH "MEMCACHED_PREPEND" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_prepend \- Storing and Replacing Data
+.
+.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 SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_prepend(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_append(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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 tests 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 tests
+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 testsed 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 SEE ALSO
+.sp
+memcached(1) libmemached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..d310a8d
--- /dev/null
@@ -0,0 +1,165 @@
+.TH "MEMCACHED_PREPEND_BY_KEY" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_prepend_by_key \- Storing and Replacing Data
+.
+.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 SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_prepend(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_append(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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 tests 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 tests
+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 testsed 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 SEE ALSO
+.sp
+memcached(1) libmemached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..c0a4f8c
--- /dev/null
@@ -0,0 +1,74 @@
+.TH "MEMCACHED_QUIT" "3" "April 09, 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.
+.
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B void memcached_quit (memcached_st *ptr);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..3b359af
--- /dev/null
@@ -0,0 +1,165 @@
+.TH "MEMCACHED_REPLACE" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_replace \- Storing and Replacing Data
+.
+.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 SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_prepend(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_append(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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 tests 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 tests
+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 testsed 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 SEE ALSO
+.sp
+memcached(1) libmemached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..fc3f37a
--- /dev/null
@@ -0,0 +1,165 @@
+.TH "MEMCACHED_REPLACE_BY_KEY" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_replace_by_key \- Storing and Replacing Data
+.
+.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 SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_prepend(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_append(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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 tests 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 tests
+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 testsed 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 SEE ALSO
+.sp
+memcached(1) libmemached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..5c79c7b
--- /dev/null
@@ -0,0 +1,140 @@
+.TH "MEMCACHED_RESULT_CAS" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_result_cas \- Working with result sets
+.
+.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
+testss 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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..6d42632
--- /dev/null
@@ -0,0 +1,140 @@
+.TH "MEMCACHED_RESULT_CREATE" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_result_create \- Working with result sets
+.
+.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
+testss 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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..501b9ec
--- /dev/null
@@ -0,0 +1,140 @@
+.TH "MEMCACHED_RESULT_FLAGS" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_result_flags \- Working with result sets
+.
+.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
+testss 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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..dddf730
--- /dev/null
@@ -0,0 +1,140 @@
+.TH "MEMCACHED_RESULT_FREE" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_result_free \- Working with result sets
+.
+.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
+testss 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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..8a648a5
--- /dev/null
@@ -0,0 +1,140 @@
+.TH "MEMCACHED_RESULT_KEY_LENGTH" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_result_key_length \- Working with result sets
+.
+.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
+testss 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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..88d0fa2
--- /dev/null
@@ -0,0 +1,140 @@
+.TH "MEMCACHED_RESULT_KEY_VALUE" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_result_key_value \- Working with result sets
+.
+.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
+testss 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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..0d28a29
--- /dev/null
@@ -0,0 +1,140 @@
+.TH "MEMCACHED_RESULT_LENGTH" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_result_length \- Working with result sets
+.
+.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
+testss 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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..c1b418d
--- /dev/null
@@ -0,0 +1,140 @@
+.TH "MEMCACHED_RESULT_ST" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_result_st \- Working with result sets
+.
+.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
+testss 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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..b04a2ad
--- /dev/null
@@ -0,0 +1,140 @@
+.TH "MEMCACHED_RESULT_VALUE" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_result_value \- Working with result sets
+.
+.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
+testss 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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..791b979
--- /dev/null
@@ -0,0 +1,94 @@
+.TH "MEMCACHED_SASL" "3" "April 09, 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.
+.
+.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
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..4d59993
--- /dev/null
@@ -0,0 +1,94 @@
+.TH "MEMCACHED_SASL_SET_AUTH_DATA" "3" "April 09, 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.
+.
+.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
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..a63ab51
--- /dev/null
@@ -0,0 +1,125 @@
+.TH "MEMCACHED_SERVER_ADD" "3" "April 09, 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)
+.SS 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
+.SS 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
+.SS SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..ec5a8bd
--- /dev/null
@@ -0,0 +1,125 @@
+.TH "MEMCACHED_SERVER_ADD_UNIX_SOCKET" "3" "April 09, 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)
+.SS 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
+.SS 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
+.SS SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..41e30cb
--- /dev/null
@@ -0,0 +1,125 @@
+.TH "MEMCACHED_SERVER_COUNT" "3" "April 09, 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)
+.SS 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
+.SS 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
+.SS SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..a355c13
--- /dev/null
@@ -0,0 +1,125 @@
+.TH "MEMCACHED_SERVER_CURSOR" "3" "April 09, 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)
+.SS 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
+.SS 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
+.SS SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..95ffc8f
--- /dev/null
@@ -0,0 +1,125 @@
+.TH "MEMCACHED_SERVER_LIST" "3" "April 09, 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)
+.SS 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
+.SS 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
+.SS SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..fd3feb3
--- /dev/null
@@ -0,0 +1,114 @@
+.TH "MEMCACHED_SERVER_LIST_APPEND" "3" "April 09, 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)
+.SS 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
+.SS 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>
+.SS SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..3774832
--- /dev/null
@@ -0,0 +1,114 @@
+.TH "MEMCACHED_SERVER_LIST_COUNT" "3" "April 09, 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)
+.SS 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
+.SS 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>
+.SS SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..d4b9f92
--- /dev/null
@@ -0,0 +1,114 @@
+.TH "MEMCACHED_SERVER_LIST_FREE" "3" "April 09, 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)
+.SS 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
+.SS 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>
+.SS SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..bd291b3
--- /dev/null
@@ -0,0 +1,125 @@
+.TH "MEMCACHED_SERVER_PUSH" "3" "April 09, 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)
+.SS 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
+.SS 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
+.SS SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..ac7c9a4
--- /dev/null
@@ -0,0 +1,125 @@
+.TH "MEMCACHED_SERVER_ST" "3" "April 09, 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)
+.SS 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
+.SS 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
+.SS SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..a58c487
--- /dev/null
@@ -0,0 +1,125 @@
+.TH "MEMCACHED_SERVERS" "3" "April 09, 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)
+.SS 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
+.SS 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
+.SS SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..8bc67ec
--- /dev/null
@@ -0,0 +1,114 @@
+.TH "MEMCACHED_SERVERS_PARSE" "3" "April 09, 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)
+.SS 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
+.SS 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>
+.SS SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..42dde1f
--- /dev/null
@@ -0,0 +1,101 @@
+.TH "MEMCACHED_SERVERS_RESET" "3" "April 09, 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 SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_st *memcached_create (memcached_st *ptr);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void memcached_free (memcached_st *ptr);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st *memcached_clone (memcached_st *destination, memcached_st *source);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void memcached_servers_reset(memcached_st);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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
+Please note, when you write new application use memcached_create_with_options() over memcached_create().
+.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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..048dc42
--- /dev/null
@@ -0,0 +1,165 @@
+.TH "MEMCACHED_SET" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_set \- Storing and Replacing Data
+.
+.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 SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_prepend(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_append(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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 tests 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 tests
+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 testsed 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 SEE ALSO
+.sp
+memcached(1) libmemached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..8c870cb
--- /dev/null
@@ -0,0 +1,165 @@
+.TH "MEMCACHED_SET_BY_KEY" "3" "April 09, 2011" "0.47" "libmemcached"
+.SH NAME
+memcached_set_by_key \- Storing and Replacing Data
+.
+.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 SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_prepend(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_append(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B 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);
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.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 tests 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 tests
+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 testsed 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 SEE ALSO
+.sp
+memcached(1) libmemached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..e4547ff
--- /dev/null
@@ -0,0 +1,102 @@
+.TH "MEMCACHED_SET_MEMORY_ALLOCATORS" "3" "April 09, 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. This enables libmemcached to be used inside of applications that have their own malloc implementation.
+.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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..f74529c
--- /dev/null
@@ -0,0 +1,102 @@
+.TH "MEMCACHED_SET_MEMORY_ALLOCATORS_CONTEXT" "3" "April 09, 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. This enables libmemcached to be used inside of applications that have their own malloc implementation.
+.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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..241d7ef
--- /dev/null
@@ -0,0 +1,94 @@
+.TH "MEMCACHED_SET_SASL_CALLBACKS" "3" "April 09, 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.
+.
+.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
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..f7bcb55
--- /dev/null
@@ -0,0 +1,82 @@
+.TH "MEMCACHED_SET_USER_DATA" "3" "April 09, 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)
+.SS 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
+.SS 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>
+.SS SEE ALSO
+.sp
+memcached(1) libmemcached(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..03dd921
--- /dev/null
@@ -0,0 +1,127 @@
+.TH "MEMCACHED_STAT" "3" "April 09, 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)
+.SS 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
+.SS 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>
+.SS SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..233c4f3
--- /dev/null
@@ -0,0 +1,127 @@
+.TH "MEMCACHED_STAT_EXECUTE" "3" "April 09, 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)
+.SS 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
+.SS 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>
+.SS SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..82201db
--- /dev/null
@@ -0,0 +1,127 @@
+.TH "MEMCACHED_STAT_GET_KEYS" "3" "April 09, 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)
+.SS 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
+.SS 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>
+.SS SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..d629cb6
--- /dev/null
@@ -0,0 +1,127 @@
+.TH "MEMCACHED_STAT_GET_VALUE" "3" "April 09, 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)
+.SS 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
+.SS 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>
+.SS SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..dd879d4
--- /dev/null
@@ -0,0 +1,127 @@
+.TH "MEMCACHED_STAT_SERVERNAME" "3" "April 09, 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)
+.SS 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
+.SS 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>
+.SS SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..f61f555
--- /dev/null
@@ -0,0 +1,127 @@
+.TH "MEMCACHED_STATS" "3" "April 09, 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)
+.SS 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
+.SS 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>
+.SS SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..5f0c775
--- /dev/null
@@ -0,0 +1,77 @@
+.TH "MEMCACHED_STRERROR" "3" "April 09, 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.
+.
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SS SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+const char *
+  memcached_strerror (memcached_st *ptr,
+                      memcached_return_t rc);
+.ft P
+.fi
+.SS 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>
+.SS SEE ALSO
+.sp
+memcached(1) libmemcached(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..56e9abc
--- /dev/null
@@ -0,0 +1,82 @@
+.TH "MEMCACHED_USER_DATA" "3" "April 09, 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)
+.SS 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
+.SS 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>
+.SS SEE ALSO
+.sp
+memcached(1) libmemcached(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..adc61be
--- /dev/null
@@ -0,0 +1,74 @@
+.TH "MEMCACHED_VERBOSITY" "3" "April 09, 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)
+.SS SYNOPSIS
+.sp
+.nf
+.ft C
+#include <libmemcached/memcached.h>
+
+memcached_return_t
+  memcached_verbosity (memcached_st *ptr,
+                       unsigned int verbosity);
+.ft P
+.fi
+.SS 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>
+.SS SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" 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..2462b75
--- /dev/null
@@ -0,0 +1,85 @@
+.TH "MEMCACHED_VERSION" "3" "April 09, 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)
+.SS 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
+.SS 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>
+.SS SEE ALSO
+.sp
+memcached(1) libmemcached(3) memcached_strerror(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcapable.1 b/docs/man/memcapable.1
new file mode 100644 (file)
index 0000000..6659f88
--- /dev/null
@@ -0,0 +1,90 @@
+.TH "MEMCAPABLE" "1" "April 09, 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 the server for compatibility and capabilities
+.SH SYNOPSIS
+.INDENT 0.0
+.TP
+.B \-h hostname
+.sp
+Specify the hostname to connect to. The default is \fIlocalhost\fP
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-p port
+.sp
+Specify the port number to connect to. The default is \fI11211\fP
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-c
+.
+Generate a coredump when it detects an error from the server.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-v
+.
+Print out the comparison when it detects an error from the server.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-t n
+.sp
+Set the timeout from an IO operation to/from the server to \fIn\fP seconds.
+.UNINDENT
+.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 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
+\fImemcached(1)\fP \fIlibmemcached(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcat.1 b/docs/man/memcat.1
new file mode 100644 (file)
index 0000000..5b4c395
--- /dev/null
@@ -0,0 +1,69 @@
+.TH "MEMCAT" "1" "April 09, 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
+.INDENT 0.0
+.TP
+.B \-\-help
+.UNINDENT
+.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 DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memcp.1 b/docs/man/memcp.1
new file mode 100644 (file)
index 0000000..0a9a46f
--- /dev/null
@@ -0,0 +1,72 @@
+.TH "MEMCP" "1" "April 09, 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
+.INDENT 0.0
+.TP
+.B \-\-help
+.UNINDENT
+.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 DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memdump.1 b/docs/man/memdump.1
new file mode 100644 (file)
index 0000000..5df5ab6
--- /dev/null
@@ -0,0 +1,60 @@
+.TH "MEMDUMP" "1" "April 09, 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
+.INDENT 0.0
+.TP
+.B \-\-help
+.UNINDENT
+.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 SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memerror.1 b/docs/man/memerror.1
new file mode 100644 (file)
index 0000000..8af0384
--- /dev/null
@@ -0,0 +1,62 @@
+.TH "MEMERROR" "1" "April 09, 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
+.INDENT 0.0
+.TP
+.B \-\-help
+.UNINDENT
+.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.
+.SS HOME
+.sp
+To find out more infoerroration please check:
+\fI\%https://launchpad.net/libmemcached\fP
+.SS 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 DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memflush.1 b/docs/man/memflush.1
new file mode 100644 (file)
index 0000000..192b3e0
--- /dev/null
@@ -0,0 +1,67 @@
+.TH "MEMFLUSH" "1" "April 09, 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
+.INDENT 0.0
+.TP
+.B \-\-help
+.UNINDENT
+.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 DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memrm.1 b/docs/man/memrm.1
new file mode 100644 (file)
index 0000000..6735160
--- /dev/null
@@ -0,0 +1,66 @@
+.TH "MEMRM" "1" "April 09, 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
+.INDENT 0.0
+.TP
+.B \-\-help
+.UNINDENT
+.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 DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memslap.1 b/docs/man/memslap.1
new file mode 100644 (file)
index 0000000..304ccbc
--- /dev/null
@@ -0,0 +1,52 @@
+.TH "MEMSLAP" "1" "April 09, 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.
+.
+.SH SYNOPSIS
+.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.
+.sp
+You can specify servers via the \fB\-\-servers\fP option or via the
+environment variable \fBMEMCACHED_SERVERS\fP.
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/man/memstat.1 b/docs/man/memstat.1
new file mode 100644 (file)
index 0000000..bc0fdd1
--- /dev/null
@@ -0,0 +1,64 @@
+.TH "MEMSTAT" "1" "April 09, 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
+.INDENT 0.0
+.TP
+.B \-\-help
+.UNINDENT
+.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 SEE ALSO
+.sp
+memcached(1) libmemcached(3)
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.\" 
+.
diff --git a/docs/memaslap.pod b/docs/memaslap.pod
deleted file mode 100644 (file)
index c5de6f7..0000000
+++ /dev/null
@@ -1,1007 +0,0 @@
-=head1 NAME
-
-memaslap - Load testing and benchmarking tool for memcached
-
-=head1 SYNOPSIS
-
-  memaslap [options]
-
-=head1 DESCRIPTION
-
-B<memaslap> 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.
-
-Memslap manages network connections like memcached with
-libevent. Each thread of memaslap is bound with a CPU core, all
-the threads don't 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.
-
-You can specify servers via the B<--servers> option or via the
-environment variable C<MEMCACHED_SERVERS>.
-
-
-=head1 FEATURES
-
-Memslap is developed to for the following purposes:
-
-=over
-
-=item Manages network connections with libevent asynchronously.
-
-=item Set both TCP and UDP up to use non-blocking IO.
-
-=item Improves parallelism: higher performance in multi-threads environments.
-
-=item Improves time efficiency: faster processing speed.
-
-=item Generates key and value more efficiently; key size distribution and value size distribution are configurable.
-
-=item Supports get, multi-get, and set commands; command distribution is configurable.
-
-=item Supports controllable miss rate and overwrite rate.
-
-=item Supports data and expire-time verification.
-
-=item Supports dumping statistic information periodically. 
-
-=item Supports thousands of TCP connections.
-
-=item Supports binary protocol.
-
-=item Supports facebook test (set with TCP and multi-get with UDP) and replication test.
-
-=back
-
-=head1 DETAILS
-
-=head2 Effective implementation of network.
-
-For memaslap, both TCP and UDP use non-blocking network IO. All
-the network events are managed by libevent as memcached. The network module
-of memaslap is similar to memcached. Libevent can ensure
-memaslap can handle network very efficiently.
-
-=head2 Effective implementation of multi-threads and concurrency
-
-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. 
-
-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.
-
-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 memaslap 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. 
-
-=head2 Effective implementation of generating key and value
-
-In order to improve time efficiency and space efficiency, 
-memaslap creates a random characters table with 10M characters. All the
-suffixes of keys and values are generated from this random characters table.
-
-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, 
-memaslap 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 memaslap has an algorithm to ensure that. 
-
-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.
-
-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. 
-
-=head2 Simple but useful task scheduling
-
-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, memaslap 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.
-
-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. 
-
-If memcached server has two cache layers (memory and SSD), running
-memaslap with different window sizes can get different cache
-miss rates. If memaslap adds enough objects into the windows at
-the beginning, and the cache of memcached cannot store all the objects
-initialized, then memaslap 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. 
-
-=head2 Useful implementation of multi-servers , UDP, TCP, multi-get and binary protocol
-
-Because each thread is self-governed, memaslap can assign
-different threads to handle different memcached servers. This is just one of
-the ways in which memaslap 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, memaslap can set some objects to one
-memcached server, and get these objects from the other servers.
-
-By default, Memslap does single get. If the user specifies
-multi-get option, memaslap will collect enough get commands and
-pack and send the commands together. 
-
-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.
-
-
-=head1 USAGE
-
-Below are some usage samples:
-
-=over 4
-
-=item memaslap -s 127.0.0.1:11211 -S 5s
-
-=item memaslap -s 127.0.0.1:11211 -t 2m -v 0.2 -e 0.05 -b
-
-=item memaslap -s 127.0.0.1:11211 -F config -t 2m -w 40k -S 20s -o 0.2
-
-=item memaslap -s 127.0.0.1:11211 -F config -t 2m -T 4 -c 128 -d 20 -P 40k
-
-=item memaslap -s 127.0.0.1:11211 -F config -t 2m -d 50 -a -n 40
-
-=item memaslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m
-
-=item memaslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m -p 2
-
-=back
-
-The user must specify one server at least to run memaslap. The
-rest of the parameters have default values, as shown below:
-
-Thread number = 1                    Concurrency = 16
-
-Run time = 600 seconds                Configuration file = NULL
-
-Key size = 64                         Value size = 1024
-
-Get/set = 9:1                         Window size = 10k
-
-Execute number = 0                   Single get = true
-
-Multi-get = false                      Number of sockets of each concurrency = 1
-
-Reconnect = false                     Data verification = false
-
-Expire-time verification = false           ASCII protocol = true
-
-Binary protocol = false                 Dumping statistic information
-
-periodically = false
-
-Overwrite proportion = 0%             UDP = false
-
-TCP = true                           Limit throughput = false
-
-Facebook test = false                  Replication test = false
-
-=head2 Key size, value size and command distribution.
-
-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,
-memaslap 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.
-
-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.
-
-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, memaslap 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.
-
-=head2 Multi-thread and concurrency
-
-The high performance of memaslap 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.
-
-If the system supports setting CPU affinity and the number of threads
-specified by the user is greater than 1, memaslap will try to
-bind each thread to a different CPU core. So if you want to get the best
-performance memaslap, 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.
-
-1. For 8 CPU cores system
-
-For example:
-
---threads=2 --concurrency=128
-
---threads=8 --concurrency=128
-
---threads=8 --concurrency=256
-
---threads=12 --concurrency=144
-
-2. For 16 CPU cores system
-
-For example:
-
---threads=8 --concurrency=128
-
---threads=16 --concurrency=256
-
---threads=16 --concurrency=512
-
---threads=24 --concurrency=288
-
-The memaslap 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 memaslap, there
-are two ways to do this:
-
-Decrease the number of threads and concurrencies.
-Use the option “--tps” that memaslap
-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.
-
-=head2 Window size
-
-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:
-
-Assume that the key size is 128 bytes, and the value size is 2048 bytes, and
-concurrency=128.
-
-1. Small cache cache_size=1M, 100% cache miss (all data get from SSD).
-win_size=10k
-
-2. cache_size=4G
-
-(1). cache miss rate 0%
-
-win_size=8k
-
-(2). cache miss rate 5%
-
-win_size=11k
-
-3. cache_size=16G
-
-(1). cache miss rate 0%
-
-win_size=32k
-
-(2). cache miss
-
-rate 5%
-
-win_size=46k
-
-The formula for calculating window size for cache miss rate 0%: 
-
-cache_size / concurrency / (key_size + value_size) * 0.5
-
-The formula for calculating window size for cache miss rate 5%: 
-
-cache_size / concurrency / (key_size + value_size) * 0.7
-
-=head2 Verification
-
-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.
-
-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, memaslap will verify the expire-time and
-value. 
-
-=head2 multi-servers and multi-clients
-
-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. 
-
-For example:
-
---servers=10.1.1.1:11211,10.1.1.2:11212,10.1.1.3:11213 --threads=6 --concurrency=36
-
-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).  
-
-All the threads and concurrencies in memaslap are self-governed.
-
-So is memaslap. The user can start up several 
-memaslap instances. The user can run memaslap on different client
-machines to communicate with the same memcached server at the same. It is
-recommended that the user start different memaslap on different
-machines using the same configuration. 
-
-=head2 Run with execute number mode or time mode
-
-The default memaslap runs with time mode. The default run time
-is 10 minutes. If it times out, memaslap will exit. Do not
-specify both execute number mode and time mode at the same time; just
-specify one instead. 
-
-For example:
-
---time=30s (It means the test will run 30 seconds.)
-
---execute_number=100000 (It means that after running 100000 commands, the test will exit.)
-
-=head2 Dump statistic information periodically.
-
-The user can use "--stat_freq=" or "-S" to specify the frequency.
-
-For example:
-
---stat_freq=20s
-
-Memslap will dump the statistics of the commands (get and set) at the frequency of every 20
-seconds. 
-
-For more information on the format of dumping statistic information, refer to “Format of Output” section.
-
-=head2 Multi-get
-
-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. 
-
-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,
-memaslap sends one “multi-get” to the server once. For the
-binary protocol, memaslap sends several single get commands
-together as “multi-get” to the server.
-
-=head2 UDP and TCP
-
-Memslap supports both UDP and TCP. For TCP,
-memaslap does not reconnect the memcached server if socket connections are
-lost. If all the socket connections are lost or memcached server crashes,
-memaslap will exit. If the user specifies the “--reconnect”
-option when socket connections are lost, it will reconnect them. 
-
-User can use “--udp” to enable the UDP feature, but UDP comes with some
-limitations: 
-
-UDP cannot set data more than 1400 bytes. 
-
-UDP is not supported by the binary protocol because the binary protocol of
-memcached does not support that.
-
-UDP doesn’t support reconnection.
-
-=head2 Facebook test
-
-Set data with TCP and multi-get with UDP. Specify the following options: 
-
-"--facebook --division=50"
-
-If you want to create thousands of TCP connections, specify the
-
-"--conn_sock=" option. 
-
-For example: --facebook --division=50 --conn_sock=200
-
-The above command means that memaslap will do facebook test,
-each concurrency has 200 socket TCP connections and one UDP socket.
-
-Memslap sets objects with the TCP socket, and multi-gets 50
-objects once with the UDP socket.
-
-If you specify "--division=50", the key size must be less that 25 bytes
-because the UDP packet size is 1400 bytes.
-
-=head2 Replication test
-
-For replication test, the user must specify at least two memcached servers.
-The user can use “—rep_write=” option to enable feature. 
-
-For example:
-
---servers=10.1.1.1:11211,10.1.1.2:11212 –rep_write=2
-
-The above command means that there are 2 replication memcached servers,
-memaslap 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,
-memaslap will only get objects from server 1. If server 0 comes
-back to life again, memaslap will reconnect server 0. If both
-server 0 and server 1 crash, memaslap will exit.
-
-=head2  Supports thousands of TCP connections
-
-Start memaslap 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. 
-
-For example: 
-
---threads=8 --concurrency=128 --conn_sock=128
-
-The above command means that memaslap 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.
-
-=head2 Supports binary protocol
-
-Start memaslap 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.
-
-For example:
-
---binary
-
-Since memcached 1.3.3 doesn't implement binary UDP protocol,
-memaslap 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.
-
-=head1 Configuration file
-
-This section describes the format of the configuration file.  By default
-when no configuration file is specified memaslap reads the default
-one located at ~/.memaslap.cnf.
-
-Below is a sample configuration file:
-
- ***************************************************************************
- #comments should start with '#'
- #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
- #memaslap 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
- #memaslap 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 memaslap 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
-
-
-
-=head1 Format of output
-
-At the beginning, memaslap displays some configuration information as follows:
-
-=over 4
-
-=item servers : 127.0.0.1:11211
-
-=item threads count: 1
-
-=item concurrency: 16
-
-=item run time: 20s
-
-=item windows size: 10k
-
-=item set proportion: set_prop=0.10
-
-=item get proportion: get_prop=0.90
-
-=back
-
-=head2 Where
-
-=over 4
-
-=item servers : "servers"
-
-The servers used by memaslap.
-
-=item threads count
-
-The number of threads memaslap runs with.
-
-=item concurrency
-
-The number of concurrencies memaslap runs with.
-
-=item run time
-
-How long to run memaslap.
-
-=item windows size
-
-The task window size of each concurrency.
-
-=item set proportion
-
-The proportion of set command.
-
-=item get proportion
-
-The proportion of get command.
-
-=back
-
-The output of dynamic statistics is something like this:
-
- ---------------------------------------------------------------------------------------------------------------------------------
- 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
- ---------------------------------------------------------------------------------------------------------------------------------
-
-=head2 Where
-
-=over 4
-
-=item Get Statistics
-
-Statistics information of get command
-
-=item Set Statistics
-
-Statistics information of set command
-
-=item Total Statistics
-
-Statistics information of both get and set command
-
-=item Period
-
-Result within a period
-
-=item Global
-
-Accumulated results
-
-=item Ops
-
-Total operations
-
-=item TPS
-
-Throughput, operations/second
-
-=item Net
-
-The rate of network
-
-=item Get_miss
-
-How many objects can’t be gotten
-
-=item Min
-
-The minimum response time
-
-=item Max
-
-The maximum response time
-
-=item Avg: 
-
-The average response time
-
-=item Std_dev
-
-Standard deviation of response time
-
-=item Geo_dist
-
-Geometric distribution based on natural exponential function
-
-=back
-
-At the end, memaslap will output something like this:
-
-  ---------------------------------------------------------------------------------------------------------------------------------
-  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
-  ---------------------------------------------------------------------------------------------------------------------------------
-
-=head2 Where
-
-=over 4
-
-=item Get Statistics
-
-Get statistics of response time
-
-=item Set Statistics
-
-Set statistics of response time
-
-=item Total Statistics
-
-Both get and set statistics of response time
-
-=item Min
-
-The accumulated and minimum response time
-
-=item Max
-
-The accumulated and maximum response time
-
-=item Avg
-
-The accumulated and average response time
-
-=item Std
-
-Standard deviation of response time
-
-=item Log2 Dist
-
-Geometric distribution based on logarithm 2
-
-=item cmd_get
-
-Total get commands done
-
-=item cmd_set
-
-Total set commands done
-
-=item get_misses
-
-How many objects can’t be gotten from server
-
-=item verify_misses
-
-How many objects need to verify but can’t get them
-
-=item verify_failed
-
-How many objects with insistent value
-
-=item expired_get
-
-How many objects are expired but we get them
-
-=item unexpired_unget
-
-How many objects are unexpired but we can’t get them
-
-=item written_bytes
-
-Total written bytes
-
-=item read_bytes
-
-Total read bytes
-
-=item object_bytes
-
-Total object bytes
-
-=item packet_disorder
-
-How many UDP packages are disorder
-
-=item packet_drop
-
-How many UDP packages are lost
-
-=item udp_timeout
-
-How many times UDP time out happen
-
-=item Run time
-
-Total run time
-
-=item Ops
-
-Total operations 
-
-=item TPS
-
-Throughput, operations/second
-
-=item Net_rate
-
-The average rate of network
-
-=back
-
-=head1 OPTIONS
-
--s, --servers=
-    List one or more servers to connect. Servers count must be less than
-    threads count. e.g.: --servers=localhost:1234,localhost:11211
-
--T, --threads=
-    Number of threads to startup, better equal to CPU numbers. Default 8.
-
--c, --concurrency=
-    Number of concurrency to simulate with load. Default 128.
-
--n, --conn_sock=
-    Number of TCP socks per concurrency. Default 1.
-
--x, --execute_number=
-    Number of operations(get and set) to execute for the
-    given test. Default 1000000.
-
--t, --time=
-    How long the test to run, suffix: s-seconds, m-minutes, h-hours,
-    d-days e.g.: --time=2h.
-
--F, --cfg_cmd=
-    Load the configure file to get command,key and value distribution list.
-
--w, --win_size=
-    Task window size of each concurrency, suffix: K, M e.g.: --win_size=10k.
-    Default 10k.
-
--X, --fixed_size=
-    Fixed length of value.
-
--v, --verify=
-    The proportion of date verification, e.g.: --verify=0.01
-
--d, --division=
-    Number of keys to multi-get once. Default 1, means single get.
-
--S, --stat_freq=
-    Frequency of dumping statistic information. suffix: s-seconds,
-    m-minutes, e.g.: --resp_freq=10s.
-
--e, --exp_verify=
-    The proportion of objects with expire time, e.g.: --exp_verify=0.01.
-    Default no object with expire time
-
--o, --overwrite=
-    The proportion of objects need overwrite, e.g.: --overwrite=0.01.
-    Default never overwrite object.
-
--R, --reconnect 
-    Reconnect support, when connection is closed it will be reconnected.
-
--U, --udp 
-    UDP support, default memaslap uses TCP, TCP port and UDP port of
-    server must be same.
-
--a, --facebook 
-    Whether it enables facebook test feature, set with TCP and multi-get with UDP.
-
--B, --binary 
-    Whether it enables binary protocol. Default with ASCII protocol.
-
--P, --tps=
-    Expected throughput, suffix: K, e.g.: --tps=10k.
-
--p, --rep_write=
-    The first nth servers can write data, e.g.: --rep_write=2.
-
--b, --verbose 
-    Whether it outputs detailed information when verification fails.
-
--h, --help 
-    Display this message and then exit.
-
--V, --version 
-    Display the version of the application and then exit.
-
-=head1 EXAMPLES
-
-memaslap -s 127.0.0.1:11211 -S 5s
-
-memaslap -s 127.0.0.1:11211 -t 2m -v 0.2 -e 0.05 -b
-
-memaslap -s 127.0.0.1:11211 -F config -t 2m -w 40k -S 20s -o 0.2
-
-memaslap -s 127.0.0.1:11211 -F config -t 2m -T 4 -c 128 -d 20 -P 40k
-
-memaslap -s 127.0.0.1:11211 -F config -t 2m -d 50 -a -n 40
-
-memaslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m
-
-memaslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m -p 2
-
-=head1 HOME
-
-To find out more information please check:
-L<http://launchpad.org/libmemcached>
-
-=head1 AUTHORS
-
-Mingqiang Zhuang E<lt>mingqiangzhuang@hengtiansoft.comE<gt> (Schooner Technolgy)
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3)
-
-=cut
-
diff --git a/docs/memaslap.rst b/docs/memaslap.rst
new file mode 100644 (file)
index 0000000..841b7a6
--- /dev/null
@@ -0,0 +1,1248 @@
+==================================================
+memaslap - Load testing  and benchmarking a server
+==================================================
+
+
+--------
+SYNOPSIS
+--------
+
+.. program:: memaslap
+
+.. option:: --help
+
+-----------
+DESCRIPTION
+-----------
+
+
+\ **memaslap**\  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 testss data
+verification, expire-time verification, UDP, binary protocol, facebook test,
+replication test, multi-get and reconnection, etc.
+
+Memslap manages network connections like memcached with
+libevent. Each thread of memaslap is bound with a CPU core, all
+the threads don't 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.
+
+You can specify servers via the \ **--servers**\  option or via the
+environment variable \ ``MEMCACHED_SERVERS``\ .
+
+
+--------
+FEATURES
+--------
+
+
+Memslap is developed to for the following purposes:
+
+
+Manages network connections with libevent asynchronously.
+
+
+
+Set both TCP and UDP up to use non-blocking IO.
+
+
+
+Improves parallelism: higher performance in multi-threads environments.
+
+
+
+Improves time efficiency: faster processing speed.
+
+
+
+Generates key and value more efficiently; key size distribution and value size distribution are configurable.
+
+
+
+Supports get, multi-get, and set commands; command distribution is configurable.
+
+
+
+Supports controllable miss rate and overwrite rate.
+
+
+
+Supports data and expire-time verification.
+
+
+
+Supports dumping statistic information periodically.
+
+
+
+Supports thousands of TCP connections.
+
+
+
+Supports binary protocol.
+
+
+
+Supports facebook test (set with TCP and multi-get with UDP) and replication test.
+
+
+
+
+-------
+DETAILS
+-------
+
+
+Effective implementation of network.
+____________________________________
+
+
+For memaslap, both TCP and UDP use non-blocking network IO. All
+the network events are managed by libevent as memcached. The network module
+of memaslap is similar to memcached. Libevent can ensure
+memaslap can handle network very efficiently.
+
+
+Effective implementation of multi-threads and concurrency
+_________________________________________________________
+
+
+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 testss setting CPU
+core affinity.
+
+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.
+
+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 memaslap 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.
+
+
+Effective implementation of generating key and value
+____________________________________________________
+
+
+In order to improve time efficiency and space efficiency, 
+memaslap creates a random characters table with 10M characters. All the
+suffixes of keys and values are generated from this random characters table.
+
+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, 
+memaslap 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 memaslap has an algorithm to ensure that.
+
+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.
+
+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.
+
+
+Simple but useful task scheduling
+_________________________________
+
+
+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, memaslap 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.
+
+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.
+
+If memcached server has two cache layers (memory and SSD), running
+memaslap with different window sizes can get different cache
+miss rates. If memaslap adds enough objects into the windows at
+the beginning, and the cache of memcached cannot store all the objects
+initialized, then memaslap 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.
+
+
+Useful implementation of multi-servers , UDP, TCP, multi-get and binary protocol
+________________________________________________________________________________
+
+
+Because each thread is self-governed, memaslap can assign
+different threads to handle different memcached servers. This is just one of
+the ways in which memaslap testss multiple servers. The only
+limitation is that the number of servers cannot be greater than the number
+of threads. The other way to tests multiple servers is for replication
+test. Each concurrency has one socket connection to each memcached server.
+For the implementation, memaslap can set some objects to one
+memcached server, and get these objects from the other servers.
+
+By default, Memslap does single get. If the user specifies
+multi-get option, memaslap will collect enough get commands and
+pack and send the commands together.
+
+Memslap testss 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
+testss 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.
+
+
+
+-----
+USAGE
+-----
+
+
+Below are some usage samples:
+
+
+memaslap -s 127.0.0.1:11211 -S 5s
+
+
+
+memaslap -s 127.0.0.1:11211 -t 2m -v 0.2 -e 0.05 -b
+
+
+
+memaslap -s 127.0.0.1:11211 -F config -t 2m -w 40k -S 20s -o 0.2
+
+
+
+memaslap -s 127.0.0.1:11211 -F config -t 2m -T 4 -c 128 -d 20 -P 40k
+
+
+
+memaslap -s 127.0.0.1:11211 -F config -t 2m -d 50 -a -n 40
+
+
+
+memaslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m
+
+
+
+memaslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m -p 2
+
+
+
+The user must specify one server at least to run memaslap. The
+rest of the parameters have default values, as shown below:
+
+Thread number = 1                    Concurrency = 16
+
+Run time = 600 seconds                Configuration file = NULL
+
+Key size = 64                         Value size = 1024
+
+Get/set = 9:1                         Window size = 10k
+
+Execute number = 0                   Single get = true
+
+Multi-get = false                      Number of sockets of each concurrency = 1
+
+Reconnect = false                     Data verification = false
+
+Expire-time verification = false           ASCII protocol = true
+
+Binary protocol = false                 Dumping statistic information
+
+periodically = false
+
+Overwrite proportion = 0%             UDP = false
+
+TCP = true                           Limit throughput = false
+
+Facebook test = false                  Replication test = false
+
+Key size, value size and command distribution.
+______________________________________________
+
+
+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,
+memaslap 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.
+
+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.
+
+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, memaslap only testss set and get commands. And it
+testss 100% set and 100% get. For 100% get, it will preset some objects to
+the server.
+
+
+Multi-thread and concurrency
+____________________________
+
+
+The high performance of memaslap 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.
+
+If the system testss setting CPU affinity and the number of threads
+specified by the user is greater than 1, memaslap will try to
+bind each thread to a different CPU core. So if you want to get the best
+performance memaslap, 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.
+
+1. For 8 CPU cores system
+
+For example:
+
+--threads=2 --concurrency=128
+
+--threads=8 --concurrency=128
+
+--threads=8 --concurrency=256
+
+--threads=12 --concurrency=144
+
+2. For 16 CPU cores system
+
+For example:
+
+--threads=8 --concurrency=128
+
+--threads=16 --concurrency=256
+
+--threads=16 --concurrency=512
+
+--threads=24 --concurrency=288
+
+The memaslap 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 memaslap, there
+are two ways to do this:
+
+Decrease the number of threads and concurrencies.
+Use the option “--tps” that memaslap
+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.
+
+
+Window size
+___________
+
+
+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 testss 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:
+
+Assume that the key size is 128 bytes, and the value size is 2048 bytes, and
+concurrency=128.
+
+1. Small cache cache_size=1M, 100% cache miss (all data get from SSD).
+win_size=10k
+
+2. cache_size=4G
+
+(1). cache miss rate 0%
+
+win_size=8k
+
+(2). cache miss rate 5%
+
+win_size=11k
+
+3. cache_size=16G
+
+(1). cache miss rate 0%
+
+win_size=32k
+
+(2). cache miss
+
+rate 5%
+
+win_size=46k
+
+The formula for calculating window size for cache miss rate 0%:
+
+cache_size / concurrency / (key_size + value_size) \* 0.5
+
+The formula for calculating window size for cache miss rate 5%:
+
+cache_size / concurrency / (key_size + value_size) \* 0.7
+
+
+Verification
+____________
+
+
+Memslap testss both data verification and expire-time
+verification. The user can use "--verify=" or "-v" to specify the proportion
+of data verification. In theory, it testss 100% data verification. The
+user can use "--exp_verify=" or "-e" to specify the proportion of
+expire-time verification. In theory, it testss 100% expire-time
+verification. Specify the "--verbose" options to get more detailed error
+information.
+
+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, memaslap will verify the expire-time and
+value.
+
+
+multi-servers and multi-config
+_______________________________
+
+
+Memslap testss 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.
+
+For example:
+
+--servers=10.1.1.1:11211,10.1.1.2:11212,10.1.1.3:11213 --threads=6 --concurrency=36
+
+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).
+
+All the threads and concurrencies in memaslap are self-governed.
+
+So is memaslap. The user can start up several 
+memaslap instances. The user can run memaslap on different client
+machines to communicate with the same memcached server at the same. It is
+recommended that the user start different memaslap on different
+machines using the same configuration.
+
+
+Run with execute number mode or time mode
+_________________________________________
+
+
+The default memaslap runs with time mode. The default run time
+is 10 minutes. If it times out, memaslap will exit. Do not
+specify both execute number mode and time mode at the same time; just
+specify one instead.
+
+For example:
+
+--time=30s (It means the test will run 30 seconds.)
+
+--execute_number=100000 (It means that after running 100000 commands, the test will exit.)
+
+
+Dump statistic information periodically.
+________________________________________
+
+
+The user can use "--stat_freq=" or "-S" to specify the frequency.
+
+For example:
+
+--stat_freq=20s
+
+Memslap will dump the statistics of the commands (get and set) at the frequency of every 20
+seconds.
+
+For more information on the format of dumping statistic information, refer to “Format of Output” section.
+
+
+Multi-get
+_________
+
+
+The user can use "--division=" or "-d" to specify multi-get keys count.
+Memslap by default does single get with TCP. Memslap also testss data 
+verification and expire-time verification for multi-get.
+
+Memslap testss 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,
+memaslap sends one “multi-get” to the server once. For the
+binary protocol, memaslap sends several single get commands
+together as “multi-get” to the server.
+
+
+UDP and TCP
+___________
+
+
+Memslap testss both UDP and TCP. For TCP,
+memaslap does not reconnect the memcached server if socket connections are
+lost. If all the socket connections are lost or memcached server crashes,
+memaslap will exit. If the user specifies the “--reconnect”
+option when socket connections are lost, it will reconnect them.
+
+User can use “--udp” to enable the UDP feature, but UDP comes with some
+limitations:
+
+UDP cannot set data more than 1400 bytes.
+
+UDP is not testsed by the binary protocol because the binary protocol of
+memcached does not tests that.
+
+UDP doesn’t tests reconnection.
+
+
+Facebook test
+_____________
+
+
+Set data with TCP and multi-get with UDP. Specify the following options:
+
+"--facebook --division=50"
+
+If you want to create thousands of TCP connections, specify the
+
+"--conn_sock=" option.
+
+For example: --facebook --division=50 --conn_sock=200
+
+The above command means that memaslap will do facebook test,
+each concurrency has 200 socket TCP connections and one UDP socket.
+
+Memslap sets objects with the TCP socket, and multi-gets 50
+objects once with the UDP socket.
+
+If you specify "--division=50", the key size must be less that 25 bytes
+because the UDP packet size is 1400 bytes.
+
+
+Replication test
+________________
+
+
+For replication test, the user must specify at least two memcached servers.
+The user can use “—rep_write=” option to enable feature.
+
+For example:
+
+--servers=10.1.1.1:11211,10.1.1.2:11212 –rep_write=2
+
+The above command means that there are 2 replication memcached servers,
+memaslap 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,
+memaslap will only get objects from server 1. If server 0 comes
+back to life again, memaslap will reconnect server 0. If both
+server 0 and server 1 crash, memaslap will exit.
+
+
+Supports thousands of TCP connections
+_____________________________________
+
+
+Start memaslap with "--conn_sock=" or "-n" to enable this
+feature. Make sure that your system can tests opening thousands of files
+and creating thousands of sockets. However, this feature does not tests
+reconnection if sockets disconnect.
+
+For example:
+
+--threads=8 --concurrency=128 --conn_sock=128
+
+The above command means that memaslap 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.
+
+
+Supports binary protocol
+________________________
+
+
+Start memaslap with "--binary" or "-B" options to enable this
+feature. It testss all the above features except UDP, because the latest
+memcached 1.3.3 does not implement binary UDP protocol.
+
+For example:
+
+--binary
+
+Since memcached 1.3.3 doesn't implement binary UDP protocol,
+memaslap does not tests UDP. In addition, memcached 1.3.3 does not tests
+multi-get. If you specify "--division=50" option, it just sends 50 get
+commands together as “mulit-get” to the server.
+
+
+
+------------------
+Configuration file
+------------------
+
+
+This section describes the format of the configuration file.  By default
+when no configuration file is specified memaslap reads the default
+one located at ~/.memaslap.cnf.
+
+Below is a sample configuration file:
+
+
+.. code-block:: perl
+
+  ---------------------------------------------------------------------------
+  #comments should start with '#'
+  #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
+  #memaslap 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
+  #memaslap 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 memaslap only testss 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
+
+
+
+----------------
+Format of output
+----------------
+
+
+At the beginning, memaslap displays some configuration information as follows:
+
+
+servers : 127.0.0.1:11211
+
+
+
+threads count: 1
+
+
+
+concurrency: 16
+
+
+
+run time: 20s
+
+
+
+windows size: 10k
+
+
+
+set proportion: set_prop=0.10
+
+
+
+get proportion: get_prop=0.90
+
+
+
+Where
+_____
+
+
+
+servers : "servers"
+ The servers used by memaslap.
+
+
+threads count
+ The number of threads memaslap runs with.
+
+
+concurrency
+ The number of concurrencies memaslap runs with.
+
+
+run time
+ How long to run memaslap.
+
+
+windows size
+ The task window size of each concurrency.
+
+
+set proportion
+ The proportion of set command.
+
+
+get proportion
+ The proportion of get command.
+
+
+The output of dynamic statistics is something like this:
+
+
+.. code-block:: perl
+
+  ---------------------------------------------------------------------------------------------------------------------------------
+  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
+  ---------------------------------------------------------------------------------------------------------------------------------
+
+
+
+Where
+_____
+
+
+
+Get Statistics
+ Statistics information of get command
+
+
+Set Statistics
+ Statistics information of set command
+
+
+Total Statistics
+ Statistics information of both get and set command
+
+
+Period
+ Result within a period
+
+
+Global
+ Accumulated results
+
+
+Ops
+ Total operations
+
+
+TPS
+ Throughput, operations/second
+
+
+Net
+ The rate of network
+
+
+Get_miss
+ How many objects can’t be gotten
+
+
+Min
+ The minimum response time
+
+
+Max
+ The maximum response time
+
+
+Avg:
+ The average response time
+
+
+Std_dev
+ Standard deviation of response time
+
+
+Geo_dist
+ Geometric distribution based on natural exponential function
+
+
+At the end, memaslap will output something like this:
+
+
+.. code-block:: perl
+
+   ---------------------------------------------------------------------------------------------------------------------------------
+   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
+   ---------------------------------------------------------------------------------------------------------------------------------
+
+
+
+Where
+_____
+
+
+
+Get Statistics
+ Get statistics of response time
+
+
+Set Statistics
+ Set statistics of response time
+
+
+Total Statistics
+ Both get and set statistics of response time
+
+
+Min
+ The accumulated and minimum response time
+
+
+Max
+ The accumulated and maximum response time
+
+
+Avg
+ The accumulated and average response time
+
+
+Std
+ Standard deviation of response time
+
+
+Log2 Dist
+ Geometric distribution based on logarithm 2
+
+
+cmd_get
+ Total get commands done
+
+
+cmd_set
+ Total set commands done
+
+
+get_misses
+ How many objects can’t be gotten from server
+
+
+verify_misses
+ How many objects need to verify but can’t get them
+
+
+verify_failed
+ How many objects with insistent value
+
+
+expired_get
+ How many objects are expired but we get them
+
+
+unexpired_unget
+ How many objects are unexpired but we can’t get them
+
+
+written_bytes
+ Total written bytes
+
+
+read_bytes
+ Total read bytes
+
+
+object_bytes
+ Total object bytes
+
+
+packet_disorder
+ How many UDP packages are disorder
+
+
+packet_drop
+ How many UDP packages are lost
+
+
+udp_timeout
+ How many times UDP time out happen
+
+
+Run time
+ Total run time
+
+
+Ops
+ Total operations
+
+
+TPS
+ Throughput, operations/second
+
+
+Net_rate
+ The average rate of network
+
+
+
+
+-------
+OPTIONS
+-------
+
+
+-s, --servers=
+    List one or more servers to connect. Servers count must be less than
+    threads count. e.g.: --servers=localhost:1234,localhost:11211
+
+-T, --threads=
+    Number of threads to startup, better equal to CPU numbers. Default 8.
+
+-c, --concurrency=
+    Number of concurrency to simulate with load. Default 128.
+
+-n, --conn_sock=
+    Number of TCP socks per concurrency. Default 1.
+
+-x, --execute_number=
+    Number of operations(get and set) to execute for the
+    given test. Default 1000000.
+
+-t, --time=
+    How long the test to run, suffix: s-seconds, m-minutes, h-hours,
+    d-days e.g.: --time=2h.
+
+-F, --cfg_cmd=
+    Load the configure file to get command,key and value distribution list.
+
+-w, --win_size=
+    Task window size of each concurrency, suffix: K, M e.g.: --win_size=10k.
+    Default 10k.
+
+-X, --fixed_size=
+    Fixed length of value.
+
+-v, --verify=
+    The proportion of date verification, e.g.: --verify=0.01
+
+-d, --division=
+    Number of keys to multi-get once. Default 1, means single get.
+
+-S, --stat_freq=
+    Frequency of dumping statistic information. suffix: s-seconds,
+    m-minutes, e.g.: --resp_freq=10s.
+
+-e, --exp_verify=
+    The proportion of objects with expire time, e.g.: --exp_verify=0.01.
+    Default no object with expire time
+
+-o, --overwrite=
+    The proportion of objects need overwrite, e.g.: --overwrite=0.01.
+    Default never overwrite object.
+
+-R, --reconnect 
+    Reconnect tests, when connection is closed it will be reconnected.
+
+-U, --udp 
+    UDP tests, default memaslap uses TCP, TCP port and UDP port of
+    server must be same.
+
+-a, --facebook 
+    Whether it enables facebook test feature, set with TCP and multi-get with UDP.
+
+-B, --binary 
+    Whether it enables binary protocol. Default with ASCII protocol.
+
+-P, --tps=
+    Expected throughput, suffix: K, e.g.: --tps=10k.
+
+-p, --rep_write=
+    The first nth servers can write data, e.g.: --rep_write=2.
+
+-b, --verbose 
+    Whether it outputs detailed information when verification fails.
+
+-h, --help 
+    Display this message and then exit.
+
+-V, --version 
+    Display the version of the application and then exit.
+
+
+--------
+EXAMPLES
+--------
+
+
+memaslap -s 127.0.0.1:11211 -S 5s
+
+memaslap -s 127.0.0.1:11211 -t 2m -v 0.2 -e 0.05 -b
+
+memaslap -s 127.0.0.1:11211 -F config -t 2m -w 40k -S 20s -o 0.2
+
+memaslap -s 127.0.0.1:11211 -F config -t 2m -T 4 -c 128 -d 20 -P 40k
+
+memaslap -s 127.0.0.1:11211 -F config -t 2m -d 50 -a -n 40
+
+memaslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m
+
+memaslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m -p 2
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`http://launchpad.org/libmemcached <http://launchpad.org/libmemcached>`_
+
+
+-------
+AUTHORS
+-------
+
+
+Mingqiang Zhuang <mingqiangzhuang@hengtiansoft.com> (Schooner Technolgy)
+Brian Aker, <brian@tangent.org>
+
+
+--------
+SEE ALSO
+--------
+
+:manpage:`memcached(1)` :manpage:`libmemcached(3)`
diff --git a/docs/memcached_analyze.pod b/docs/memcached_analyze.pod
deleted file mode 100644 (file)
index 9c0401f..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-=head1 NAME
-
-memcached_analyze - Analyze server information
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  memcached_analysis_st *
-    memcached_analyze (memcached_st *ptr,
-                       memcached_stat_st *stat,
-                       memcached_return_t *error);
-
-=head1 DESCRIPTION
-
-libmemcached(3) has the ability to query a memcached server (or collection
-of servers) for their current state. Queries to find state return a
-C<memcached_analysis_st> structure. You are responsible for freeing this structure.
-
-memcached_analyze() analyzes useful information based on the provided servers
-and sets the result to the C<memcached_analysis_st> structure. The return value
-must be freed by the calling application.
-
-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.
-
-=head1 RETURN
-
-A pointer to the allocated C<memcached_analysis_st> structure on success and
-a NULL pointer on failure. You may inspect the error detail by checking the
-C<memcached_return_t> value.
-
-Any method returning a C<memcached_analysis_st> expects you to free the
-memory allocated for it.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Toru Maesaka, E<lt>dev@torum.netE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
diff --git a/docs/memcached_analyze.rst b/docs/memcached_analyze.rst
new file mode 100644 (file)
index 0000000..1cd8bc3
--- /dev/null
@@ -0,0 +1,79 @@
+=================
+Anaylzing servers
+=================
+
+
+Analyze server information
+
+
+-------
+LIBRARY
+-------
+
+
+C Client Library for memcached (libmemcached, -lmemcached)
+
+
+--------
+SYNOPSIS
+--------
+
+
+
+.. code-block:: perl
+
+   #include <libmemcached/memcached.h>
+   memcached_analysis_st *
+     memcached_analyze (memcached_st *ptr,
+                        memcached_stat_st *stat,
+                        memcached_return_t *error);
+
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+libmemcached(3) has the ability to query a memcached server (or collection
+of servers) for their current state. Queries to find state return a
+\ ``memcached_analysis_st``\  structure. You are responsible for freeing this structure.
+
+memcached_analyze() analyzes useful information based on the provided servers
+and sets the result to the \ ``memcached_analysis_st``\  structure. The return value
+must be freed by the calling application.
+
+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.
+
+
+------
+RETURN
+------
+
+
+A pointer to the allocated \ ``memcached_analysis_st``\  structure on success and
+a NULL pointer on failure. You may inspect the error detail by checking the
+\ ``memcached_return_t``\  value.
+
+Any method returning a \ ``memcached_analysis_st``\  expects you to free the
+memory allocated for it.
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+--------
+SEE ALSO
+--------
+
+
+:manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)`
+
diff --git a/docs/memcached_auto.pod b/docs/memcached_auto.pod
deleted file mode 100644 (file)
index bd6da19..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-=head1 NAME
-
-memcached_increment, memcached_decrement,
-memcached_increment_with_initial, memcached_decrement_with_initial - Manipulate
-counters
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <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);
-
-=head1 DESCRIPTION
-
-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.  
-
-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.
-
-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.
-
-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.
-
-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.
-
-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.
-
-=head1 RETURN
-
-A value of type C<memcached_return_t> is returned.
-On success that value will be C<MEMCACHED_SUCCESS>.
-Use memcached_strerror() to translate this value to a printable string.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
diff --git a/docs/memcached_auto.rst b/docs/memcached_auto.rst
new file mode 100644 (file)
index 0000000..39b4247
--- /dev/null
@@ -0,0 +1,99 @@
+====================================
+Incrementing and Decrementing Values
+====================================
+
+
+
+--------
+SYNOPSIS
+--------
+
+
+
+#include <libmemcached/memcached.h>
+.. c:function:: memcached_return_t memcached_increment (memcached_st *ptr, const char *key, size_t key_length, unsigned int offset, uint64_t *value);
+
+.. c:function:: memcached_return_t memcached_decrement (memcached_st *ptr, const char *key, size_t key_length, unsigned int offset, uint64_t *value);
+
+.. c:function:: 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);
+
+.. c:function:: 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);
+
+.. c:function::  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);
+
+.. c:function:: 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);
+
+.. c:function:: 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);
+
+.. c:function:: 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);
+
+Compile and link with -lmemcached
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+:manpage:`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.
+
+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.
+
+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.
+
+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.
+
+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.
+
+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.
+
+
+------
+RETURN
+------
+
+
+A value of type \ ``memcached_return_t``\  is returned.
+On success that value will be \ ``MEMCACHED_SUCCESS``\ .
+Use memcached_strerror() to translate this value to a printable string.
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+--------
+SEE ALSO
+--------
+
+
+:manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)`
diff --git a/docs/memcached_behavior.pod b/docs/memcached_behavior.pod
deleted file mode 100644 (file)
index 02ab0de..0000000
+++ /dev/null
@@ -1,297 +0,0 @@
-=head1 NAME
-
-memcached_behavior_get, memcached_behavior_set - Manipulate behavior
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <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);
-
-=head1 DESCRIPTION
-
-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
-C<MEMCACHED_SUCCESS>).
-
-memcached_behavior_get() takes a behavior flag and returns whether or not
-that behavior is currently enabled in the client.
-
-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.
-
-=over 4
-
-=item MEMCACHED_BEHAVIOR_USE_UDP
-
-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
-C<MEMCACHED_NOT_SUPPORTED> 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().
-
-All other operations are supported but are executed in a 'fire-and-forget'
-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.
-
-libmemcached(3) does not allow TCP and UDP servers to be shared within
-the same libmemached(3) client 'instance'. An attempt to add a TCP server
-when this behavior is enabled will result in a C<MEMCACHED_INVALID_HOST_PROTOCOL>,
-as will attempting to add a UDP server when this behavior has not been enabled.
-
-=item MEMCACHED_BEHAVIOR_NO_BLOCK
-
-Causes libmemcached(3) to use asychronous IO. This is the fastest transport
-available for storage functions.
-
-=item MEMCACHED_BEHAVIOR_SND_TIMEOUT
-
-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.
-
-=item MEMCACHED_BEHAVIOR_RCV_TIMEOUT
-
-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.
-
-=item MEMCACHED_BEHAVIOR_TCP_NODELAY
-
-Turns on the no-delay feature for connecting sockets (may be faster in some
-environments).
-
-=item MEMCACHED_BEHAVIOR_HASH
-
-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's advantages and it's weaknesses. If you don't know or don't 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.
-
-=item MEMCACHED_BEHAVIOR_DISTRIBUTION
-
-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.
-
-=item MEMCACHED_BEHAVIOR_CACHE_LOOKUPS
-
-Memcached can cache named lookups so that DNS lookups are made only once.
-
-=item MEMCACHED_BEHAVIOR_SUPPORT_CAS
-
-Support CAS operations (this is not enabled by default at this point in the server since it imposes a slight performance penalty).
-
-=item MEMCACHED_BEHAVIOR_KETAMA
-
-Sets the default distribution to MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA
-and the hash to MEMCACHED_HASH_MD5.
-
-=item MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED
-
-Sets the default distribution to MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA with the weighted support.
-and the hash to MEMCACHED_HASH_MD5.
-
-=item MEMCACHED_BEHAVIOR_KETAMA_HASH
-
-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.
-
-=item MEMCACHED_BEHAVIOR_KETAMA_COMPAT
-
-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.
-
-=item MEMCACHED_BEHAVIOR_POLL_TIMEOUT
-
-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.
-
-=item MEMCACHED_BEHAVIOR_USER_DATA
-
-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. This was deprecated in 0.14 in favor
-of memcached_callback_set(3). This will be removed in 0.15.
-
-=item MEMCACHED_BEHAVIOR_BUFFER_REQUESTS
-
-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.
-
-=item MEMCACHED_BEHAVIOR_VERIFY_KEY
-
-Enabling this will cause libmemcached(3) to test all keys to verify that they
-are valid keys.
-
-=item MEMCACHED_BEHAVIOR_SORT_HOSTS
-
-Enabling this will cause hosts that are added to be placed in the host list in
-sorted order. This will defeat consisten hashing.
-
-=item MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT
-
-In non-blocking mode this changes the value of the timeout during socket
-connection.
-
-=item MEMCACHED_BEHAVIOR_BINARY_PROTOCOL
-
-Enable the use of the binary protocol. Please note that you cannot toggle
-this flag on an open connection.
-
-=item MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
-
-Set this value to enable the server be removed after continuous MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
-times connection failure.
-
-=item MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK
-
-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).
-
-=item MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK
-
-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).
-
-=item MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH
-
-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.
-
-=item MEMCACHED_BEHAVIOR_NOREPLY
-
-Set this value to specify that you really don't care about the result
-from your storage commands (set, add, replace, append, prepend).
-
-=item MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS
-
-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 'n' next servers specified in your server list).
-
-=item MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ
-
-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 'n' 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.
-
-=item MEMCACHED_BEHAVIOR_CORK
-
-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.
-
-=item MEMCACHED_BEHAVIOR_KEEPALIVE
-
-Enable TCP_KEEPALIVE behavior.
-
-=item MEMCACHED_BEHAVIOR_KEEPALIVE_IDLE
-
-Specify time, in seconds, to mark a connection as idle. This is only available as an option Linux.
-
-=item MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE
-
-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.
-
-=item MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE
-
-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.
-
-=item MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
-
-This number of times a host can have an error before it is disabled.
-
-=item MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS
-
-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.
-
-=item MEMCACHED_BEHAVIOR_RETRY_TIMEOUT
-
-When enabled a host which is problematic will only be checked for usage
-based on the amount of time set by this behavior.
-
-=item MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY
-
-When enabled the prefix key will be added to the key when determining
-server by hash.
-
-=back
-
-=head1 RETURN
-
-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.
-
-=head1 NOTES
-
-memcached_behavior_set() in version .17 was changed from taking a pointer
-to data value, to taking a uin64_t.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
diff --git a/docs/memcached_behavior.rst b/docs/memcached_behavior.rst
new file mode 100644 (file)
index 0000000..e70b3d9
--- /dev/null
@@ -0,0 +1,303 @@
+================================
+Modifying how the driver behaves
+================================
+
+
+Manipulate behavior
+
+
+-------
+LIBRARY
+-------
+
+
+C Client Library for memcached (libmemcached, -lmemcached)
+
+
+--------
+SYNOPSIS
+--------
+
+
+#include <libmemcached/memcached.h>
+.. c:function:: uint64_t memcached_behavior_get (memcached_st *ptr, memcached_behavior flag);
+
+.. c:function:: memcached_return_t memcached_behavior_set (memcached_st *ptr, memcached_behavior flag, uint64_t data);
+
+
+
+-----------
+DESCRIPTION
+-----------
+
+:manpage:`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
+\ ``MEMCACHED_SUCCESS``\ ).
+
+memcached_behavior_get() takes a behavior flag and returns whether or not
+that behavior is currently enabled in the client.
+
+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.
+
+
+.. c:var:: MEMCACHED_BEHAVIOR_USE_UDP
+
+Causes :manpage:`libmemcached(3)` to use the UDP transport when communicating
+with a memcached server. Not all I/O operations are testsed
+when this behavior is enababled. The following operations will return
+\ ``MEMCACHED_NOT_SUPPORTED``\  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().
+
+All other operations are testsed but are executed in a 'fire-and-forget'
+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.
+
+:manpage:`libmemcached(3)` does not allow TCP and UDP servers to be shared within
+the same libmemached(3) client 'instance'. An attempt to add a TCP server
+when this behavior is enabled will result in a \ ``MEMCACHED_INVALID_HOST_PROTOCOL``\ ,
+as will attempting to add a UDP server when this behavior has not been enabled.
+
+
+
+.. c:var:: MEMCACHED_BEHAVIOR_NO_BLOCK
+
+Causes :manpage:`libmemcached(3)` to use asychronous IO. This is the fastest transport
+available for storage functions.
+
+
+.. c:var:: MEMCACHED_BEHAVIOR_SND_TIMEOUT
+
+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.
+
+
+.. c:var:: MEMCACHED_BEHAVIOR_RCV_TIMEOUT
+
+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.
+
+
+
+.. c:var:: MEMCACHED_BEHAVIOR_TCP_NODELAY
+
+Turns on the no-delay feature for connecting sockets (may be faster in some
+environments).
+
+
+
+.. c:var:: MEMCACHED_BEHAVIOR_HASH
+
+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's advantages and it's weaknesses. If you don't know or don't care, just go with the default.
+
+Support for MEMCACHED_HASH_HSIEH is a compile time option that is disabled by default. To enable tests for this hashing algorithm, configure and build libmemcached with the --enable-hash_hsieh.
+
+
+
+.. c:var:: MEMCACHED_BEHAVIOR_DISTRIBUTION
+
+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.
+
+.. c:var:: MEMCACHED_BEHAVIOR_CACHE_LOOKUPS
+
+DEPRECATED. Memcached can cache named lookups so that DNS lookups are made only once.
+
+.. c:var:: MEMCACHED_BEHAVIOR_SUPPORT_CAS
+
+Support CAS operations (this is not enabled by default at this point in the server since it imposes a slight performance penalty).
+
+
+.. c:var:: MEMCACHED_BEHAVIOR_KETAMA
+
+Sets the default distribution to MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA and the hash to MEMCACHED_HASH_MD5.
+
+
+.. c:var:: MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED
+
+Sets the default distribution to MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA with the weighted tests.  and the hash to MEMCACHED_HASH_MD5.
+
+.. c:var:: MEMCACHED_BEHAVIOR_KETAMA_HASH
+
+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.
+
+.. c:var:: MEMCACHED_BEHAVIOR_KETAMA_COMPAT
+
+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.
+
+.. c:var:: MEMCACHED_BEHAVIOR_POLL_TIMEOUT
+
+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.
+
+.. c:var:: MEMCACHED_BEHAVIOR_USER_DATA
+
+DEPRECATED
+
+.. c:var:: MEMCACHED_BEHAVIOR_BUFFER_REQUESTS
+
+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.
+
+
+.. c:var:: MEMCACHED_BEHAVIOR_VERIFY_KEY
+
+Enabling this will cause :manpage:`libmemcached(3)` to test all keys to verify that they are valid keys.
+
+
+
+.. c:var:: MEMCACHED_BEHAVIOR_SORT_HOSTS
+
+Enabling this will cause hosts that are added to be placed in the host list in sorted order. This will defeat consisten hashing.
+
+
+
+.. c:var:: MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT
+
+In non-blocking mode this changes the value of the timeout during socket connection.
+
+
+
+.. c:var:: MEMCACHED_BEHAVIOR_BINARY_PROTOCOL
+
+Enable the use of the binary protocol. Please note that you cannot toggle this flag on an open connection.
+
+
+
+.. c:var:: MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+
+Set this value to enable the server be removed after continuous MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT times connection failure.
+
+
+
+.. c:var:: MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK
+
+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).
+
+
+
+.. c:var:: MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK
+
+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).
+
+
+
+.. c:var:: MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH
+
+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.
+
+
+
+.. c:var:: MEMCACHED_BEHAVIOR_NOREPLY
+
+Set this value to specify that you really don't care about the result from your storage commands (set, add, replace, append, prepend).
+
+
+
+.. c:var:: MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS
+
+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 'n' next servers specified in your server list).
+
+
+
+.. c:var:: MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ
+
+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 'n' 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.
+
+
+
+.. c:var:: MEMCACHED_BEHAVIOR_CORK
+
+This open has been deprecated with the behavior now built and used appropriately on selected platforms.
+
+
+.. c:var:: MEMCACHED_BEHAVIOR_KEEPALIVE
+
+Enable TCP_KEEPALIVE behavior.
+
+
+.. c:var:: MEMCACHED_BEHAVIOR_KEEPALIVE_IDLE
+Specify time, in seconds, to mark a connection as idle. This is only available as an option Linux.
+
+.. c:var:: MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE
+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.
+
+.. c:var:: MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE
+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.
+
+.. c:var:: MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+DEPRECATED, please see MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS. This number of times a host can have an error before it is disabled.
+
+.. c:var:: MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS
+DEPRECATED, please see MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS. 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.
+
+.. c:var:: MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS
+
+If enabled any hosts which have been flagged as disabled will be removed from the list of servers in the memcached_st structure.
+
+.. c:var:: MEMCACHED_BEHAVIOR_RETRY_TIMEOUT
+When enabled a host which is problematic will only be checked for usage based on the amount of time set by this behavior.  
+
+
+.. c:var:: MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY
+When enabled the prefix key will be added to the key when determining server by hash.
+
+
+
+------
+RETURN
+------
+
+
+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.
+
+
+-----
+NOTES
+-----
+
+
+memcached_behavior_set() in version .17 was changed from taking a pointer
+to data value, to taking a uin64_t.
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+
+--------
+SEE ALSO
+--------
+
+
+:manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)`
diff --git a/docs/memcached_callback.pod b/docs/memcached_callback.pod
deleted file mode 100644 (file)
index a5b5429..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-=head1 NAME
-
-memcached_callback_get, memcached_callback_set - Get and set a callback
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <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);
-
-=head1 DESCRIPTION
-
-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.
-
-memcached_callback_get() takes a callback flag and returns the structure or
-function set by memcached_callback_set().
-
-memcached_callback_set() changes the function/structure assigned by a
-callback flag. No connections are reset. 
-
-You can use MEMCACHED_CALLBACK_USER_DATA to provide custom context if required for any 
-of the callbacks
-
-=over 4
-
-=item MEMCACHED_CALLBACK_CLEANUP_FUNCTION
-
-When memcached_delete() is called this function will be excuted. At the
-point of its execution all connections have been closed.
-
-=item MEMCACHED_CALLBACK_CLONE_FUNCTION
-
-When memcached_delete() is called this function will be excuted. At the
-point of its execution all connections have been closed.
-
-=item MEMCACHED_CALLBACK_PREFIX_KEY
-
-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.
-
-If you set a value with the value being NULL then the prefix key is disabled.
-
-=item MEMCACHED_CALLBACK_USER_DATA
-
-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.
-
-=item  MEMCACHED_CALLBACK_MALLOC_FUNCTION
-
-DEPRECATED: use memcached_set_memory_allocators instead.
-
-=item  MEMCACHED_CALLBACK_REALLOC_FUNCTION
-
-DEPRECATED: use memcached_set_memory_allocators instead.
-
-=item  MEMCACHED_CALLBACK_FREE_FUNCTION
-
-DEPRECATED: use memcached_set_memory_allocators instead.
-
-=item  MEMCACHED_CALLBACK_GET_FAILURE
-
-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).
-
-The prototype for this is:
-memcached_return_t (*memcached_trigger_key)(memcached_st *ptr, char *key, size_t key_length, memcached_result_st *result);
-
-=item  MEMCACHED_CALLBACK_DELETE_TRIGGER
-
-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.
-
-The prototype for this is:
-typedef memcached_return_t (*memcached_trigger_delete_key)(memcached_st *ptr, char *key, size_t key_length);
-
-
-=back
-
-=head1 RETURN
-
-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.
-
-memcached_callback_set() returns MEMCACHED_SUCCESS upon successful setting,
-otherwise MEMCACHED_FAILURE on error.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
diff --git a/docs/memcached_callback.rst b/docs/memcached_callback.rst
new file mode 100644 (file)
index 0000000..258fa69
--- /dev/null
@@ -0,0 +1,158 @@
+=================
+Setting callbacks
+=================
+
+
+Get and set a callback
+
+
+-------
+LIBRARY
+-------
+
+
+C Client Library for memcached (libmemcached, -lmemcached)
+
+
+--------
+SYNOPSIS
+--------
+
+#include <libmemcached/memcached.h>
+.. c:function:: memcached_return_t memcached_callback_set (memcached_st *ptr, memcached_callback_t flag, void *data);
+.. c:function:: void * memcached_callback_get (memcached_st *ptr, memcached_callback_t flag, memcached_return_t *error);
+
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+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.
+
+memcached_callback_get() takes a callback flag and returns the structure or
+function set by memcached_callback_set().
+
+memcached_callback_set() changes the function/structure assigned by a
+callback flag. No connections are reset.
+
+You can use MEMCACHED_CALLBACK_USER_DATA to provide custom context if required for any 
+of the callbacks
+
+
+.. c:var:: MEMCACHED_CALLBACK_CLEANUP_FUNCTION
+ When memcached_delete() is called this function will be excuted. At the
+ point of its execution all connections have been closed.
+
+
+.. c:var:: MEMCACHED_CALLBACK_CLONE_FUNCTION
+ When memcached_delete() is called this function will be excuted. At the
+ point of its execution all connections have been closed.
+
+
+.. c:var:: MEMCACHED_CALLBACK_PREFIX_KEY
+ 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.
+ If you set a value with the value being NULL then the prefix key is disabled.
+
+
+.. c:var:: MEMCACHED_CALLBACK_USER_DATA
+ 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.
+
+
+.. c:var:: MEMCACHED_CALLBACK_MALLOC_FUNCTION
+ DEPRECATED: use memcached_set_memory_allocators instead.
+
+
+.. c:var:: MEMCACHED_CALLBACK_REALLOC_FUNCTION
+ DEPRECATED: use memcached_set_memory_allocators instead.
+
+
+.. c:var:: MEMCACHED_CALLBACK_FREE_FUNCTION
+ DEPRECATED: use memcached_set_memory_allocators instead.
+
+
+.. c:var:: MEMCACHED_CALLBACK_GET_FAILURE
+ 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).
+ The prototype for this is:
+ memcached_return_t (\*memcached_trigger_key)(memcached_st \*ptr, char \*key, size_t key_length, memcached_result_st \*result);
+
+
+.. c:var:: MEMCACHED_CALLBACK_DELETE_TRIGGER
+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.
+The prototype for this is: typedef memcached_return_t (\*memcached_trigger_delete_key)(memcached_st \*ptr, char \*key, size_t key_length);
+
+
+
+------
+RETURN
+------
+
+
+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.
+
+memcached_callback_set() returns MEMCACHED_SUCCESS upon successful setting,
+otherwise MEMCACHED_FAILURE on error.
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+------
+AUTHOR
+------
+
+
+Brian Aker, <brian@tangent.org>
+
+
+--------
+SEE ALSO
+--------
+
+
+:manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)`
diff --git a/docs/memcached_create.pod b/docs/memcached_create.pod
deleted file mode 100644 (file)
index 4323723..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-=head1 NAME
-
-memcached_create, memcached_free, memcached_clone, memcached_servers_reset- Create a memcached_st structure
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <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);
-
-=head1 DESCRIPTION
-
-memcached_create() is used to create a C<memcached_st> structure that will then
-be used by other libmemcached(3) functions to communicate with the server. You
-should either pass a statically declared C<memcached_st> to memcached_create() or
-a NULL. If a NULL passed in then a structure is allocated for you.
-
-memcached_clone() is similar to memcached_create(3) but it copies the
-defaults and list of servers from the source C<memcached_st>. 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 C<memcached_st> will be allocated for you.
-
-memcached_servers_reset() allows you to zero out the list of servers that
-the memcached_st has.
-
-To clean up memory associated with a C<memcached_st> 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.
-
-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.
-
-=head1 RETURN
-
-memcached_create() returns a pointer to the memcached_st that was created
-(or initialized). On an allocation failure, it returns NULL.
-
-memcached_clone() returns a pointer to the memcached_st that was created
-(or initialized). On an allocation failure, it returns NULL.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
diff --git a/docs/memcached_create.rst b/docs/memcached_create.rst
new file mode 100644 (file)
index 0000000..ce69285
--- /dev/null
@@ -0,0 +1,81 @@
+======================================
+Creating and destroying a memcached_st
+======================================
+
+
+Create a memcached_st structure
+
+
+--------
+SYNOPSIS
+--------
+
+#include <libmemcached/memcached.h>
+.. c:function:: memcached_st *memcached_create (memcached_st *ptr);
+.. c:function:: void memcached_free (memcached_st *ptr);
+.. c:function:: memcached_st *memcached_clone (memcached_st *destination, memcached_st *source);
+.. c:function:: void memcached_servers_reset(memcached_st);
+
+Compile and link with -lmemcached
+
+
+-----------
+DESCRIPTION
+-----------
+
+memcached_create() is used to create a \ ``memcached_st``\  structure that will then
+be used by other libmemcached(3) functions to communicate with the server. You
+should either pass a statically declared \ ``memcached_st``\  to memcached_create() or
+a NULL. If a NULL passed in then a structure is allocated for you.
+
+Please note, when you write new application use memcached_create_with_options() over memcached_create().
+
+memcached_clone() is similar to memcached_create(3) but it copies the
+defaults and list of servers from the source \ ``memcached_st``\ . 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 \ ``memcached_st``\  will be allocated for you.
+
+memcached_servers_reset() allows you to zero out the list of servers that
+the memcached_st has.
+
+To clean up memory associated with a \ ``memcached_st``\  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.
+
+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.
+
+
+------
+RETURN
+------
+
+
+memcached_create() returns a pointer to the memcached_st that was created
+(or initialized). On an allocation failure, it returns NULL.
+
+memcached_clone() returns a pointer to the memcached_st that was created
+(or initialized). On an allocation failure, it returns NULL.
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+--------
+SEE ALSO
+--------
+
+
+:manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)`
diff --git a/docs/memcached_delete.pod b/docs/memcached_delete.pod
deleted file mode 100644 (file)
index e104eab..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-=head1 NAME
-
-memcached_delete - Delete a key
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <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);
-
-=head1 DESCRIPTION
-
-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.
-
-Expiration works by placing the item into a delete queue, which means that
-it won't 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.
-
-Please note the the Danga memcached server removed support for expiration in
-the 1.4 version.
-
-=head1 RETURN
-
-A value of type C<memcached_return_t> is returned
-On success that value will be C<MEMCACHED_SUCCESS>.
-Use memcached_strerror() to translate this value to a printable string.
-
-If you are using the non-blocking mode of the library, success only
-means that the message was queued for delivery.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
diff --git a/docs/memcached_delete.rst b/docs/memcached_delete.rst
new file mode 100644 (file)
index 0000000..85ecef7
--- /dev/null
@@ -0,0 +1,70 @@
+===========================
+Deleting data from a server
+===========================
+
+--------
+SYNOPSIS
+--------
+
+
+#include <libmemcached/memcached.h>
+.. c:function:: memcached_return_t memcached_delete (memcached_st *ptr, const char *key, size_t key_length, time_t expiration);
+
+.. c:function:: 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);
+
+Compile and link with -lmemcached
+
+-----------
+DESCRIPTION
+-----------
+
+
+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.
+
+Expiration works by placing the item into a delete queue, which means that
+it won't 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.
+
+Please note the the Danga memcached server removed tests for expiration in
+the 1.4 version.
+
+
+------
+RETURN
+------
+
+
+A value of type \ ``memcached_return_t``\  is returned
+On success that value will be \ ``MEMCACHED_SUCCESS``\ .
+Use memcached_strerror() to translate this value to a printable string.
+
+If you are using the non-blocking mode of the library, success only
+means that the message was queued for delivery.
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+------
+AUTHOR
+------
+
+
+Brian Aker, <brian@tangent.org>
+
+
+--------
+SEE ALSO
+--------
+
+:manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)`
diff --git a/docs/memcached_dump.pod b/docs/memcached_dump.pod
deleted file mode 100644 (file)
index 2d53701..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-=head1 NAME
-
-memcached_dump - get a list of keys found on memcached servers
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <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);
-
-=head1 DESCRIPTION
-
-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.
-
-Currently the binar protocol is not supported.
-
-=head1 RETURN
-
-A value of type C<memcached_return_t> is returned
-On success that value will be C<MEMCACHED_SUCCESS>.
-Use memcached_strerror() to translate this value to a printable string.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
diff --git a/docs/memcached_dump.rst b/docs/memcached_dump.rst
new file mode 100644 (file)
index 0000000..2e11968
--- /dev/null
@@ -0,0 +1,85 @@
+==========================
+Dumping data from a server
+==========================
+
+
+Get a list of keys found on memcached servers
+
+
+-------
+LIBRARY
+-------
+
+
+C Client Library for memcached (libmemcached, -lmemcached)
+
+
+--------
+SYNOPSIS
+--------
+
+
+
+.. code-block:: perl
+
+   #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);
+
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+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.
+
+Currently the binar protocol is not testsed.
+
+
+------
+RETURN
+------
+
+
+A value of type \ ``memcached_return_t``\  is returned
+On success that value will be \ ``MEMCACHED_SUCCESS``\ .
+Use memcached_strerror() to translate this value to a printable string.
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+------
+AUTHOR
+------
+
+
+Brian Aker, <brian@tangent.org>
+
+
+--------
+SEE ALSO
+--------
+
+
+:manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)`
diff --git a/docs/memcached_flush.pod b/docs/memcached_flush.pod
deleted file mode 100644 (file)
index 0ca9547..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-=head1 NAME
-
-memcached_flush - wipe contents of memcached servers
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  memcached_return_t
-    memcached_flush (memcached_st *ptr,
-                     time_t expiration);
-
-=head1 DESCRIPTION
-
-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.
-
-=head1 RETURN
-
-A value of type C<memcached_return_t> is returned
-On success that value will be C<MEMCACHED_SUCCESS>.
-Use memcached_strerror() to translate this value to a printable string.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
diff --git a/docs/memcached_flush.rst b/docs/memcached_flush.rst
new file mode 100644 (file)
index 0000000..a188666
--- /dev/null
@@ -0,0 +1,65 @@
+=====================================
+Wiping clean the contents of a server
+=====================================
+
+
+Wipe contents of memcached servers
+
+
+--------
+SYNOPSIS
+--------
+
+
+#include <libmemcached/memcached.h>
+.. c:function:: memcached_return_t memcached_flush (memcached_st *ptr, time_t expiration);
+
+Compile and link with -lmemcached
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+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.
+
+
+------
+RETURN
+------
+
+
+A value of type \ ``memcached_return_t``\  is returned
+On success that value will be \ ``MEMCACHED_SUCCESS``\ .
+Use memcached_strerror() to translate this value to a printable string.
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+------
+AUTHOR
+------
+
+
+Brian Aker, <brian@tangent.org>
+
+
+--------
+SEE ALSO
+--------
+
+:manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)`
diff --git a/docs/memcached_flush_buffers.pod b/docs/memcached_flush_buffers.pod
deleted file mode 100644 (file)
index 11c06dc..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-=head1 NAME
-
-memcached_flush_buffers - Flush buffers and send buffered commands
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  memcached_return_t
-    memcached_flush_buffers (memcached_st *ptr);
-
-=head1 DESCRIPTION
-
-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.
-
-=head1 RETURN
-
-A value of type C<memcached_return_t> is returned
-On success that value will be C<MEMCACHED_SUCCESS>.
-Use memcached_strerror() to translate this value to a printable string.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Trond Norbye, E<lt>trond.norbye@gmail.comE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3) memcached_behavior(3)
-
-=cut
-
diff --git a/docs/memcached_flush_buffers.rst b/docs/memcached_flush_buffers.rst
new file mode 100644 (file)
index 0000000..634ded1
--- /dev/null
@@ -0,0 +1,71 @@
+=======================
+Flushing client buffers
+=======================
+
+
+Flush buffers and send buffered commands
+
+
+-------
+LIBRARY
+-------
+
+
+C Client Library for memcached (libmemcached, -lmemcached)
+
+
+--------
+SYNOPSIS
+--------
+
+#include <libmemcached/memcached.h>
+.. c:function:: memcached_return_t memcached_flush_buffers (memcached_st *ptr);
+
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+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.
+
+
+------
+RETURN
+------
+
+
+A value of type \ ``memcached_return_t``\  is returned
+On success that value will be \ ``MEMCACHED_SUCCESS``\ .
+Use memcached_strerror() to translate this value to a printable string.
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+------
+AUTHOR
+------
+
+
+Brian Aker, <brian@tangent.org>
+
+Trond Norbye, <trond.norbye@gmail.com>
+
+
+--------
+SEE ALSO
+--------
+
+
+:manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)`
diff --git a/docs/memcached_generate_hash_value.pod b/docs/memcached_generate_hash_value.pod
deleted file mode 100644 (file)
index a2af1fc..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-=head1 NAME
-
-memcached_generate_hash_value - Hash a key value
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <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);
-
-=head1 DESCRIPTION
-
-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.
-
-The allowed hash algorithm constants are listed in the manpage for
-memcached_behavior_set().
-
-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.
-
-As of version 0.36 all hash methods have been placed into the library
-libhashkit(3) which is linked with libmemcached(3).
-
-=head1 RETURN
-
-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.
-
-=head1 HOME
-
-To find out more information please check: 
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_behavior_set(3) libhashkit(3)
-
-=cut
-
diff --git a/docs/memcached_generate_hash_value.rst b/docs/memcached_generate_hash_value.rst
new file mode 100644 (file)
index 0000000..116bfd2
--- /dev/null
@@ -0,0 +1,76 @@
+===============================
+Generating hash values directly
+===============================
+
+
+Hash a key value
+
+
+-------- 
+SYNOPSIS 
+--------
+
+
+#include <libmemcached/memcached.h>
+.. c:function:: uint32_t memcached_generate_hash_value (const char *key, size_t key_length, memcached_hash_t hash_algorithm);
+
+.. c:function:: uint32_t memcached_generate_hash (memcached_st *ptr, const char *key, size_t key_length);
+
+Compile and link with -lmemcachedutil -lmemcached
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+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.
+
+The allowed hash algorithm constants are listed in the manpage for
+memcached_behavior_set().
+
+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.
+
+As of version 0.36 all hash methods have been placed into the library
+libhashkit(3) which is linked with libmemcached(3). For more information please see its documentation.
+
+
+------
+RETURN
+------
+
+
+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.
+
+
+----
+HOME
+----
+
+
+To find out more information please check: 
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+------
+AUTHOR
+------
+
+
+Brian Aker, <brian@tangent.org>
+
+
+--------
+SEE ALSO
+--------
+
+
+:manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)`
diff --git a/docs/memcached_get.pod b/docs/memcached_get.pod
deleted file mode 100644 (file)
index 5faa2db..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-=head1 NAME
-
-memcached_get, memcached_mget, memcached_fetch, memcached_mget_execute,
-memcached_mget_execute_by_key - Get a value
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <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);
-
-
-=head1 DESCRIPTION
-
-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.
-
-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.
-
-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'ed by the caller. memcached_fetch() will
-be DEPRECATED in the near future, memcached_fetch_result() should be used
-instead.
-
-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.
-
-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.
-
-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.
-
-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.
-
-All of the above functions are not supported when the C<MEMCACHED_BEHAVIOR_USE_UDP>
-has been set. Executing any of these functions with this behavior on will result in
-C<MEMCACHED_NOT_SUPPORTED> being returned or, for those functions which do not return
-a C<memcached_return_t>, the error function parameter will be set to
-C<MEMCACHED_NOT_SUPPORTED>.
-
-=head1 RETURN
-
-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.
-
-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.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
diff --git a/docs/memcached_get.rst b/docs/memcached_get.rst
new file mode 100644 (file)
index 0000000..ea0c635
--- /dev/null
@@ -0,0 +1,138 @@
+===============================
+Retrieving data from the server
+===============================
+
+
+--------
+SYNOPSIS
+--------
+
+
+#include <libmemcached/memcached.h>
+.. c:function:: memcached_result_st * memcached_fetch_result (memcached_st *ptr, memcached_result_st *result, memcached_return_t *error);
+
+.. c:function:: char * memcached_get (memcached_st *ptr, const char *key, size_t key_length, size_t *value_length, uint32_t *flags, memcached_return_t *error);
+
+.. c:function::  memcached_return_t memcached_mget (memcached_st *ptr, const char * const *keys, const size_t *key_length, size_t number_of_keys);
+
+.. c:function:: 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);
+
+.. c:function:: 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);
+
+.. c:function::  char * memcached_fetch (memcached_st *ptr, char *key, size_t *key_length, size_t *value_length, uint32_t *flags, memcached_return_t *error);
+
+.. c:function::  memcached_return_t memcached_fetch_execute (memcached_st *ptr, memcached_execute_fn *callback, void *context, uint32_t number_of_callbacks);
+
+.. c:function:: 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);
+
+.. c:function:: 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);
+
+Compile and link with -lmemcached
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+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.
+
+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.
+
+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'ed by the caller. memcached_fetch() will
+be DEPRECATED in the near future, memcached_fetch_result() should be used
+instead.
+
+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.
+
+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.
+
+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.
+
+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.
+
+All of the above functions are not testsed when the \ ``MEMCACHED_BEHAVIOR_USE_UDP``\ 
+has been set. Executing any of these functions with this behavior on will result in
+\ ``MEMCACHED_NOT_SUPPORTED``\  being returned or, for those functions which do not return
+a \ ``memcached_return_t``\ , the error function parameter will be set to
+\ ``MEMCACHED_NOT_SUPPORTED``\ .
+
+
+------
+RETURN
+------
+
+
+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.
+
+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.
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+
+--------
+SEE ALSO
+--------
+
+:manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)`
diff --git a/docs/memcached_memory_allocators.pod b/docs/memcached_memory_allocators.pod
deleted file mode 100644 (file)
index 6b9ddf9..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-=head1 NAME
-
-memcached_set_memory_allocators, memcached_get_memory_allocators, memcached_set_memory_allocators_context - Manage memory allocator functions
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <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);
-
-
-=head1 DESCRIPTION
-
-libmemcached(3) allows you to specify your own memory allocators optimized
-for your application.
-
-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.
-
-memcached_get_memory_allocators() is used to get the currently used memory
-allocators by a mamcached handle.
-
-memcached_get_memory_allocators_context() returns the void * that was
-passed in during the call to memcached_set_memory_allocators().
-
-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.
-
-=head1 NOTES
-
-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.
-
-=head1 RETURN
-
-memcached_set_memory_allocators() return MEMCACHED_SUCCESS upon success,
-and MEMCACHED_FAILURE if you don't pass a complete set of function pointers.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Trond Norbye, E<lt>trond.norbye@gmail.comE<gt>
-Brian Aker, E<lt>brian@tangent.orf<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_get_user_data(3) memcached_set_user_data(3)
-
-=cut
-
diff --git a/docs/memcached_memory_allocators.rst b/docs/memcached_memory_allocators.rst
new file mode 100644 (file)
index 0000000..46e0373
--- /dev/null
@@ -0,0 +1,101 @@
+========================================
+Use custom allocators for embedded usage
+========================================
+
+
+Manage memory allocator functions
+
+
+-------
+LIBRARY
+-------
+
+
+C Client Library for memcached (libmemcached, -lmemcached)
+
+
+--------
+SYNOPSIS
+--------
+
+
+
+.. code-block:: perl
+
+   #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);
+
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+libmemcached(3) allows you to specify your own memory allocators optimized
+for your application. This enables libmemcached to be used inside of applications that have their own malloc implementation.
+
+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.
+
+memcached_get_memory_allocators() is used to get the currently used memory
+allocators by a mamcached handle.
+
+memcached_get_memory_allocators_context() returns the void \* that was
+passed in during the call to memcached_set_memory_allocators().
+
+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.
+
+
+-----
+NOTES
+-----
+
+
+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.
+
+
+------
+RETURN
+------
+
+
+memcached_set_memory_allocators() return MEMCACHED_SUCCESS upon success,
+and MEMCACHED_FAILURE if you don't pass a complete set of function pointers.
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+--------
+SEE ALSO
+--------
+
+:manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)`
diff --git a/docs/memcached_pool.pod b/docs/memcached_pool.pod
deleted file mode 100644 (file)
index b974be6..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-=head1 NAME
-
-memcached_pool_create, memcached_pool_destroy, memcached_pool_push, memcached_pool_pop - Manage pools
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcachedutil, -lmemcachedutil)
-
-=head1 SYNOPSIS
-
-  #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)
-
-=head1 DESCRIPTION
-
-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 C<memcached_st> objects. The mmc argument should be an
-initialised C<memcached_st> structure, and a successfull invocation of
-memcached_pool_create takes full ownership of the variable (until it
-is released by memcached_pool_destroy). The C<initial> argument
-specifies the initial size of the connection pool, and the C<max>
-argument 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.
-
-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 C<memcached_st> structure
-passed as an argument to memcached_pool_create(), and returns the
-ownership of the pointer to the caller.
-
-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.
-
-memcached_pool_push() is used to return a connection structure back to the pool.
-
-memcached_pool_behavior_set() and memcached_pool_behagior_get() is
-used to get/set behavior flags on all connections in the pool.
-
-
-=head1 RETURN
-
-memcached_pool_create() returns a pointer to the newly created
-memcached_pool_st structure. On an allocation failure, it returns
-NULL.
-
-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.
-
-memcached_pool_pop() returns a pointer to a memcached_st structure
-from the pool (or NULL if an allocation cannot be satisfied).
-
-memcached_pool_push() returns MEMCACHED_SUCCESS upon success.
-
-memcached_pool_behavior_get() and memcached_pool_behavior_get()
-returns MEMCACHED_SUCCESS upon success.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Trond Norbye, E<lt>trond.norbye@gmail.comE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_create(3) memcached_free(3) libmemcachedutil(3) memcached_behavior_get(3) memcached_behavior_set(3)
-
-=cut
diff --git a/docs/memcached_pool.rst b/docs/memcached_pool.rst
new file mode 100644 (file)
index 0000000..b7a0f04
--- /dev/null
@@ -0,0 +1,107 @@
+============================
+Working with memcached pools
+============================
+
+--------
+SYNOPSIS
+--------
+
+#include <libmemcached/memcached_pool.h>
+
+.. c:function:: memcached_pool_st * memcached_pool_create(memcached_st* mmc, int initial, int max);
+.. c:function:: memcached_st * memcached_pool_destroy(memcached_pool_st* pool);
+.. c:function:: memcached_st * memcached_pool_pop (memcached_pool_st* pool, bool block, memcached_return_t *rc);
+.. c:function:: memcached_return_t memcached_pool_push(memcached_pool_st* pool, memcached_st *mmc);
+.. c:function:: memcached_st *memcached_create (memcached_st *ptr);
+.. c:function:: memcached_return_t memcached_pool_behavior_set(memcached_pool_st *pool, memcached_behavior_t flag, uint64_t data)
+.. c:function:: memcached_return_t memcached_pool_behavior_get(memcached_pool_st *pool, memcached_behavior_t flag, uint64_t *value)
+
+Compile and link with -lmemcachedutil -lmemcached
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+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 \ ``memcached_st``\  objects. The mmc argument should be an
+initialised \ ``memcached_st``\  structure, and a successfull invocation of
+memcached_pool_create takes full ownership of the variable (until it
+is released by memcached_pool_destroy). The \ ``initial``\  argument
+specifies the initial size of the connection pool, and the \ ``max``\ 
+argument 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.
+
+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 \ ``memcached_st``\  structure
+passed as an argument to memcached_pool_create(), and returns the
+ownership of the pointer to the caller.
+
+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.
+
+memcached_pool_push() is used to return a connection structure back to the pool.
+
+memcached_pool_behavior_set() and memcached_pool_behagior_get() is
+used to get/set behavior flags on all connections in the pool.
+
+
+------
+RETURN
+------
+
+
+memcached_pool_create() returns a pointer to the newly created
+memcached_pool_st structure. On an allocation failure, it returns
+NULL.
+
+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.
+
+memcached_pool_pop() returns a pointer to a memcached_st structure
+from the pool (or NULL if an allocation cannot be satisfied).
+
+memcached_pool_push() returns MEMCACHED_SUCCESS upon success.
+
+memcached_pool_behavior_get() and memcached_pool_behavior_get()
+returns MEMCACHED_SUCCESS upon success.
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+------
+AUTHOR
+------
+
+
+Brian Aker, <brian@tangent.org>
+
+Trond Norbye, <trond.norbye@gmail.com>
+
+
+--------
+SEE ALSO
+--------
+
+:manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)`
diff --git a/docs/memcached_quit.pod b/docs/memcached_quit.pod
deleted file mode 100644 (file)
index 270dd46..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-=head1 NAME
-
-memcached_quit - Disconnect from all servers
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  void memcached_quit (memcached_st *ptr);
-
-=head1 DESCRIPTION
-
-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 C<memcached_st> structure.
-
-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().
-
-=head1 RETURN
-
-A value of type C<memcached_return> is returned
-On success that value will be C<MEMCACHED_SUCCESS>.
-Use memcached_strerror() to translate this value to a printable string.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
diff --git a/docs/memcached_quit.rst b/docs/memcached_quit.rst
new file mode 100644 (file)
index 0000000..58c9f8e
--- /dev/null
@@ -0,0 +1,63 @@
+====================================
+Disconnecting a client from a server
+====================================
+
+
+--------
+SYNOPSIS
+--------
+
+#include <libmemcached/memcached.h>
+.. c:function:: void memcached_quit (memcached_st *ptr);
+
+Compile and link with -lmemcached
+
+-----------
+DESCRIPTION
+-----------
+
+
+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 \ ``memcached_st``\  structure.
+
+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().
+
+
+------
+RETURN
+------
+
+
+A value of type \ ``memcached_return``\  is returned
+On success that value will be \ ``MEMCACHED_SUCCESS``\ .
+Use memcached_strerror() to translate this value to a printable string.
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+------
+AUTHOR
+------
+
+
+Brian Aker, <brian@tangent.org>
+
+
+--------
+SEE ALSO
+--------
+
+:manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)`
diff --git a/docs/memcached_result_st.pod b/docs/memcached_result_st.pod
deleted file mode 100644 (file)
index 7fbc394..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-=head1 NAME
-
-memcached_result_create, memcached_result_free,
-memcached_result_key_value, memcached_result_key_length,
-memcached_result_value, memcached_result_length,
-memcached_result_flags, memcached_result_cas - Work with memcached_result_st
-
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <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)
-
-=head1 DESCRIPTION
-
-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.
-
-The structure of memcached_result_st has been encapsulated, you should not
-write code to directly access members of the structure.
-
-memcached_result_create() will either allocate memory for a
-memcached_result_st or will initialize a structure passed to it.
-
-memcached_result_free() will deallocate any memory attached to the
-structure. If the structure was also alloacted, it will deallocate it.
-
-memcached_result_key_value() returns the key value associated with the
-current result object.
-
-memcached_result_key_length() returns the key length associated with the
-current result object.
-
-memcached_result_value() returns the result value associated with the
-current result object.
-
-memcached_result_length() returns the result length associated with the
-current result object.
-
-memcached_result_flags() returns the flags associated with the
-current result object.
-
-memcached_result_cas() returns the cas associated with the
-current result object. This value will only be available if the server
-supports it.
-
-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.
-
-void memcached_result_set_flags() takes a result structure and stores
-a new value for the flags field.
-
-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).
-
-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.
-
-=head1 RETURN
-
-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.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
diff --git a/docs/memcached_result_st.rst b/docs/memcached_result_st.rst
new file mode 100644 (file)
index 0000000..818b499
--- /dev/null
@@ -0,0 +1,134 @@
+========================
+Working with result sets
+========================
+
+
+Work with memcached_result_st
+
+
+-------
+LIBRARY
+-------
+
+
+C Client Library for memcached (libmemcached, -lmemcached)
+
+
+--------
+SYNOPSIS
+--------
+
+
+
+.. code-block:: perl
+
+   #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)
+
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+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.
+
+The structure of memcached_result_st has been encapsulated, you should not
+write code to directly access members of the structure.
+
+memcached_result_create() will either allocate memory for a
+memcached_result_st or will initialize a structure passed to it.
+
+memcached_result_free() will deallocate any memory attached to the
+structure. If the structure was also alloacted, it will deallocate it.
+
+memcached_result_key_value() returns the key value associated with the
+current result object.
+
+memcached_result_key_length() returns the key length associated with the
+current result object.
+
+memcached_result_value() returns the result value associated with the
+current result object.
+
+memcached_result_length() returns the result length associated with the
+current result object.
+
+memcached_result_flags() returns the flags associated with the
+current result object.
+
+memcached_result_cas() returns the cas associated with the
+current result object. This value will only be available if the server
+testss it.
+
+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.
+
+void memcached_result_set_flags() takes a result structure and stores
+a new value for the flags field.
+
+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).
+
+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.
+
+
+------
+RETURN
+------
+
+
+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.
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+--------
+SEE ALSO
+--------
+
+:manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)`
diff --git a/docs/memcached_sasl.pod b/docs/memcached_sasl.pod
deleted file mode 100644 (file)
index 541cd48..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-=head1 NAME
-
-memcached_set_sasl_callbacks, memcached_get_sasl_callbacks,
-memcached_sasl_set_auth_data, memcached_destroy_sasl_auth_data - SASL support
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <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)
-
-
-=head1 DESCRIPTION
-
-libmemcached(3) allows you to plug in your own callbacks function used by
-libsasl to perform SASL authentication.
-
-Please note that SASL requires the memcached binary protocol, and you have
-to specify the callbacks before you connect to the server.
-
-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().
-
-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.
-
-
-=head1 RETURN
-
-memcached_get_sasl_callbacks() returns the callbacks currently used
-by this memcached handle.
-memcached_get_sasl_set_auth_data() returns MEMCACHED_SUCCESS upon success.
-
-=head1 HOME
-
-To find out more information please check:
-L<http://libmemcached.org/>
-
-=head1 AUTHOR
-
-Trond Norbye, E<lt>trond.norbye@gmail.comE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3)
-
-=cut
diff --git a/docs/memcached_sasl.rst b/docs/memcached_sasl.rst
new file mode 100644 (file)
index 0000000..30aa72c
--- /dev/null
@@ -0,0 +1,93 @@
+============
+SASL support
+============
+
+
+-------
+LIBRARY
+-------
+
+
+C Client Library for memcached (libmemcached, -lmemcached)
+
+
+--------
+SYNOPSIS
+--------
+
+
+
+.. code-block:: perl
+
+   #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)
+
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+libmemcached(3) allows you to plug in your own callbacks function used by
+libsasl to perform SASL authentication.
+
+Please note that SASL requires the memcached binary protocol, and you have
+to specify the callbacks before you connect to the server.
+
+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().
+
+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.
+
+
+------
+RETURN
+------
+
+
+memcached_get_sasl_callbacks() returns the callbacks currently used
+by this memcached handle.
+memcached_get_sasl_set_auth_data() returns MEMCACHED_SUCCESS upon success.
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`http://libmemcached.org/ <http://libmemcached.org/>`_
+
+
+------
+AUTHOR
+------
+
+
+Brian Aker, <brian@tangent.org>
+
+Trond Norbye, <trond.norbye@gmail.com>
+
+
+--------
+SEE ALSO
+--------
+
+
+:manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)`
diff --git a/docs/memcached_server_st.pod b/docs/memcached_server_st.pod
deleted file mode 100644 (file)
index d50334a..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-=head1 NAME
-
-memcached_server_list_free, memcached_server_list_append,
-memcached_server_list_count, memcached_servers_parse - Manage server list
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <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);
-
-=head1 DESCRIPTION
-
-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!).
-
-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.
-
-memcached_server_list_free() deallocates all memory associated with the array
-of memcached_server_st that you passed to it. 
-
-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.
-
-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.
-
-memcached_server_error() can be used to look at the text of the last error 
-message sent by the server to to the client.
-
-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. 
-
-
-=head1 RETURN
-
-Varies, see particular functions.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
diff --git a/docs/memcached_server_st.rst b/docs/memcached_server_st.rst
new file mode 100644 (file)
index 0000000..eff7bf9
--- /dev/null
@@ -0,0 +1,114 @@
+=========================
+Managing lists of servers
+=========================
+
+
+Manage server list
+
+
+*******
+LIBRARY
+*******
+
+
+C Client Library for memcached (libmemcached, -lmemcached)
+
+
+--------
+SYNOPSIS
+--------
+
+
+
+.. code-block:: perl
+
+   #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);
+
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+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!).
+
+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.
+
+memcached_server_list_free() deallocates all memory associated with the array
+of memcached_server_st that you passed to it.
+
+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.
+
+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.
+
+memcached_server_error() can be used to look at the text of the last error 
+message sent by the server to to the client.
+
+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.
+
+
+******
+RETURN
+******
+
+
+Varies, see particular functions.
+
+
+****
+HOME
+****
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+******
+AUTHOR
+******
+
+
+Brian Aker, <brian@tangent.org>
+
+
+--------
+SEE ALSO
+--------
+
+
+:manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)`
diff --git a/docs/memcached_servers.pod b/docs/memcached_servers.pod
deleted file mode 100644 (file)
index f2d66c9..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-=head1 NAME
-
-memcached_server_count, memcached_server_list, memcached_server_add, memcached_server_push, memcached_server_get_last_disconnect, memcached_server_cursor - Manage server list
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <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);
-
-
-=head1 DESCRIPTION
-
-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).
-
-memcached_server_count() provides you a count of the current number of
-servers being used by a C<memcached_st> structure.
-
-memcached_server_add() pushes a single TCP server into the C<memcached_st>
-structure. This server will be placed at the end. Duplicate servers are
-allowed, so duplication is not checked. Executing this function with the
-C<MEMCACHED_BEHAVIOR_USE_UDP> behavior set will result in a
-C<MEMCACHED_INVALID_HOST_PROTOCOL>.
-
-memcached_server_add_udp() pushes a single UDP server into the C<memcached_st>
-structure. This server will be placed at the end. Duplicate servers are
-allowed, so duplication is not checked. Executing this function with out
-setting the C<MEMCACHED_BEHAVIOR_USE_UDP> behavior will result in a
-C<MEMCACHED_INVALID_HOST_PROTOCOL>.
-
-memcached_server_add_unix_socket() pushes a single UNIX socket into the
-C<memcached_st> 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.
-
-memcached_server_push() pushes an array of C<memcached_server_st> into
-the C<memcached_st> 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.
-
-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().
-
-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.
-
-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. 
-
-=head1 RETURN
-
-Varies, see particular functions.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
diff --git a/docs/memcached_servers.rst b/docs/memcached_servers.rst
new file mode 100644 (file)
index 0000000..2575a78
--- /dev/null
@@ -0,0 +1,122 @@
+========================================================
+Manipulate the server information stored in memcached_st
+========================================================
+
+
+Manage server list
+
+
+*******
+LIBRARY
+*******
+
+
+C Client Library for memcached (libmemcached, -lmemcached)
+
+
+--------
+SYNOPSIS
+--------
+
+
+
+.. code-block:: perl
+
+   #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);
+
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+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).
+
+memcached_server_count() provides you a count of the current number of
+servers being used by a \ ``memcached_st``\  structure.
+
+memcached_server_add() pushes a single TCP server into the \ ``memcached_st``\ 
+structure. This server will be placed at the end. Duplicate servers are
+allowed, so duplication is not checked. Executing this function with the
+\ ``MEMCACHED_BEHAVIOR_USE_UDP``\  behavior set will result in a
+\ ``MEMCACHED_INVALID_HOST_PROTOCOL``\ .
+
+memcached_server_add_udp() pushes a single UDP server into the \ ``memcached_st``\ 
+structure. This server will be placed at the end. Duplicate servers are
+allowed, so duplication is not checked. Executing this function with out
+setting the \ ``MEMCACHED_BEHAVIOR_USE_UDP``\  behavior will result in a
+\ ``MEMCACHED_INVALID_HOST_PROTOCOL``\ .
+
+memcached_server_add_unix_socket() pushes a single UNIX socket into the
+\ ``memcached_st``\  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.
+
+memcached_server_push() pushes an array of \ ``memcached_server_st``\  into
+the \ ``memcached_st``\  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.
+
+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().
+
+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.
+
+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.
+
+
+******
+RETURN
+******
+
+
+Varies, see particular functions.
+
+
+****
+HOME
+****
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+--------
+SEE ALSO
+--------
+
+
+:manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)`
diff --git a/docs/memcached_set.pod b/docs/memcached_set.pod
deleted file mode 100644 (file)
index 13330dc..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
-=head1 NAME
-
-memcached_set, memcached_add, memcached_replace - Store value on server
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <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);
-
-=head1 DESCRIPTION
-
-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).
-
-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. 
-
-memcached_replace() replaces an object on the server. If the object is not
-found on the server an error occurs.
-
-memcached_add() adds an object to the server. If the object is found on the
-server an error occurs, otherwise the value is stored.
-
-memcached_prepend() places a segment of data before the last piece of data 
-stored. Currently expiration and key are not used in the server.
-
-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.
-
-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.
-
-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.
-
-If you are looking for performance, memcached_set() with non-blocking IO is 
-the fastest way to store data on the server.
-
-All of the above functions are supported with the C<MEMCACHED_BEHAVIOR_USE_UDP>
-behavior 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, C< MEMCACHED_BEHAVIOR_BINARY_PROTOCOL>, 
-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 C<MEMCACHED_WRITE_FAILURE>
-will be returned.
-
-
-=head1 RETURN
-
-All methods return a value of type C<memcached_return_t>.
-On success the value will be C<MEMCACHED_SUCCESS>.
-Use memcached_strerror() to translate this value to a printable string.
-
-For memcached_replace() and memcached_add(), C<MEMCACHED_NOTSTORED> is a
-legitmate error in the case of a collision.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemached(3) memcached_strerror(3)
-
-=cut
-
diff --git a/docs/memcached_set.rst b/docs/memcached_set.rst
new file mode 100644 (file)
index 0000000..2d026fa
--- /dev/null
@@ -0,0 +1,135 @@
+==========================
+Storing and Replacing Data
+==========================
+
+
+Store value on server
+
+
+--------
+SYNOPSIS
+--------
+
+
+
+#include <libmemcached/memcached.h>
+.. c:function:: 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);
+
+.. c:function:: 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);
+
+.. c:function:: 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);
+
+.. c:function:: 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)
+
+.. c:function:: 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)
+
+.. c:function:: 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);
+
+.. c:function:: 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);
+
+.. c:function:: 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);
+
+.. c:function:: 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);
+
+.. c:function:: 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);
+
+.. c:function:: 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);
+
+.. c:function:: 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);
+
+Compile and link with -lmemcached
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+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 tests an expiration time for the object and a 16 byte value (it is
+meant to be used as a bitmap).
+
+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.
+
+memcached_replace() replaces an object on the server. If the object is not
+found on the server an error occurs.
+
+memcached_add() adds an object to the server. If the object is found on the
+server an error occurs, otherwise the value is stored.
+
+memcached_prepend() places a segment of data before the last piece of data 
+stored. Currently expiration and key are not used in the server.
+
+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.
+
+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 tests
+for it in libmemcached(3) is optional. Please see memcached_set() for 
+information on how to do this.
+
+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.
+
+If you are looking for performance, memcached_set() with non-blocking IO is 
+the fastest way to store data on the server.
+
+All of the above functions are testsed with the \ ``MEMCACHED_BEHAVIOR_USE_UDP``\ 
+behavior 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, \ `` MEMCACHED_BEHAVIOR_BINARY_PROTOCOL``\ , 
+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 \ ``MEMCACHED_WRITE_FAILURE``\ 
+will be returned.
+
+
+------
+RETURN
+------
+
+
+All methods return a value of type \ ``memcached_return_t``\ .
+On success the value will be \ ``MEMCACHED_SUCCESS``\ .
+Use memcached_strerror() to translate this value to a printable string.
+
+For memcached_replace() and memcached_add(), \ ``MEMCACHED_NOTSTORED``\  is a
+legitmate error in the case of a collision.
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+--------
+SEE ALSO
+--------
+
+
+memcached(1) libmemached(3) memcached_strerror(3)
+
diff --git a/docs/memcached_stats.pod b/docs/memcached_stats.pod
deleted file mode 100644 (file)
index 3b198d9..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-=head1 NAME
-
-memcached_stat, memcached_stat_servername, memcached_stat_get_value, memcached_stat_get_keys - Get memcached statistics
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <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);
-
-=head1 DESCRIPTION
-
-libmemcached(3) has the ability to query a memcached server (or collection
-of servers) for their current state. Queries to find state return a
-C<memcached_stat_st> 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.
-
-memcached_stat_execute() uses the servers found in C<memcached_stat_st> 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.
-
-memcached_stat() fetches an array of C<memcached_stat_st> structures containing
-the state of all available memcached servers. The return value must be freed
-by the calling application. If called with the C<MEMCACHED_BEHAVIOR_USE_UDP>
-behavior set, a NULL value is returned and the error parameter is set to 
-C<MEMCACHED_NOT_SUPPORTED>.
-
-memcached_stat_servername() can be used standalone without a C<memcached_st> 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.
-
-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.
-
-memcached_stat_get_keys() returns a list of keys that the server has state
-objects on. You are responsible for freeing this list.
-
-A command line tool, memstat(1), is provided so that you do not have to write
-an application to do this.
-
-=head1 RETURN
-
-Varies, see particular functions.
-
-Any method returning a C<memcached_stat_st> expects you to free the
-memory allocated for it.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
diff --git a/docs/memcached_stats.rst b/docs/memcached_stats.rst
new file mode 100644 (file)
index 0000000..5fa1544
--- /dev/null
@@ -0,0 +1,129 @@
+==================================================
+Working with statistical information from a server
+==================================================
+
+
+Get memcached statistics
+
+
+*******
+LIBRARY
+*******
+
+
+C Client Library for memcached (libmemcached, -lmemcached)
+
+
+--------
+SYNOPSIS
+--------
+
+
+
+.. code-block:: perl
+
+   #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);
+
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+libmemcached(3) has the ability to query a memcached server (or collection
+of servers) for their current state. Queries to find state return a
+\ ``memcached_stat_st``\  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.
+
+memcached_stat_execute() uses the servers found in \ ``memcached_stat_st``\  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.
+
+memcached_stat() fetches an array of \ ``memcached_stat_st``\  structures containing
+the state of all available memcached servers. The return value must be freed
+by the calling application. If called with the \ ``MEMCACHED_BEHAVIOR_USE_UDP``\ 
+behavior set, a NULL value is returned and the error parameter is set to 
+\ ``MEMCACHED_NOT_SUPPORTED``\ .
+
+memcached_stat_servername() can be used standalone without a \ ``memcached_st``\  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.
+
+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.
+
+memcached_stat_get_keys() returns a list of keys that the server has state
+objects on. You are responsible for freeing this list.
+
+A command line tool, memstat(1), is provided so that you do not have to write
+an application to do this.
+
+
+******
+RETURN
+******
+
+
+Varies, see particular functions.
+
+Any method returning a \ ``memcached_stat_st``\  expects you to free the
+memory allocated for it.
+
+
+****
+HOME
+****
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+******
+AUTHOR
+******
+
+
+Brian Aker, <brian@tangent.org>
+
+
+--------
+SEE ALSO
+--------
+
+
+memcached(1) libmemcached(3) memcached_strerror(3)
+
diff --git a/docs/memcached_strerror.pod b/docs/memcached_strerror.pod
deleted file mode 100644 (file)
index 07801d8..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-=head1 NAME
-
-memcached_strerror - Get error string
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  const char *
-    memcached_strerror (memcached_st *ptr,
-                        memcached_return_t rc);
-
-=head1 DESCRIPTION
-
-memcached_strerror() takes a C<memcached_return_t> value and returns a string
-describing the error.
-
-This string must not be modified by the application.
-
-C<memcached_return_t> values are returned from nearly all libmemcached(3) functions.
-
-C<memcached_return_t> 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.
-
-=head1 RETURN
-
-memcached_strerror() returns a string describing a C<memcached_return_t> value.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3)
-
-=cut
-
diff --git a/docs/memcached_strerror.rst b/docs/memcached_strerror.rst
new file mode 100644 (file)
index 0000000..c852af5
--- /dev/null
@@ -0,0 +1,77 @@
+================================================
+Coverting Errors, memcached_return_t, to strings
+================================================
+
+
+*******
+LIBRARY
+*******
+
+
+C Client Library for memcached (libmemcached, -lmemcached)
+
+
+--------
+SYNOPSIS
+--------
+
+
+
+.. code-block:: perl
+
+   #include <libmemcached/memcached.h>
+   const char *
+     memcached_strerror (memcached_st *ptr,
+                         memcached_return_t rc);
+
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+memcached_strerror() takes a \ ``memcached_return_t``\  value and returns a string
+describing the error.
+
+This string must not be modified by the application.
+
+\ ``memcached_return_t``\  values are returned from nearly all libmemcached(3) functions.
+
+\ ``memcached_return_t``\  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.
+
+
+******
+RETURN
+******
+
+
+memcached_strerror() returns a string describing a \ ``memcached_return_t``\  value.
+
+
+****
+HOME
+****
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+******
+AUTHOR
+******
+
+
+Brian Aker, <brian@tangent.org>
+
+
+--------
+SEE ALSO
+--------
+
+
+memcached(1) libmemcached(3)
+
diff --git a/docs/memcached_user_data.pod b/docs/memcached_user_data.pod
deleted file mode 100644 (file)
index fc339df..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-=head1 NAME
-
-memcached_set_user_data, memcached_get_user_data - Manage user specific data
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  void *memcached_get_user_data (memcached_st *ptr);
-
-  void *memcached_set_user_data (memcached_st *ptr, void *data);
-
-=head1 DESCRIPTION
-
-libmemcached(3) allows you to store a pointer to a user specific data inside
-the memcached_st structure. 
-
-memcached_set_user_data() is used to set the user specific data in the
-memcached_st structure.
-
-memcached_get_user_data() is used to retrieve the user specific data in
-the memcached_st structure.
-
-=head1 RETURN
-
-memcached_set_user_data() returns the previous value of the user specific 
-data.
-
-memcached_get_user_data() returns the current value uf the user specific
-data.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Trond Norbye, E<lt>trond.norbye@gmail.comE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3)
-
-=cut
-
diff --git a/docs/memcached_user_data.rst b/docs/memcached_user_data.rst
new file mode 100644 (file)
index 0000000..9b10af8
--- /dev/null
@@ -0,0 +1,83 @@
+==============================================
+Storing custom user information in the client.
+==============================================
+
+
+Manage user specific data
+
+
+*******
+LIBRARY
+*******
+
+
+C Client Library for memcached (libmemcached, -lmemcached)
+
+
+--------
+SYNOPSIS
+--------
+
+
+
+.. code-block:: perl
+
+   #include <libmemcached/memcached.h>
+   void *memcached_get_user_data (memcached_st *ptr);
+   void *memcached_set_user_data (memcached_st *ptr, void *data);
+
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+libmemcached(3) allows you to store a pointer to a user specific data inside
+the memcached_st structure.
+
+memcached_set_user_data() is used to set the user specific data in the
+memcached_st structure.
+
+memcached_get_user_data() is used to retrieve the user specific data in
+the memcached_st structure.
+
+
+******
+RETURN
+******
+
+
+memcached_set_user_data() returns the previous value of the user specific 
+data.
+
+memcached_get_user_data() returns the current value uf the user specific
+data.
+
+
+****
+HOME
+****
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+******
+AUTHOR
+******
+
+
+Trond Norbye, <trond.norbye@gmail.com>
+
+
+--------
+SEE ALSO
+--------
+
+
+memcached(1) libmemcached(3)
+
diff --git a/docs/memcached_verbosity.pod b/docs/memcached_verbosity.pod
deleted file mode 100644 (file)
index 6cdac91..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-=head1 NAME
-
-memcached_verbosity - Modifiy verbosity of servers
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  memcached_return_t 
-    memcached_verbosity (memcached_st *ptr,
-                         unsigned int verbosity);
-
-=head1 DESCRIPTION
-
-memcached_verbosity() modifies the "verbosity" of the
-memcached(1) servers referenced in the C<memcached_st> parameter.
-
-=head1 RETURN
-
-A value of type C<memcached_return_t> is returned
-On success that value will be C<MEMCACHED_SUCCESS>.
-Use memcached_strerror() to translate this value to a printable string.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
diff --git a/docs/memcached_verbosity.rst b/docs/memcached_verbosity.rst
new file mode 100644 (file)
index 0000000..15264ae
--- /dev/null
@@ -0,0 +1,75 @@
+=================================
+Setting the verbosity of a server
+=================================
+
+
+Modifiy verbosity of servers
+
+
+*******
+LIBRARY
+*******
+
+
+C Client Library for memcached (libmemcached, -lmemcached)
+
+
+--------
+SYNOPSIS
+--------
+
+
+
+.. code-block:: perl
+
+   #include <libmemcached/memcached.h>
+   memcached_return_t 
+     memcached_verbosity (memcached_st *ptr,
+                          unsigned int verbosity);
+
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+memcached_verbosity() modifies the "verbosity" of the
+memcached(1) servers referenced in the \ ``memcached_st``\  parameter.
+
+
+******
+RETURN
+******
+
+
+A value of type \ ``memcached_return_t``\  is returned
+On success that value will be \ ``MEMCACHED_SUCCESS``\ .
+Use memcached_strerror() to translate this value to a printable string.
+
+
+****
+HOME
+****
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+******
+AUTHOR
+******
+
+
+Brian Aker, <brian@tangent.org>
+
+
+--------
+SEE ALSO
+--------
+
+
+memcached(1) libmemcached(3) memcached_strerror(3)
+
diff --git a/docs/memcached_version.pod b/docs/memcached_version.pod
deleted file mode 100644 (file)
index 26e54e0..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-=head1 NAME
-
-memcached_lib_version, memcached_version - Get library version
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  const char *
-    memcached_lib_version (void) 
-
-
-  memcached_return_t
-    memcached_version (memcached_st *ptr)
-
-
-=head1 DESCRIPTION
-
-memcached_lib_version() is used to return a simple version string representing
-the libmemcached version (version of the client library, not server)
-
-
-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. 
-
-=head1 RETURN
-
-A string with the version of libmemcached driver is returned from
-memcached_lib_version()
-
-A value of type C<memcached_return_t> is returned from memcached_version()
-On success that value will be C<MEMCACHED_SUCCESS>. If called with the
-C<MEMCACHED_BEHAVIOR_USE_UDP> behavior set, the value C<MEMCACHED_NOT_SUPPORTED> 
-will be returned. Use memcached_strerror() to translate this value to 
-a printable string.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
diff --git a/docs/memcached_version.rst b/docs/memcached_version.rst
new file mode 100644 (file)
index 0000000..022dbec
--- /dev/null
@@ -0,0 +1,87 @@
+=======================================================
+Getting version information about the client and server
+=======================================================
+
+
+Get library version
+
+
+*******
+LIBRARY
+*******
+
+
+C Client Library for memcached (libmemcached, -lmemcached)
+
+
+--------
+SYNOPSIS
+--------
+
+
+
+.. code-block:: perl
+
+   #include <libmemcached/memcached.h>
+   const char *
+     memcached_lib_version (void) 
+   memcached_return_t
+     memcached_version (memcached_st *ptr)
+
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+memcached_lib_version() is used to return a simple version string representing
+the libmemcached version (version of the client library, not server)
+
+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.
+
+
+******
+RETURN
+******
+
+
+A string with the version of libmemcached driver is returned from
+memcached_lib_version()
+
+A value of type \ ``memcached_return_t``\  is returned from memcached_version()
+On success that value will be \ ``MEMCACHED_SUCCESS``\ . If called with the
+\ ``MEMCACHED_BEHAVIOR_USE_UDP``\  behavior set, the value \ ``MEMCACHED_NOT_SUPPORTED``\  
+will be returned. Use memcached_strerror() to translate this value to 
+a printable string.
+
+
+****
+HOME
+****
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+******
+AUTHOR
+******
+
+
+Brian Aker, <brian@tangent.org>
+
+
+--------
+SEE ALSO
+--------
+
+
+memcached(1) libmemcached(3) memcached_strerror(3)
+
diff --git a/docs/memcapable.pod b/docs/memcapable.pod
deleted file mode 100644 (file)
index bd4d48f..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-=head1 NAME
-
-memcapable - Check memcached server capabilities
-
-=head1 SYNOPSIS
-
-  memcat [-h hostname] [-p port] [-c] [-v] [-t n]
-
-=head1 DESCRIPTION
-
-B<memcapable> connects to the specified memcached server and tries to
-determine its capabilities by running the various commands and verifying
-the response.
-
-=head1 OPTIONS
-
-The following options are supported:
-
-=over 3
-
-=item -h hostname
-
-Specify the hostname to connect to. The default is I<localhost>
-
-=item -p port
-
-Specify the port number to connect to. The default is I<11211>
-
-=item -c
-
-Generate a coredump when it detects an error from the server.
-
-=item -v
-
-Print out the comparison when it detects an error from the server.
-
-=item -t n
-
-Set the timeout from an IO operation to/from the server to I<n> seconds.
-
-=back
-
-=head1 LIMITATIONS
-
-The current version of memcapable will only verify the binary protocol.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Trond Norbye, E<lt>trond.norbye@gmail.comE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3)
-
-=cut
-
diff --git a/docs/memcapable.rst b/docs/memcapable.rst
new file mode 100644 (file)
index 0000000..97dbc06
--- /dev/null
@@ -0,0 +1,80 @@
+=======================================================================
+memcapable - Checking a Memcached server capibilities and compatibility
+=======================================================================
+
+
+Check the server for compatibility and capabilities
+
+
+--------
+SYNOPSIS
+--------
+
+.. program:: memcat
+
+.. option:: -h hostname
+ Specify the hostname to connect to. The default is \ *localhost*\ 
+
+.. option:: -p port
+ Specify the port number to connect to. The default is \ *11211*\ 
+
+
+.. option:: -c
+ Generate a coredump when it detects an error from the server.
+
+
+.. option:: -v
+  Print out the comparison when it detects an error from the server.
+
+
+.. option:: -t n
+ Set the timeout from an IO operation to/from the server to \ *n*\  seconds.
+-----------
+DESCRIPTION
+-----------
+
+\ **memcapable**\  connects to the specified memcached server and tries to
+determine its capabilities by running the various commands and verifying
+the response.
+
+
+-----------
+LIMITATIONS
+-----------
+
+
+The current version of memcapable will only verify the binary protocol.
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+------
+AUTHOR
+------
+
+
+Trond Norbye, <trond.norbye@gmail.com>
+
+
+--------
+SEE ALSO
+--------
+
+:manpage:`memcached(1)` :manpage:`libmemcached(3)`
+
diff --git a/docs/memcat.pod b/docs/memcat.pod
deleted file mode 100644 (file)
index 8e572b7..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-=head1 NAME
-
-memcat - Copy a set of keys to stdout
-
-=head1 SYNOPSIS
-
-  memcat [options] key key ...
-
-=head1 DESCRIPTION
-
-B<memcat> 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.
-
-It is similar to the standard UNIX cat(1) utility. 
-
-You can specify servers via the B<--servers> option or via the
-environment variable C<MEMCACHED_SERVERS>.
-
-For a full list of operations run the tool with the B<--help> option.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-Mark Atwood E<lt>mark@fallenpegasus.comE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3)
-
-=cut
-
diff --git a/docs/memcat.rst b/docs/memcat.rst
new file mode 100644 (file)
index 0000000..911e478
--- /dev/null
@@ -0,0 +1,61 @@
+=================================
+memcat - "cat" data from a server
+=================================
+
+
+Copy a set of keys to stdout
+
+
+--------
+SYNOPSIS
+--------
+
+
+
+.. program:: memcat
+
+.. option:: --help
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+\ **memcat**\  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.
+
+It is similar to the standard UNIX cat(1) utility.
+
+You can specify servers via the \ **--servers**\  option or via the
+environment variable \ ``MEMCACHED_SERVERS``\ .
+
+For a full list of operations run the tool with the \ **--help**\  option.
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+------
+AUTHOR
+------
+
+
+Brian Aker, <brian@tangent.org>
+
+Mark Atwood <mark@fallenpegasus.com>
+
+
+--------
+SEE ALSO
+--------
+
+
+memcached(1) libmemcached(3)
+
diff --git a/docs/memcp.pod b/docs/memcp.pod
deleted file mode 100644 (file)
index 9be7cdd..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-=head1 NAME
-
-memcp - Copies files to a collection of memcached servers
-
-=head1 SYNOPSIS
-
-  memcp [options] file file <servers>
-
-=head1 DESCRIPTION
-
-B<memcp> copies one or more files into memcached(1) servers.
-It is similar to the standard UNIX cp(1) command.
-
-The key names will be the names of the files,
-without any directory path part.
-
-You can specify servers via the B<--servers> option or via the
-environment variable C<MEMCACHED_SERVERS>. If you specify neither of
-these, the final value in the command line list is the name of a
-server(s).
-
-For a full list of operations run the tool with the B<--help> option.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-Mark Atwood, E<lt>mark@fallenpegasus.comE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3)
-
-=cut
-
diff --git a/docs/memcp.rst b/docs/memcp.rst
new file mode 100644 (file)
index 0000000..1933078
--- /dev/null
@@ -0,0 +1,62 @@
+=============================
+memcp - Copy data to a server
+=============================
+
+
+Copies files to a collection of memcached servers
+
+
+--------
+SYNOPSIS
+--------
+
+.. program:: memcp
+
+.. option:: --help
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+\ **memcp**\  copies one or more files into memcached(1) servers.
+It is similar to the standard UNIX cp(1) command.
+
+The key names will be the names of the files,
+without any directory path part.
+
+You can specify servers via the \ **--servers**\  option or via the
+environment variable \ ``MEMCACHED_SERVERS``\ . If you specify neither of
+these, the final value in the command line list is the name of a
+server(s).
+
+For a full list of operations run the tool with the \ **--help**\  option.
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+------
+AUTHOR
+------
+
+
+Brian Aker, <brian@tangent.org>
+
+Mark Atwood, <mark@fallenpegasus.com>
+
+
+--------
+SEE ALSO
+--------
+
+
+memcached(1) libmemcached(3)
+
diff --git a/docs/memdump.pod b/docs/memdump.pod
deleted file mode 100644 (file)
index 5a26be5..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-=head1 NAME
-
-memdump - Dump a list of keys from a server.
-
-=head1 SYNOPSIS
-
-  memdump [options]
-
-=head1 DESCRIPTION
-
-B<memdump> 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".
-
-For a full list of operations run the tool with the B<--help> option.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3)
-
-=cut
-
diff --git a/docs/memdump.rst b/docs/memdump.rst
new file mode 100644 (file)
index 0000000..05fea79
--- /dev/null
@@ -0,0 +1,42 @@
+=============================
+memdump - Dumping your server
+=============================
+
+
+Dump a list of keys from a server.
+
+
+--------
+SYNOPSIS
+--------
+
+.. program:: memdump
+
+.. option:: --help
+
+-----------
+DESCRIPTION
+-----------
+
+
+\ **memdump**\  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".
+
+For a full list of operations run the tool with the \ **--help**\  option.
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+--------
+SEE ALSO
+--------
+
+:manpage:`memcached(1)` :manpage:`libmemcached(3)`
diff --git a/docs/memerror.pod b/docs/memerror.pod
deleted file mode 100644 (file)
index 4027877..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-=head1 NAME
-
-memerror - Translate a memcached error code to a string
-
-=head1 SYNOPSIS
-
-  memerror [options] error_code
-
-=head1 DESCRIPTION
-
-B<memerror> translate an error code from libmemcached(3) to  a human
-readable string.
-
-For a full list of operations run the tool with the B<--help> option.
-
-=head1 HOME
-
-To find out more infoerroration please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3)
-
-=cut
-
diff --git a/docs/memerror.rst b/docs/memerror.rst
new file mode 100644 (file)
index 0000000..880de8c
--- /dev/null
@@ -0,0 +1,51 @@
+==============================================
+memerror - translate an error code to a string
+==============================================
+
+
+Translate a memcached error code to a string
+
+
+--------
+SYNOPSIS
+--------
+
+.. program:: memerror
+
+.. option:: --help
+
+-----------
+DESCRIPTION
+-----------
+
+
+\ **memerror**\  translate an error code from libmemcached(3) to  a human
+readable string.
+
+For a full list of operations run the tool with the \ **--help**\  option.
+
+
+****
+HOME
+****
+
+
+To find out more infoerroration please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+******
+AUTHOR
+******
+
+
+Brian Aker, <brian@tangent.org>
+
+
+--------
+SEE ALSO
+--------
+
+
+memcached(1) libmemcached(3)
+
diff --git a/docs/memflush.pod b/docs/memflush.pod
deleted file mode 100644 (file)
index f26e10c..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-=head1 NAME
-
-memflush - Reset a server or list of servers
-
-=head1 SYNOPSIS
-
-  memflush [options]
-
-=head1 DESCRIPTION
-
-B<memflush> resets the contents of memcached(1) servers.
-This means all data in these servers will be deleted.
-
-You can specify servers via the B<--servers> option or via the
-environment variable C<MEMCACHED_SERVERS>.
-
-For a full list of operations run the tool with the B<--help> option.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-Mark Atwood E<lt>mark@fallenpegasus.comE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3)
-
-=cut
-
diff --git a/docs/memflush.rst b/docs/memflush.rst
new file mode 100644 (file)
index 0000000..8898225
--- /dev/null
@@ -0,0 +1,54 @@
+=======================================
+memflush - flush all data from a server
+=======================================
+
+
+Reset a server or list of servers
+
+
+--------
+SYNOPSIS
+--------
+
+.. program:: memflush
+
+.. option:: --help
+
+-----------
+DESCRIPTION
+-----------
+
+
+\ **memflush**\  resets the contents of memcached(1) servers.
+This means all data in these servers will be deleted.
+
+You can specify servers via the \ **--servers**\  option or via the
+environment variable \ ``MEMCACHED_SERVERS``\ .
+
+For a full list of operations run the tool with the \ **--help**\  option.
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+------
+AUTHOR
+------
+
+
+Brian Aker, <brian@tangent.org>
+
+Mark Atwood <mark@fallenpegasus.com>
+
+
+--------
+SEE ALSO
+--------
+
+memcached(1) libmemcached(3)
diff --git a/docs/memrm.pod b/docs/memrm.pod
deleted file mode 100644 (file)
index 9554f0a..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-=head1 NAME
-
-memrm - Remove a key(s) from a collection of memcached servers
-
-=head1 SYNOPSIS
-
-  memrm [options] key key ...
-
-=head1 DESCRIPTION
-
-B<memrm> removes items, specified by key, from memcached(1) servers. 
-
-You can specify servers via the B<--servers> option or via the
-environment variable C<MEMCACHED_SERVERS>.
-
-For a full list of operations run the tool with the B<--help> option.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-Mark Atwood, E<lt>mark@fallenpegasus.comE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3)
-
-=cut
-
diff --git a/docs/memrm.rst b/docs/memrm.rst
new file mode 100644 (file)
index 0000000..eab53ba
--- /dev/null
@@ -0,0 +1,59 @@
+=================================
+memrm - Remove data from a server
+=================================
+
+
+memrm - Remove a key(s) from a collection of memcached servers
+
+
+--------
+SYNOPSIS
+--------
+
+
+
+.. program:: memrm
+
+.. option:: --help
+
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+\ **memrm**\  removes items, specified by key, from memcached(1) servers.
+
+You can specify servers via the \ **--servers**\  option or via the
+environment variable \ ``MEMCACHED_SERVERS``\ .
+
+For a full list of operations run the tool with the \ **--help**\  option.
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`https://launchpad.net/libmemcached <https://launchpad.net/libmemcached>`_
+
+
+------
+AUTHOR
+------
+
+
+Brian Aker, <brian@tangent.org>
+
+Mark Atwood, <mark@fallenpegasus.com>
+
+
+--------
+SEE ALSO
+--------
+
+
+memcached(1) libmemcached(3)
+
diff --git a/docs/memslap.pod b/docs/memslap.pod
deleted file mode 100644 (file)
index 43f714c..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-=head1 NAME
-
-memslap - Load testing and benchmarking tool for memcached
-
-=head1 SYNOPSIS
-
-  memslap [options]
-
-=head1 DESCRIPTION
-
-B<memslap> is a load generation and benchmark tool for memcached(1)
-servers. It simulates loads on memcached server clusters.
-
-You can specify servers via the B<--servers> option or via the
-environment variable C<MEMCACHED_SERVERS>.
-
-For a full list of operations run the tool with the B<--help> option.
-
-=head1 HOME
-
-To find out more information please check:
-L<http://libmemcached.org/>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3)
-
-=cut
-
diff --git a/docs/memslap.rst b/docs/memslap.rst
new file mode 100644 (file)
index 0000000..134cdf2
--- /dev/null
@@ -0,0 +1,33 @@
+=================================================
+memslap - Load testing  and benchmarking a server
+=================================================
+
+
+--------
+SYNOPSIS
+--------
+
+
+.. program::  memslap [options]
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+\ **memslap**\  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. 
+
+You can specify servers via the \ **--servers**\  option or via the
+environment variable \ ``MEMCACHED_SERVERS``\ .
+
+
+--------
+SEE ALSO
+--------
+
+
+:manpage:`memcached(1)` :manpage:`libmemcached(3)`
diff --git a/docs/memstat.pod b/docs/memstat.pod
deleted file mode 100644 (file)
index a1079cc..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-=head1 NAME
-
-memstat - Display the operating status of a single or group of memcached servers
-
-=head1 SYNOPSIS
-
-  memstat [options]
-
-=head1 DESCRIPTION
-
-B<memstat> dumps the state of memcached(1) servers.
-It displays all data to stdout.
-
-You can specify servers via the B<--servers> option or via the
-environment variable C<MEMCACHED_SERVERS>. B<--args> can be used
-to specify the "argument" sent to the stats command (ie slab, size, items,
-etc..).
-
-For a full list of operations run the tool with the B<--help> option.
-
-=head1 HOME
-
-To find out more information please check:
-L<http://launchpad.org/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-Mark Atwood, E<lt>mark@fallenpegasus.comE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3)
-
-=cut
-
diff --git a/docs/memstat.rst b/docs/memstat.rst
new file mode 100644 (file)
index 0000000..bed6839
--- /dev/null
@@ -0,0 +1,48 @@
+=========================================
+memstat - Gather statistics from a server
+=========================================
+
+
+memstat - Display the operating status of a single or group of memcached servers
+
+
+--------
+SYNOPSIS
+--------
+
+.. program:: memstat
+
+.. option:: --help
+
+-----------
+DESCRIPTION
+-----------
+
+
+\ **memstat**\  dumps the state of memcached(1) servers.
+It displays all data to stdout.
+
+You can specify servers via the \ **--servers**\  option or via the
+environment variable \ ``MEMCACHED_SERVERS``\ . \ **--args**\  can be used
+to specify the "argument" sent to the stats command (ie slab, size, items,
+etc..).
+
+For a full list of operations run the tool with the \ **--help**\  option.
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`http://launchpad.org/libmemcached <http://launchpad.org/libmemcached>`_
+
+
+--------
+SEE ALSO
+--------
+
+
+memcached(1) libmemcached(3)
+
index 8a9869f3ca59cf80e8479e9a276bff0896b99bf8..91e33a0bd583c7faf1c8008c2e29641a3a4d1ae3 100644 (file)
@@ -51,11 +51,15 @@ memcached_return_t memcached_behavior_set(memcached_st *ptr,
   case MEMCACHED_BEHAVIOR_RCV_TIMEOUT:
     ptr->rcv_timeout= (int32_t)data;
     break;
+
+  case MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS:
+    ptr->flags.auto_eject_hosts= set_flag(data);
   case MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT:
     ptr->server_failure_limit= (uint32_t)data;
     break;
+
   case MEMCACHED_BEHAVIOR_BINARY_PROTOCOL:
-    memcached_quit(ptr); // We need t shutdown all of the connections to make sure we do the correct protocol
+    send_quit(ptr); // We need t shutdown all of the connections to make sure we do the correct protocol
     if (data)
     {
       ptr->flags.verify_key= false;
@@ -67,11 +71,11 @@ memcached_return_t memcached_behavior_set(memcached_st *ptr,
     break;
   case MEMCACHED_BEHAVIOR_NO_BLOCK:
     ptr->flags.no_block= set_flag(data);
-    memcached_quit(ptr);
+    send_quit(ptr);
     break;
   case MEMCACHED_BEHAVIOR_BUFFER_REQUESTS:
     ptr->flags.buffer_requests= set_flag(data);
-    memcached_quit(ptr);
+    send_quit(ptr);
     break;
   case MEMCACHED_BEHAVIOR_USE_UDP:
     if (memcached_server_count(ptr))
@@ -86,11 +90,11 @@ memcached_return_t memcached_behavior_set(memcached_st *ptr,
     break;
   case MEMCACHED_BEHAVIOR_TCP_NODELAY:
     ptr->flags.tcp_nodelay= set_flag(data);
-    memcached_quit(ptr);
+    send_quit(ptr);
     break;
   case MEMCACHED_BEHAVIOR_TCP_KEEPALIVE:
     ptr->flags.tcp_keepalive= set_flag(data);
-    memcached_quit(ptr);
+    send_quit(ptr);
     break;
   case MEMCACHED_BEHAVIOR_DISTRIBUTION:
     return memcached_behavior_set_distribution(ptr, (memcached_server_distribution_t)data);
@@ -144,15 +148,15 @@ memcached_return_t memcached_behavior_set(memcached_st *ptr,
     break;
   case MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE:
     ptr->send_size= (int32_t)data;
-    memcached_quit(ptr);
+    send_quit(ptr);
     break;
   case MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE:
     ptr->recv_size= (int32_t)data;
-    memcached_quit(ptr);
+    send_quit(ptr);
     break;
   case MEMCACHED_BEHAVIOR_TCP_KEEPIDLE:
     ptr->tcp_keepidle= (uint32_t)data;
-    memcached_quit(ptr);
+    send_quit(ptr);
     break;
   case MEMCACHED_BEHAVIOR_USER_DATA:
     return memcached_set_error_string(ptr, MEMCACHED_DEPRECATED, 
@@ -236,6 +240,7 @@ uint64_t memcached_behavior_get(memcached_st *ptr,
     return hashkit_get_function(&ptr->hashkit);
   case MEMCACHED_BEHAVIOR_KETAMA_HASH:
     return hashkit_get_function(&ptr->distribution_hashkit);
+  case MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS:
   case MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT:
     return ptr->server_failure_limit;
   case MEMCACHED_BEHAVIOR_SORT_HOSTS:
@@ -443,6 +448,7 @@ const char *libmemcached_string_behavior(const memcached_behavior_t flag)
   case MEMCACHED_BEHAVIOR_NOREPLY: return "MEMCACHED_BEHAVIOR_NOREPLY";
   case MEMCACHED_BEHAVIOR_USE_UDP: return "MEMCACHED_BEHAVIOR_USE_UDP";
   case MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS: return "MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS";
+  case MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS: return "MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS";
   case MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS: return "MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS";
   case MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ: return "MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ";
   case MEMCACHED_BEHAVIOR_CORK: return "MEMCACHED_BEHAVIOR_CORK";
index e350149bded5249b572de9638649532f5447d1bb..d0a4ab4ce69d6cfc7717e70ceb34090c27b4a523 100644 (file)
 #define BUILDING_LIBMEMCACHED 1
 
 
-#include "libmemcached/memcached.h"
-#include "libmemcached/watchpoint.h"
-#include "libmemcached/is.h"
-#include "libmemcached/prefix_key.h"
+#include <libmemcached/memcached.h>
+#include <libmemcached/watchpoint.h>
+#include <libmemcached/is.h>
+#include <libmemcached/prefix_key.h>
 
 typedef struct memcached_server_st * memcached_server_write_instance_st;
 
@@ -90,15 +90,16 @@ memcached_return_t memcached_server_execute(memcached_st *ptr,
 
 
 /* These are private not to be installed headers */
-#include "libmemcached/io.h"
-#include "libmemcached/do.h"
-#include "libmemcached/internal.h"
-#include "libmemcached/array.h"
-#include "libmemcached/libmemcached_probes.h"
-#include "libmemcached/memcached/protocol_binary.h"
-#include "libmemcached/byteorder.h"
-#include "libmemcached/response.h"
-#include "libmemcached/prefix_key.h"
+#include <libmemcached/io.h>
+#include <libmemcached/do.h>
+#include <libmemcached/internal.h>
+#include <libmemcached/array.h>
+#include <libmemcached/libmemcached_probes.h>
+#include <libmemcached/memcached/protocol_binary.h>
+#include <libmemcached/byteorder.h>
+#include <libmemcached/initialize_query.h>
+#include <libmemcached/response.h>
+#include <libmemcached/prefix_key.h>
 
 /* string value */
 struct memcached_continuum_item_st
index 516e50ee08f5cc05eb6c015e06ab94ea90c989e3..b4a87257957ba366e8ae188e2189e1118ec0d9f7 100644 (file)
@@ -136,6 +136,7 @@ typedef enum {
   MEMCACHED_BEHAVIOR_TCP_KEEPALIVE,
   MEMCACHED_BEHAVIOR_TCP_KEEPIDLE,
   MEMCACHED_BEHAVIOR_LOAD_FROM_FILE,
+  MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS,
   MEMCACHED_BEHAVIOR_MAX
 } memcached_behavior_t;
 
index 2f205cd6f293b42d0a148bdf30995018a0a3d810..9db350c14c823eba203e16005cb4dff7844343fe 100644 (file)
@@ -1,5 +1,42 @@
-#include "common.h"
-#include "memcached/protocol_binary.h"
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached library
+ *
+ *  Copyright (C) 2011 Data Differential, http://datadifferential.com/
+ *  Copyright (C) 2006-2009 Brian Aker 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>
+#include <libmemcached/memcached/protocol_binary.h>
 
 memcached_return_t memcached_delete(memcached_st *ptr, const char *key, size_t key_length,
                                     time_t expiration)
@@ -20,13 +57,18 @@ memcached_return_t memcached_delete_by_key(memcached_st *ptr,
                                            time_t expiration)
 {
   bool to_write;
-  memcached_return_t rc;
   char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
   uint32_t server_key;
   memcached_server_write_instance_st instance;
 
   LIBMEMCACHED_MEMCACHED_DELETE_START();
 
+  memcached_return_t rc;
+  if ((rc= initialize_query(ptr)) != MEMCACHED_SUCCESS)
+  {
+    return rc;
+  }
+
   rc= memcached_validate_key_length(key_length,
                                     ptr->flags.binary_protocol);
   unlikely (rc != MEMCACHED_SUCCESS)
index 9ec2dab5982ebbf46bce70dcbc8fa797dc198b48..18c159748bdd1e70d24e5fd78f6fd4ac285cdc3f 100644 (file)
@@ -90,7 +90,16 @@ error:
 
 memcached_return_t memcached_dump(memcached_st *ptr, memcached_dump_fn *callback, void *context, uint32_t number_of_callbacks)
 {
-  /* No support for Binary protocol yet */
+  memcached_return_t rc;
+  if ((rc= initialize_query(ptr)) != MEMCACHED_SUCCESS)
+  {
+    return rc;
+  }
+
+  /* 
+    No support for Binary protocol yet
+    @todo Fix this so that we just flush, switch to ascii, and then go back to binary.
+  */
   if (ptr->flags.binary_protocol)
     return MEMCACHED_FAILURE;
 
diff --git a/libmemcached/error.c b/libmemcached/error.c
deleted file mode 100644 (file)
index 86f58e6..0000000
+++ /dev/null
@@ -1,203 +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;
-  struct memcached_error_st *next;
-  memcached_return_t rc;
-  int local_errno;
-  size_t size;
-  char c_str[];
-};
-
-static memcached_error_st *_set(memcached_st *memc, memcached_string_t *str)
-{
-  if (! memc)
-    return NULL;
-
-  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 NULL;
-
-  error->root= memc;
-
-  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;
-
-  return 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;
-
-  memcached_error_st *error= _set(memc, str);
-
-  if (error)
-  {
-    error->local_errno= 0;
-    error->rc= rc;
-  }
-
-  return rc;
-}
-
-memcached_return_t memcached_set_errno(memcached_st *memc, int local_errno, memcached_string_t *str)
-{
-  memcached_error_st *error= _set(memc, str);
-
-  if (error)
-  {
-    error->local_errno= local_errno;
-    error->rc= MEMCACHED_ERRNO;
-  }
-
-  return error->rc;
-}
-
-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 f8320802321f0949ff984bb1d91a4242cc6cc071..c8b94806c5d0ca7173df5e81c3d5d82030269742 100644 (file)
@@ -65,7 +65,6 @@ LIBMEMCACHED_API
 LIBMEMCACHED_API
   int memcached_last_error_errno(memcached_st *memc);
 
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 5aaffa561851394ac6f4d9baea96b661f3da4736..8da6b5b57b10cc663689db00b2a24f4051c0839f 100644 (file)
@@ -8,6 +8,10 @@ static memcached_return_t memcached_flush_textual(memcached_st *ptr,
 memcached_return_t memcached_flush(memcached_st *ptr, time_t expiration)
 {
   memcached_return_t rc;
+  if ((rc= initialize_query(ptr)) != MEMCACHED_SUCCESS)
+  {
+    return rc;
+  }
 
   LIBMEMCACHED_MEMCACHED_FLUSH_START();
   if (ptr->flags.binary_protocol)
index 7cb5ec0473a02dee239104d60ed32b92403e8bb0..39f53373ce10f1be185a6478bfad11a3d8175ae0 100644 (file)
@@ -150,6 +150,12 @@ static memcached_return_t memcached_mget_by_key_real(memcached_st *ptr,
   unsigned int master_server_key= (unsigned int)-1; /* 0 is a valid server id! */
   bool is_master_key_set= false;
 
+  memcached_return_t rc;
+  if ((rc= initialize_query(ptr)) != MEMCACHED_SUCCESS)
+  {
+    return rc;
+  }
+
   unlikely (ptr->flags.use_udp)
     return MEMCACHED_NOT_SUPPORTED;
 
@@ -158,9 +164,6 @@ static memcached_return_t memcached_mget_by_key_real(memcached_st *ptr,
   if (number_of_keys == 0)
     return MEMCACHED_NOTFOUND;
 
-  if (memcached_server_count(ptr) == 0)
-    return MEMCACHED_NO_SERVERS;
-
   if (ptr->flags.verify_key && (memcached_key_test(keys, key_length, number_of_keys) == MEMCACHED_BAD_KEY_PROVIDED))
     return MEMCACHED_BAD_KEY_PROVIDED;
 
@@ -211,7 +214,7 @@ static memcached_return_t memcached_mget_by_key_real(memcached_st *ptr,
     If a server fails we warn about errors and start all over with sending keys
     to the server.
   */
-  memcached_return_t rc= MEMCACHED_SUCCESS;
+  WATCHPOINT_ASSERT(rc == MEMCACHED_SUCCESS);
   size_t hosts_connected= 0;
   for (uint32_t x= 0; x < number_of_keys; x++)
   {
index 65a4cd416bc34b9be06919f1259084c3ae5b4aae..93f830a7cafa5a32f195a25fa27f2e723abbaa5b 100644 (file)
@@ -339,10 +339,15 @@ memcached_return_t memcached_server_push(memcached_st *ptr, const memcached_serv
     WATCHPOINT_ASSERT(list[x].hostname[0] != 0);
 
     instance= memcached_server_instance_fetch(ptr, memcached_server_count(ptr));
+    WATCHPOINT_ASSERT(instance);
 
     /* TODO check return type */
-    (void)memcached_server_create_with(ptr, instance, list[x].hostname,
-                                       list[x].port, list[x].weight, list[x].type);
+    instance= memcached_server_create_with(ptr, instance, list[x].hostname,
+                                           list[x].port, list[x].weight, list[x].type);
+    if (! instance)
+    {
+      return memcached_set_error(ptr, MEMCACHED_MEMORY_ALLOCATION_FAILURE, NULL);
+    }
     ptr->number_of_hosts++;
   }
 
index 42e251d62e38399d070aaa56f3aeefbc8c3e7c5a..5a4b8b09ed0fd9cdb8e073af0f12272b69b024d5 100644 (file)
@@ -15,6 +15,7 @@ noinst_HEADERS+= \
                 libmemcached/byteorder.h \
                 libmemcached/common.h \
                 libmemcached/do.h \
+                libmemcached/initialize_query.h \
                 libmemcached/internal.h \
                 libmemcached/io.h \
                 libmemcached/is.h \
@@ -91,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
@@ -112,6 +113,7 @@ libmemcached_libmemcached_la_SOURCES+= \
                                       libmemcached/get.c \
                                       libmemcached/hash.c \
                                       libmemcached/hosts.c \
+                                      libmemcached/initialize_query.cc \
                                       libmemcached/io.c \
                                       libmemcached/key.c \
                                       libmemcached/memcached.c \
diff --git a/libmemcached/initialize_query.cc b/libmemcached/initialize_query.cc
new file mode 100644 (file)
index 0000000..abc8dfd
--- /dev/null
@@ -0,0 +1,72 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached library
+ *
+ *  Copyright (C) 2011 Data Differential, http://datadifferential.com/
+ *
+ *  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>
+#include <libmemcached/initialize_query.h>
+
+memcached_return_t initialize_query(memcached_st *self)
+{
+  if (! self)
+    return MEMCACHED_INVALID_ARGUMENTS;
+
+  if (self->state.is_time_for_rebuild)
+  {
+    memcached_reset(self);
+  }
+
+  if (memcached_server_count(self) == 0)
+  {
+    return memcached_set_error(self, MEMCACHED_NO_SERVERS, NULL);
+  }
+
+
+  self->query_id++;
+
+  return MEMCACHED_SUCCESS;
+}
+
+memcached_return_t initialize_const_query(const memcached_st *self)
+{
+  if (! self)
+    return MEMCACHED_INVALID_ARGUMENTS;
+
+  if (memcached_server_count(self) == 0)
+  {
+    return MEMCACHED_NO_SERVERS;
+  }
+
+  return MEMCACHED_SUCCESS;
+}
diff --git a/libmemcached/initialize_query.h b/libmemcached/initialize_query.h
new file mode 100644 (file)
index 0000000..86c8e2d
--- /dev/null
@@ -0,0 +1,51 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached library
+ *
+ *  Copyright (C) 2011 Data Differential, http://datadifferential.com/
+ *
+ *  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.
+ *
+ */
+
+#pragma once
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+LIBMEMCACHED_LOCAL
+  memcached_return_t initialize_query(memcached_st *self);
+
+LIBMEMCACHED_LOCAL
+memcached_return_t initialize_const_query(const memcached_st *self);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
index 3d2539eb4c25668358ded45085efe86f6130a8ec..120c2087b159d12a3f6d998ce1d569c270a27eea 100644 (file)
@@ -52,7 +52,6 @@ static const memcached_st global_copy= {
     .no_block= false,
     .no_reply= false,
     .randomize_replica_read= false,
-    .reuse_memory= false,
     .support_cas= false,
     .tcp_nodelay= false,
     .use_sort_hosts= false,
@@ -88,6 +87,7 @@ static inline bool _memcached_init(memcached_st *self)
   self->snd_timeout= 0;
   self->rcv_timeout= 0;
   self->server_failure_limit= 0;
+  self->query_id= 0;
 
   /* TODO, Document why we picked these defaults */
   self->io_msg_watermark= 500;
@@ -129,7 +129,7 @@ static inline bool _memcached_init(memcached_st *self)
 static void _free(memcached_st *ptr, bool release_st)
 {
   /* If we have anything open, lets close it now */
-  memcached_quit(ptr);
+  send_quit(ptr);
   memcached_server_list_free(memcached_server_list(ptr));
   memcached_result_free(&ptr->result);
 
@@ -213,19 +213,29 @@ memcached_st *memcached_create_with_options(const char *string, size_t length)
   memcached_st *self= memcached_create(NULL);
 
   if (! self)
+  {
+    errno= ENOMEM;
     return NULL;
+  }
 
   memcached_return_t rc;
-  if ((rc= memcached_parse_configuration(self, string, length)) != MEMCACHED_SUCCESS)
+  rc= memcached_parse_configuration(self, string, length);
+
+  if (rc == MEMCACHED_SUCCESS && memcached_parse_filename(self))
   {
-    return self;
+    rc= memcached_parse_configure_file(self, memcached_parse_filename(self), memcached_parse_filename_length(self));
   }
 
-  if (memcached_parse_filename(self))
+    
+  if (rc != MEMCACHED_SUCCESS)
   {
-    rc= memcached_parse_configure_file(self, memcached_parse_filename(self), memcached_parse_filename_length(self));
+    memcached_free(self);
+    errno= EINVAL;
+    return NULL;
   }
 
+  errno= 0;
+
   return self;
 }
 
@@ -236,9 +246,11 @@ memcached_return_t memcached_reset(memcached_st *ptr)
     return MEMCACHED_INVALID_ARGUMENTS;
 
   bool stored_is_allocated= memcached_is_allocated(ptr);
+  uint64_t query_id= ptr->query_id;
   _free(ptr, false);
   memcached_create(ptr);
   memcached_set_allocated(ptr, stored_is_allocated);
+  ptr->query_id= query_id;
 
   if (ptr->configure.filename)
   {
@@ -250,6 +262,9 @@ memcached_return_t memcached_reset(memcached_st *ptr)
 
 void memcached_servers_reset(memcached_st *ptr)
 {
+  if (! ptr)
+    return;
+
   memcached_server_list_free(memcached_server_list(ptr));
 
   memcached_server_list_set(ptr, NULL);
@@ -264,6 +279,9 @@ void memcached_servers_reset(memcached_st *ptr)
 
 void memcached_reset_last_disconnected_server(memcached_st *ptr)
 {
+  if (! ptr)
+    return;
+
   if (ptr->last_disconnected_server)
   {
     memcached_server_free(ptr->last_disconnected_server);
@@ -273,6 +291,9 @@ void memcached_reset_last_disconnected_server(memcached_st *ptr)
 
 void memcached_free(memcached_st *ptr)
 {
+  if (! ptr)
+    return;
+
   _free(ptr, true);
 }
 
index 10ff26df5bd6daa34550a298f7d5d5d3fbb409a9..fa291f930f71a70aab1ced09dfbe92c39090390e 100644 (file)
@@ -101,10 +101,8 @@ struct memcached_st {
     bool no_block:1; // Don't block
     bool no_reply:1;
     bool randomize_replica_read:1;
-    bool reuse_memory:1;
     bool support_cas:1;
     bool tcp_nodelay:1;
-    bool use_cache_lookups:1;
     bool use_sort_hosts:1;
     bool use_udp:1;
     bool verify_key:1;
@@ -129,6 +127,7 @@ struct memcached_st {
   int send_size;
   int recv_size;
   void *user_data;
+  uint64_t query_id;
   uint32_t number_of_replicas;
   hashkit_st distribution_hashkit;
   memcached_result_st result;
@@ -157,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;
@@ -179,7 +178,7 @@ LIBMEMCACHED_API
 memcached_st *memcached_create(memcached_st *ptr);
 
 LIBMEMCACHED_API
-memcached_st *memcached_create_with_options(const char *string, size_t length);
+memcached_st *memcached_create_with_options(const char *string, size_t string_length);
 
 LIBMEMCACHED_API
 void memcached_free(memcached_st *ptr);
index 0a27be982646889261dc69530cc70b85d1f7ad59..2785c1220102229a8fb5dce56fa04b42ac72172f 100644 (file)
@@ -44,16 +44,16 @@ extern "C" {
 LIBMEMCACHED_API
   memcached_return_t libmemcached_check_configuration(const char *option_string, size_t length, char *error_buffer, size_t error_buffer_size);
 
-LIBMEMCACHED_API
+LIBMEMCACHED_LOCAL
+  void memcached_set_configuration_file(memcached_st *self, const char *filename, size_t filename_length);
+
+LIBMEMCACHED_LOCAL
   memcached_return_t memcached_parse_configuration(memcached_st *ptr, const char *option_string, size_t length);
 
-LIBMEMCACHED_API
+LIBMEMCACHED_LOCAL
   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
   const char *memcached_parse_filename(memcached_st *memc);
 
 LIBMEMCACHED_LOCAL
diff --git a/libmemcached/options/build.cc b/libmemcached/options/build.cc
deleted file mode 100644 (file)
index 9381b51..0000000
+++ /dev/null
@@ -1,69 +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>
-#include <libmemcached/options/context.h>
-#include <libmemcached/options/build.h>
-
-namespace parser {
-
-void abort_func(Context *context, const char *error)
-{
-  if (context->rc == MEMCACHED_SUCCESS)
-    context->rc= MEMCACHED_PARSE_ERROR;
-
-  memcached_string_st *error_string= memcached_string_create(context->memc, NULL, 1024);
-  memcached_string_append(error_string, memcached_string_with_size("Error occured while parsing: "));
-  memcached_string_append(error_string, memcached_string_make_from_cstr(context->begin));
-  memcached_string_append(error_string, memcached_string_with_size(" ("));
-
-  if (context->rc == MEMCACHED_PARSE_ERROR and error)
-  {
-    memcached_string_append(error_string, memcached_string_make_from_cstr(error));
-  }
-  else
-  {
-    memcached_string_append(error_string, memcached_string_make_from_cstr(memcached_strerror(NULL, context->rc)));
-  }
-  memcached_string_append(error_string, memcached_string_with_size(")"));
-
-  memcached_set_error_string(context->memc, context->rc, memcached_string_value(error_string), memcached_string_length(error_string));
-
-  memcached_string_free(error_string);
-}
-
-} // namespace parser
diff --git a/libmemcached/options/build.h b/libmemcached/options/build.h
deleted file mode 100644 (file)
index d267354..0000000
+++ /dev/null
@@ -1,46 +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.
- *
- */
-
-#pragma once
-
-class Conext;
-
-namespace parser {
-
-void abort_func(Context *context, const char *error);
-
-}
index d65f8ede53ce8659367a37c06cbbf1a078a9b6ab..bbca66c855e23600646de64c627a585c8f8b5e39 100644 (file)
@@ -37,7 +37,7 @@
 
 #pragma once
 
-#include <libmemcached/memcached.h>
+#include <libmemcached/common.h>
 
 class Context
 {
@@ -102,6 +102,31 @@ public:
     return _hostname;
   }
 
+  void abort(const char *error)
+  {
+    if (rc == MEMCACHED_SUCCESS)
+      rc= MEMCACHED_PARSE_ERROR;
+
+    memcached_string_st *error_string= memcached_string_create(memc, NULL, 1024);
+    memcached_string_append(error_string, memcached_string_with_size("Error occured while parsing: "));
+    memcached_string_append(error_string, memcached_string_make_from_cstr(begin));
+    memcached_string_append(error_string, memcached_string_with_size(" ("));
+
+    if (rc == MEMCACHED_PARSE_ERROR and error)
+    {
+      memcached_string_append(error_string, memcached_string_make_from_cstr(error));
+    }
+    else
+    {
+      memcached_string_append(error_string, memcached_string_make_from_cstr(memcached_strerror(NULL, rc)));
+    }
+    memcached_string_append(error_string, memcached_string_with_size(")"));
+
+    memcached_set_error_string(memc, rc, memcached_string_value(error_string), memcached_string_length(error_string));
+
+    memcached_string_free(error_string);
+  }
+
   ~Context()
   {
     destroy_scanner();
index 040c1c1ed6343a4568f0a66bf0bf2cd5d02f6cbe..8283b188acaedf84efb7825aef86404a8525b48a 100644 (file)
@@ -3,14 +3,9 @@
 # All paths should be given relative to the root
 
 DISTCLEANFILES+= \
-                libmemcached/options/parser.output \
-                libmemcached/options/parser.cc \
-                libmemcached/options/parser.h \
-                libmemcached/options/scanner.cc \
-                libmemcached/options/scanner.h
+                libmemcached/options/parser.output
 
 noinst_HEADERS+= \
-                libmemcached/options/build.h \
                 libmemcached/options/context.h \
                 libmemcached/options/parser.h \
                 libmemcached/options/scanner.h \
@@ -19,7 +14,6 @@ noinst_HEADERS+= \
                 libmemcached/options/symbol.h
 
 libmemcached_libmemcached_la_SOURCES+= \
-                                      libmemcached/options/build.cc \
                                       libmemcached/options/parser.cc \
                                       libmemcached/options/scanner.cc
 
index c5a671d57aabb4a8b921f0677d3402700ea36e0d..14754f9289c89a1a89b637df3be092a274eea5da 100644 (file)
@@ -83,7 +83,6 @@
 #include <stdint.h>
 
 #include <libmemcached/options/context.h>
-#include <libmemcached/options/build.h>
 #include <libmemcached/options/string.h>
 #include <libmemcached/options/symbol.h>
 #include <libmemcached/visibility.h>
 
 int conf_lex(YYSTYPE* lvalp, void* scanner);
 
-#define parser_abort(A, B) do { parser::abort_func((A), (B)); YYABORT; } while (0) 
+#define parser_abort(A, B) do { (A)->abort((B)); YYABORT; } while (0) 
 
 inline void config_error(Context *context, yyscan_t *scanner, const char *error)
 {
   if (not context->end())
-    parser::abort_func(context, error);
+    context->abort(error);
 }
 
 
 
 /* Line 189 of yacc.c  */
-#line 109 "libmemcached/options/parser.cc"
+#line 108 "libmemcached/options/parser.cc"
 
 /* Enabling traces.  */
 #ifndef YYDEBUG
@@ -145,60 +144,59 @@ inline void config_error(Context *context, yyscan_t *scanner, const char *error)
      SERVERS_OPTION = 268,
      UNKNOWN_OPTION = 269,
      UNKNOWN = 270,
-     AUTO_EJECT_HOSTS = 271,
-     BINARY_PROTOCOL = 272,
-     BUFFER_REQUESTS = 273,
-     CONNECT_TIMEOUT = 274,
-     DISTRIBUTION = 275,
-     HASH = 276,
-     HASH_WITH_PREFIX_KEY = 277,
-     IO_BYTES_WATERMARK = 278,
-     IO_KEY_PREFETCH = 279,
-     IO_MSG_WATERMARK = 280,
-     KETAMA_HASH = 281,
-     KETAMA_WEIGHTED = 282,
-     NOREPLY = 283,
-     NUMBER_OF_REPLICAS = 284,
-     POLL_TIMEOUT = 285,
-     RANDOMIZE_REPLICA_READ = 286,
-     RCV_TIMEOUT = 287,
+     BINARY_PROTOCOL = 271,
+     BUFFER_REQUESTS = 272,
+     CONNECT_TIMEOUT = 273,
+     DISTRIBUTION = 274,
+     HASH = 275,
+     HASH_WITH_PREFIX_KEY = 276,
+     IO_BYTES_WATERMARK = 277,
+     IO_KEY_PREFETCH = 278,
+     IO_MSG_WATERMARK = 279,
+     KETAMA_HASH = 280,
+     KETAMA_WEIGHTED = 281,
+     NOREPLY = 282,
+     NUMBER_OF_REPLICAS = 283,
+     POLL_TIMEOUT = 284,
+     RANDOMIZE_REPLICA_READ = 285,
+     RCV_TIMEOUT = 286,
+     REMOVE_FAILED_SERVERS = 287,
      RETRY_TIMEOUT = 288,
-     SERVER_FAILURE_LIMIT = 289,
-     SND_TIMEOUT = 290,
-     SOCKET_RECV_SIZE = 291,
-     SOCKET_SEND_SIZE = 292,
-     SORT_HOSTS = 293,
-     SUPPORT_CAS = 294,
-     _TCP_NODELAY = 295,
-     _TCP_KEEPALIVE = 296,
-     _TCP_KEEPIDLE = 297,
-     USER_DATA = 298,
-     USE_UDP = 299,
-     VERIFY_KEY = 300,
-     PREFIX_KEY = 301,
-     MD5 = 302,
-     CRC = 303,
-     FNV1_64 = 304,
-     FNV1A_64 = 305,
-     FNV1_32 = 306,
-     FNV1A_32 = 307,
-     HSIEH = 308,
-     MURMUR = 309,
-     JENKINS = 310,
-     CONSISTENT = 311,
-     MODULA = 312,
-     RANDOM = 313,
-     TRUE = 314,
-     FALSE = 315,
-     FLOAT = 316,
-     NUMBER = 317,
-     PORT = 318,
-     WEIGHT_START = 319,
-     IPADDRESS = 320,
-     HOSTNAME = 321,
-     STRING = 322,
-     QUOTED_STRING = 323,
-     FILE_PATH = 324
+     SND_TIMEOUT = 289,
+     SOCKET_RECV_SIZE = 290,
+     SOCKET_SEND_SIZE = 291,
+     SORT_HOSTS = 292,
+     SUPPORT_CAS = 293,
+     USER_DATA = 294,
+     USE_UDP = 295,
+     VERIFY_KEY = 296,
+     _TCP_KEEPALIVE = 297,
+     _TCP_KEEPIDLE = 298,
+     _TCP_NODELAY = 299,
+     PREFIX_KEY = 300,
+     MD5 = 301,
+     CRC = 302,
+     FNV1_64 = 303,
+     FNV1A_64 = 304,
+     FNV1_32 = 305,
+     FNV1A_32 = 306,
+     HSIEH = 307,
+     MURMUR = 308,
+     JENKINS = 309,
+     CONSISTENT = 310,
+     MODULA = 311,
+     RANDOM = 312,
+     TRUE = 313,
+     FALSE = 314,
+     FLOAT = 315,
+     NUMBER = 316,
+     PORT = 317,
+     WEIGHT_START = 318,
+     IPADDRESS = 319,
+     HOSTNAME = 320,
+     STRING = 321,
+     QUOTED_STRING = 322,
+     FILE_PATH = 323
    };
 #endif
 
@@ -215,7 +213,7 @@ inline void config_error(Context *context, yyscan_t *scanner, const char *error)
 
 
 /* Line 264 of yacc.c  */
-#line 219 "libmemcached/options/parser.cc"
+#line 217 "libmemcached/options/parser.cc"
 
 #ifdef short
 # undef short
@@ -428,22 +426,22 @@ union yyalloc
 #endif
 
 /* YYFINAL -- State number of the termination state.  */
-#define YYFINAL  66
+#define YYFINAL  65
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   72
+#define YYLAST   71
 
 /* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  73
+#define YYNTOKENS  72
 /* YYNNTS -- Number of nonterminals.  */
 #define YYNNTS  12
 /* YYNRULES -- Number of rules.  */
-#define YYNRULES  65
+#define YYNRULES  64
 /* YYNRULES -- Number of states.  */
-#define YYNSTATES  79
+#define YYNSTATES  78
 
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 #define YYUNDEFTOK  2
-#define YYMAXUTOK   324
+#define YYMAXUTOK   323
 
 #define YYTRANSLATE(YYX)                                               \
   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -454,10 +452,10 @@ static const yytype_uint8 yytranslate[] =
        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,    72,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,    61,     2,     2,     2,     2,     2,
+       2,     2,    71,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,    60,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,    62,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,    61,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
@@ -482,8 +480,8 @@ static const yytype_uint8 yytranslate[] =
       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
-      55,    56,    57,    58,    59,    60,    63,    64,    65,    66,
-      67,    68,    69,    70,    71
+      55,    56,    57,    58,    59,    62,    63,    64,    65,    66,
+      67,    68,    69,    70
 };
 
 #if YYDEBUG
@@ -495,41 +493,41 @@ static const yytype_uint8 yyprhs[] =
       21,    23,    27,    32,    37,    40,    42,    45,    48,    53,
       56,    59,    61,    63,    65,    67,    69,    71,    73,    75,
       77,    79,    81,    83,    85,    87,    89,    91,    93,    95,
-      97,    99,   101,   103,   105,   107,   109,   111,   113,   114,
-     116,   117,   119,   121,   123,   125,   127,   129,   131,   133,
-     135,   137,   139,   141,   143,   145
+      97,    99,   101,   103,   105,   107,   109,   111,   112,   114,
+     115,   117,   119,   121,   123,   125,   127,   129,   131,   133,
+     135,   137,   139,   141,   143
 };
 
 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
 static const yytype_int8 yyrhs[] =
 {
-      74,     0,    -1,    75,    -1,    74,    72,    75,    -1,    76,
+      73,     0,    -1,    74,    -1,    73,    71,    74,    -1,    75,
       -1,     3,    -1,    10,    -1,     4,    -1,     5,    -1,     6,
-      -1,     7,    -1,     8,    72,    83,    -1,    11,    68,    80,
-      81,    -1,    11,    67,    80,    81,    -1,     9,    83,    -1,
-      77,    -1,    46,    83,    -1,    20,    84,    -1,    20,    84,
-      61,    82,    -1,    21,    82,    -1,    78,    64,    -1,    79,
-      -1,    43,    -1,    19,    -1,    25,    -1,    23,    -1,    24,
-      -1,    29,    -1,    30,    -1,    32,    -1,    33,    -1,    34,
-      -1,    35,    -1,    36,    -1,    37,    -1,    16,    -1,    17,
-      -1,    18,    -1,    22,    -1,    28,    -1,    31,    -1,    38,
-      -1,    39,    -1,    40,    -1,    41,    -1,    42,    -1,    44,
-      -1,    45,    -1,    -1,    65,    -1,    -1,    66,    -1,    47,
+      -1,     7,    -1,     8,    71,    82,    -1,    11,    67,    79,
+      80,    -1,    11,    66,    79,    80,    -1,     9,    82,    -1,
+      76,    -1,    45,    82,    -1,    19,    83,    -1,    19,    83,
+      60,    81,    -1,    20,    81,    -1,    77,    63,    -1,    78,
+      -1,    39,    -1,    32,    -1,    18,    -1,    24,    -1,    22,
+      -1,    23,    -1,    28,    -1,    29,    -1,    31,    -1,    33,
+      -1,    34,    -1,    35,    -1,    36,    -1,    16,    -1,    17,
+      -1,    21,    -1,    27,    -1,    30,    -1,    37,    -1,    38,
+      -1,    44,    -1,    42,    -1,    43,    -1,    40,    -1,    41,
+      -1,    -1,    64,    -1,    -1,    65,    -1,    46,    -1,    47,
       -1,    48,    -1,    49,    -1,    50,    -1,    51,    -1,    52,
-      -1,    53,    -1,    54,    -1,    55,    -1,    69,    -1,    70,
-      -1,    56,    -1,    57,    -1,    58,    -1
+      -1,    53,    -1,    54,    -1,    68,    -1,    69,    -1,    55,
+      -1,    56,    -1,    57,    -1
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   155,   155,   156,   160,   162,   164,   166,   171,   176,
-     180,   184,   195,   203,   211,   215,   219,   226,   233,   244,
-     251,   258,   265,   271,   275,   279,   283,   287,   291,   295,
-     299,   303,   307,   311,   315,   322,   326,   330,   334,   338,
-     342,   346,   350,   354,   358,   362,   366,   370,   377,   378,
-     383,   384,   389,   393,   397,   401,   405,   409,   413,   417,
-     421,   428,   432,   440,   444,   448
+       0,   153,   153,   154,   158,   160,   162,   164,   169,   174,
+     178,   182,   193,   201,   209,   213,   217,   224,   231,   242,
+     249,   256,   263,   269,   273,   277,   281,   285,   289,   293,
+     297,   301,   305,   309,   313,   320,   324,   328,   332,   336,
+     340,   344,   348,   352,   356,   360,   364,   371,   372,   377,
+     378,   383,   387,   391,   395,   399,   403,   407,   411,   415,
+     422,   426,   434,   438,   442
 };
 #endif
 
@@ -541,21 +539,20 @@ static const char *const yytname[] =
   "$end", "error", "$undefined", "COMMENT", "END", "ERROR", "RESET",
   "PARSER_DEBUG", "INCLUDE", "CONFIGURE_FILE", "EMPTY_LINE", "SERVER",
   "SERVERS", "SERVERS_OPTION", "UNKNOWN_OPTION", "UNKNOWN",
-  "AUTO_EJECT_HOSTS", "BINARY_PROTOCOL", "BUFFER_REQUESTS",
-  "CONNECT_TIMEOUT", "DISTRIBUTION", "HASH", "HASH_WITH_PREFIX_KEY",
-  "IO_BYTES_WATERMARK", "IO_KEY_PREFETCH", "IO_MSG_WATERMARK",
-  "KETAMA_HASH", "KETAMA_WEIGHTED", "NOREPLY", "NUMBER_OF_REPLICAS",
-  "POLL_TIMEOUT", "RANDOMIZE_REPLICA_READ", "RCV_TIMEOUT", "RETRY_TIMEOUT",
-  "SERVER_FAILURE_LIMIT", "SND_TIMEOUT", "SOCKET_RECV_SIZE",
-  "SOCKET_SEND_SIZE", "SORT_HOSTS", "SUPPORT_CAS", "_TCP_NODELAY",
-  "_TCP_KEEPALIVE", "_TCP_KEEPIDLE", "USER_DATA", "USE_UDP", "VERIFY_KEY",
-  "PREFIX_KEY", "MD5", "CRC", "FNV1_64", "FNV1A_64", "FNV1_32", "FNV1A_32",
-  "HSIEH", "MURMUR", "JENKINS", "CONSISTENT", "MODULA", "RANDOM", "TRUE",
-  "FALSE", "','", "'='", "FLOAT", "NUMBER", "PORT", "WEIGHT_START",
-  "IPADDRESS", "HOSTNAME", "STRING", "QUOTED_STRING", "FILE_PATH", "' '",
-  "$accept", "begin", "statement", "expression", "behaviors",
-  "behavior_number", "behavior_boolean", "optional_port",
-  "optional_weight", "hash", "string", "distribution", 0
+  "BINARY_PROTOCOL", "BUFFER_REQUESTS", "CONNECT_TIMEOUT", "DISTRIBUTION",
+  "HASH", "HASH_WITH_PREFIX_KEY", "IO_BYTES_WATERMARK", "IO_KEY_PREFETCH",
+  "IO_MSG_WATERMARK", "KETAMA_HASH", "KETAMA_WEIGHTED", "NOREPLY",
+  "NUMBER_OF_REPLICAS", "POLL_TIMEOUT", "RANDOMIZE_REPLICA_READ",
+  "RCV_TIMEOUT", "REMOVE_FAILED_SERVERS", "RETRY_TIMEOUT", "SND_TIMEOUT",
+  "SOCKET_RECV_SIZE", "SOCKET_SEND_SIZE", "SORT_HOSTS", "SUPPORT_CAS",
+  "USER_DATA", "USE_UDP", "VERIFY_KEY", "_TCP_KEEPALIVE", "_TCP_KEEPIDLE",
+  "_TCP_NODELAY", "PREFIX_KEY", "MD5", "CRC", "FNV1_64", "FNV1A_64",
+  "FNV1_32", "FNV1A_32", "HSIEH", "MURMUR", "JENKINS", "CONSISTENT",
+  "MODULA", "RANDOM", "TRUE", "FALSE", "','", "'='", "FLOAT", "NUMBER",
+  "PORT", "WEIGHT_START", "IPADDRESS", "HOSTNAME", "STRING",
+  "QUOTED_STRING", "FILE_PATH", "' '", "$accept", "begin", "statement",
+  "expression", "behaviors", "behavior_number", "behavior_boolean",
+  "optional_port", "optional_weight", "hash", "string", "distribution", 0
 };
 #endif
 
@@ -570,21 +567,21 @@ static const yytype_uint16 yytoknum[] =
      285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
      295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
      305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
-     315,    44,    61,   316,   317,   318,   319,   320,   321,   322,
-     323,   324,    32
+      44,    61,   315,   316,   317,   318,   319,   320,   321,   322,
+     323,    32
 };
 # endif
 
 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
 static const yytype_uint8 yyr1[] =
 {
-       0,    73,    74,    74,    75,    75,    75,    75,    75,    75,
-      75,    75,    76,    76,    76,    76,    77,    77,    77,    77,
-      77,    77,    77,    78,    78,    78,    78,    78,    78,    78,
-      78,    78,    78,    78,    78,    79,    79,    79,    79,    79,
-      79,    79,    79,    79,    79,    79,    79,    79,    80,    80,
-      81,    81,    82,    82,    82,    82,    82,    82,    82,    82,
-      82,    83,    83,    84,    84,    84
+       0,    72,    73,    73,    74,    74,    74,    74,    74,    74,
+      74,    74,    75,    75,    75,    75,    76,    76,    76,    76,
+      76,    76,    76,    77,    77,    77,    77,    77,    77,    77,
+      77,    77,    77,    77,    77,    78,    78,    78,    78,    78,
+      78,    78,    78,    78,    78,    78,    78,    79,    79,    80,
+      80,    81,    81,    81,    81,    81,    81,    81,    81,    81,
+      82,    82,    83,    83,    83
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
@@ -594,9 +591,9 @@ static const yytype_uint8 yyr2[] =
        1,     3,     4,     4,     2,     1,     2,     2,     4,     2,
        2,     1,     1,     1,     1,     1,     1,     1,     1,     1,
        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     1,     1,     1,     0,     1,
-       0,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     1
+       1,     1,     1,     1,     1,     1,     1,     0,     1,     0,
+       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+       1,     1,     1,     1,     1
 };
 
 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -605,42 +602,42 @@ static const yytype_uint8 yyr2[] =
 static const yytype_uint8 yydefact[] =
 {
        0,     5,     7,     8,     9,    10,     0,     0,     6,     0,
-      35,    36,    37,    23,     0,     0,    38,    25,    26,    24,
-      39,    27,    28,    40,    29,    30,    31,    32,    33,    34,
-      41,    42,    43,    44,    45,    22,    46,    47,     0,     0,
-       2,     4,    15,     0,    21,     0,    61,    62,    14,    48,
-      48,    63,    64,    65,    17,    52,    53,    54,    55,    56,
-      57,    58,    59,    60,    19,    16,     1,     0,    20,    11,
-      49,    50,    50,     0,     3,    51,    13,    12,    18
+      35,    36,    24,     0,     0,    37,    26,    27,    25,    38,
+      28,    29,    39,    30,    23,    31,    32,    33,    34,    40,
+      41,    22,    45,    46,    43,    44,    42,     0,     0,     2,
+       4,    15,     0,    21,     0,    60,    61,    14,    47,    47,
+      62,    63,    64,    17,    51,    52,    53,    54,    55,    56,
+      57,    58,    59,    19,    16,     1,     0,    20,    11,    48,
+      49,    49,     0,     3,    50,    13,    12,    18
 };
 
 /* YYDEFGOTO[NTERM-NUM].  */
 static const yytype_int8 yydefgoto[] =
 {
-      -1,    39,    40,    41,    42,    43,    44,    71,    76,    64,
-      48,    54
+      -1,    38,    39,    40,    41,    42,    43,    70,    75,    63,
+      47,    53
 };
 
 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    STATE-NUM.  */
-#define YYPACT_NINF -60
+#define YYPACT_NINF -59
 static const yytype_int8 yypact[] =
 {
-      -2,   -60,   -60,   -60,   -60,   -60,   -59,   -45,   -60,   -11,
-     -60,   -60,   -60,   -60,   -46,    -1,   -60,   -60,   -60,   -60,
-     -60,   -60,   -60,   -60,   -60,   -60,   -60,   -60,   -60,   -60,
-     -60,   -60,   -60,   -60,   -60,   -60,   -60,   -60,   -45,     0,
-     -60,   -60,   -60,   -19,   -60,   -45,   -60,   -60,   -60,    -7,
-      -7,   -60,   -60,   -60,     2,   -60,   -60,   -60,   -60,   -60,
-     -60,   -60,   -60,   -60,   -60,   -60,   -60,    -2,   -60,   -60,
-     -60,    -6,    -6,    -1,   -60,   -60,   -60,   -60,   -60
+      -2,   -59,   -59,   -59,   -59,   -59,   -58,   -13,   -59,   -43,
+     -59,   -59,   -59,   -45,    -1,   -59,   -59,   -59,   -59,   -59,
+     -59,   -59,   -59,   -59,   -59,   -59,   -59,   -59,   -59,   -59,
+     -59,   -59,   -59,   -59,   -59,   -59,   -59,   -13,     0,   -59,
+     -59,   -59,   -19,   -59,   -13,   -59,   -59,   -59,    -7,    -7,
+     -59,   -59,   -59,     2,   -59,   -59,   -59,   -59,   -59,   -59,
+     -59,   -59,   -59,   -59,   -59,   -59,    -2,   -59,   -59,   -59,
+      -6,    -6,    -1,   -59,   -59,   -59,   -59,   -59
 };
 
 /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int8 yypgoto[] =
 {
-     -60,   -60,    -8,   -60,   -60,   -60,   -60,    11,    -5,    -9,
-      17,   -60
+     -59,   -59,    -8,   -59,   -59,   -59,   -59,    11,    -5,    -9,
+      17,   -59
 };
 
 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
@@ -650,26 +647,26 @@ static const yytype_int8 yypgoto[] =
 #define YYTABLE_NINF -1
 static const yytype_uint8 yytable[] =
 {
-      66,     1,     2,     3,     4,     5,     6,     7,     8,     9,
-      51,    52,    53,    45,    10,    11,    12,    13,    14,    15,
-      16,    17,    18,    19,    46,    47,    20,    21,    22,    23,
+      65,     1,     2,     3,     4,     5,     6,     7,     8,     9,
+      50,    51,    52,    44,    10,    11,    12,    13,    14,    15,
+      16,    17,    18,    48,    49,    19,    20,    21,    22,    23,
       24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
-      34,    35,    36,    37,    38,    68,    55,    56,    57,    58,
-      59,    60,    61,    62,    63,    65,    49,    50,    70,    74,
-      75,    72,    69,    73,    78,     0,     0,    77,     0,     0,
-       0,     0,    67
+      34,    35,    36,    37,    67,    54,    55,    56,    57,    58,
+      59,    60,    61,    62,    64,    45,    46,    69,    73,    74,
+      71,    68,    72,    77,     0,     0,    76,     0,     0,     0,
+       0,    66
 };
 
 static const yytype_int8 yycheck[] =
 {
        0,     3,     4,     5,     6,     7,     8,     9,    10,    11,
-      56,    57,    58,    72,    16,    17,    18,    19,    20,    21,
-      22,    23,    24,    25,    69,    70,    28,    29,    30,    31,
+      55,    56,    57,    71,    16,    17,    18,    19,    20,    21,
+      22,    23,    24,    66,    67,    27,    28,    29,    30,    31,
       32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
-      42,    43,    44,    45,    46,    64,    47,    48,    49,    50,
-      51,    52,    53,    54,    55,    38,    67,    68,    65,    67,
-      66,    50,    45,    61,    73,    -1,    -1,    72,    -1,    -1,
-      -1,    -1,    72
+      42,    43,    44,    45,    63,    46,    47,    48,    49,    50,
+      51,    52,    53,    54,    37,    68,    69,    64,    66,    65,
+      49,    44,    60,    72,    -1,    -1,    71,    -1,    -1,    -1,
+      -1,    71
 };
 
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -677,13 +674,13 @@ static const yytype_int8 yycheck[] =
 static const yytype_uint8 yystos[] =
 {
        0,     3,     4,     5,     6,     7,     8,     9,    10,    11,
-      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
+      16,    17,    18,    19,    20,    21,    22,    23,    24,    27,
       28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
-      38,    39,    40,    41,    42,    43,    44,    45,    46,    74,
-      75,    76,    77,    78,    79,    72,    69,    70,    83,    67,
-      68,    56,    57,    58,    84,    47,    48,    49,    50,    51,
-      52,    53,    54,    55,    82,    83,     0,    72,    64,    83,
-      65,    80,    80,    61,    75,    66,    81,    81,    82
+      38,    39,    40,    41,    42,    43,    44,    45,    73,    74,
+      75,    76,    77,    78,    71,    68,    69,    82,    66,    67,
+      55,    56,    57,    83,    46,    47,    48,    49,    50,    51,
+      52,    53,    54,    81,    82,     0,    71,    63,    82,    64,
+      79,    79,    60,    74,    65,    80,    80,    81
 };
 
 #define yyerrok                (yyerrstatus = 0)
@@ -1518,28 +1515,28 @@ yyreduce:
         case 4:
 
 /* Line 1464 of yacc.c  */
-#line 161 "libmemcached/options/parser.yy"
+#line 159 "libmemcached/options/parser.yy"
     { ;}
     break;
 
   case 5:
 
 /* Line 1464 of yacc.c  */
-#line 163 "libmemcached/options/parser.yy"
+#line 161 "libmemcached/options/parser.yy"
     { ;}
     break;
 
   case 6:
 
 /* Line 1464 of yacc.c  */
-#line 165 "libmemcached/options/parser.yy"
+#line 163 "libmemcached/options/parser.yy"
     { ;}
     break;
 
   case 7:
 
 /* Line 1464 of yacc.c  */
-#line 167 "libmemcached/options/parser.yy"
+#line 165 "libmemcached/options/parser.yy"
     {
             context->set_end();
             YYACCEPT;
@@ -1549,7 +1546,7 @@ yyreduce:
   case 8:
 
 /* Line 1464 of yacc.c  */
-#line 172 "libmemcached/options/parser.yy"
+#line 170 "libmemcached/options/parser.yy"
     {
             context->rc= MEMCACHED_PARSE_USER_ERROR;
             parser_abort(context, NULL);
@@ -1559,7 +1556,7 @@ yyreduce:
   case 9:
 
 /* Line 1464 of yacc.c  */
-#line 177 "libmemcached/options/parser.yy"
+#line 175 "libmemcached/options/parser.yy"
     {
             memcached_reset(context->memc);
           ;}
@@ -1568,7 +1565,7 @@ yyreduce:
   case 10:
 
 /* Line 1464 of yacc.c  */
-#line 181 "libmemcached/options/parser.yy"
+#line 179 "libmemcached/options/parser.yy"
     {
             yydebug= 1;
           ;}
@@ -1577,7 +1574,7 @@ yyreduce:
   case 11:
 
 /* Line 1464 of yacc.c  */
-#line 185 "libmemcached/options/parser.yy"
+#line 183 "libmemcached/options/parser.yy"
     {
             if ((context->rc= memcached_parse_configure_file(context->memc, (yyvsp[(3) - (3)].string).c_str, (yyvsp[(3) - (3)].string).length)) != MEMCACHED_SUCCESS)
             {
@@ -1589,7 +1586,7 @@ yyreduce:
   case 12:
 
 /* Line 1464 of yacc.c  */
-#line 196 "libmemcached/options/parser.yy"
+#line 194 "libmemcached/options/parser.yy"
     {
             if ((context->rc= memcached_server_add_with_weight(context->memc, (yyvsp[(2) - (4)].server).c_str, (yyvsp[(2) - (4)].server).port, (yyvsp[(2) - (4)].server).weight)) != MEMCACHED_SUCCESS)
             {
@@ -1602,7 +1599,7 @@ yyreduce:
   case 13:
 
 /* Line 1464 of yacc.c  */
-#line 204 "libmemcached/options/parser.yy"
+#line 202 "libmemcached/options/parser.yy"
     {
             if ((context->rc= memcached_server_add_with_weight(context->memc, (yyvsp[(2) - (4)].server).c_str, (yyvsp[(2) - (4)].server).port, (yyvsp[(2) - (4)].server).weight)) != MEMCACHED_SUCCESS)
             {
@@ -1615,7 +1612,7 @@ yyreduce:
   case 14:
 
 /* Line 1464 of yacc.c  */
-#line 212 "libmemcached/options/parser.yy"
+#line 210 "libmemcached/options/parser.yy"
     {
             memcached_set_configuration_file(context->memc, (yyvsp[(2) - (2)].string).c_str, (yyvsp[(2) - (2)].string).length);
           ;}
@@ -1624,7 +1621,7 @@ yyreduce:
   case 16:
 
 /* Line 1464 of yacc.c  */
-#line 220 "libmemcached/options/parser.yy"
+#line 218 "libmemcached/options/parser.yy"
     {
             if ((context->rc= memcached_set_prefix_key(context->memc, (yyvsp[(2) - (2)].string).c_str, (yyvsp[(2) - (2)].string).length)) != MEMCACHED_SUCCESS)
             {
@@ -1636,7 +1633,7 @@ yyreduce:
   case 17:
 
 /* Line 1464 of yacc.c  */
-#line 227 "libmemcached/options/parser.yy"
+#line 225 "libmemcached/options/parser.yy"
     {
             if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, (yyvsp[(2) - (2)].distribution))) != MEMCACHED_SUCCESS)
             {
@@ -1648,7 +1645,7 @@ yyreduce:
   case 18:
 
 /* Line 1464 of yacc.c  */
-#line 234 "libmemcached/options/parser.yy"
+#line 232 "libmemcached/options/parser.yy"
     {
             if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, (yyvsp[(2) - (4)].distribution))) != MEMCACHED_SUCCESS)
             {
@@ -1664,7 +1661,7 @@ yyreduce:
   case 19:
 
 /* Line 1464 of yacc.c  */
-#line 245 "libmemcached/options/parser.yy"
+#line 243 "libmemcached/options/parser.yy"
     {
             if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_HASH, (yyvsp[(2) - (2)].hash))) != MEMCACHED_SUCCESS)
             {
@@ -1676,7 +1673,7 @@ yyreduce:
   case 20:
 
 /* Line 1464 of yacc.c  */
-#line 252 "libmemcached/options/parser.yy"
+#line 250 "libmemcached/options/parser.yy"
     {
             if ((context->rc= memcached_behavior_set(context->memc, (yyvsp[(1) - (2)].behavior), (yyvsp[(2) - (2)].number))) != MEMCACHED_SUCCESS)
             {
@@ -1688,7 +1685,7 @@ yyreduce:
   case 21:
 
 /* Line 1464 of yacc.c  */
-#line 259 "libmemcached/options/parser.yy"
+#line 257 "libmemcached/options/parser.yy"
     {
             if ((context->rc= memcached_behavior_set(context->memc, (yyvsp[(1) - (1)].behavior), true)) != MEMCACHED_SUCCESS)
             {
@@ -1700,7 +1697,7 @@ yyreduce:
   case 22:
 
 /* Line 1464 of yacc.c  */
-#line 266 "libmemcached/options/parser.yy"
+#line 264 "libmemcached/options/parser.yy"
     {
           ;}
     break;
@@ -1708,88 +1705,88 @@ yyreduce:
   case 23:
 
 /* Line 1464 of yacc.c  */
-#line 272 "libmemcached/options/parser.yy"
+#line 270 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS;
           ;}
     break;
 
   case 24:
 
 /* Line 1464 of yacc.c  */
-#line 276 "libmemcached/options/parser.yy"
+#line 274 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT;
           ;}
     break;
 
   case 25:
 
 /* Line 1464 of yacc.c  */
-#line 280 "libmemcached/options/parser.yy"
+#line 278 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK;
           ;}
     break;
 
   case 26:
 
 /* Line 1464 of yacc.c  */
-#line 284 "libmemcached/options/parser.yy"
+#line 282 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK;
           ;}
     break;
 
   case 27:
 
 /* Line 1464 of yacc.c  */
-#line 288 "libmemcached/options/parser.yy"
+#line 286 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH;
           ;}
     break;
 
   case 28:
 
 /* Line 1464 of yacc.c  */
-#line 292 "libmemcached/options/parser.yy"
+#line 290 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_POLL_TIMEOUT;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS;
           ;}
     break;
 
   case 29:
 
 /* Line 1464 of yacc.c  */
-#line 296 "libmemcached/options/parser.yy"
+#line 294 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_RCV_TIMEOUT;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_POLL_TIMEOUT;
           ;}
     break;
 
   case 30:
 
 /* Line 1464 of yacc.c  */
-#line 300 "libmemcached/options/parser.yy"
+#line 298 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_RETRY_TIMEOUT;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_RCV_TIMEOUT;
           ;}
     break;
 
   case 31:
 
 /* Line 1464 of yacc.c  */
-#line 304 "libmemcached/options/parser.yy"
+#line 302 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_RETRY_TIMEOUT;
           ;}
     break;
 
   case 32:
 
 /* Line 1464 of yacc.c  */
-#line 308 "libmemcached/options/parser.yy"
+#line 306 "libmemcached/options/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_SND_TIMEOUT;
           ;}
@@ -1798,7 +1795,7 @@ yyreduce:
   case 33:
 
 /* Line 1464 of yacc.c  */
-#line 312 "libmemcached/options/parser.yy"
+#line 310 "libmemcached/options/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE;
           ;}
@@ -1807,7 +1804,7 @@ yyreduce:
   case 34:
 
 /* Line 1464 of yacc.c  */
-#line 316 "libmemcached/options/parser.yy"
+#line 314 "libmemcached/options/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE;
           ;}
@@ -1816,108 +1813,108 @@ yyreduce:
   case 35:
 
 /* Line 1464 of yacc.c  */
-#line 323 "libmemcached/options/parser.yy"
+#line 321 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_BINARY_PROTOCOL;
           ;}
     break;
 
   case 36:
 
 /* Line 1464 of yacc.c  */
-#line 327 "libmemcached/options/parser.yy"
+#line 325 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_BINARY_PROTOCOL;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_BUFFER_REQUESTS;
           ;}
     break;
 
   case 37:
 
 /* Line 1464 of yacc.c  */
-#line 331 "libmemcached/options/parser.yy"
+#line 329 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_BUFFER_REQUESTS;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY;
           ;}
     break;
 
   case 38:
 
 /* Line 1464 of yacc.c  */
-#line 335 "libmemcached/options/parser.yy"
+#line 333 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_NOREPLY;
           ;}
     break;
 
   case 39:
 
 /* Line 1464 of yacc.c  */
-#line 339 "libmemcached/options/parser.yy"
+#line 337 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_NOREPLY;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ;
           ;}
     break;
 
   case 40:
 
 /* Line 1464 of yacc.c  */
-#line 343 "libmemcached/options/parser.yy"
+#line 341 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_SORT_HOSTS;
           ;}
     break;
 
   case 41:
 
 /* Line 1464 of yacc.c  */
-#line 347 "libmemcached/options/parser.yy"
+#line 345 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_SORT_HOSTS;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_SUPPORT_CAS;
           ;}
     break;
 
   case 42:
 
 /* Line 1464 of yacc.c  */
-#line 351 "libmemcached/options/parser.yy"
+#line 349 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_SUPPORT_CAS;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_NODELAY;
           ;}
     break;
 
   case 43:
 
 /* Line 1464 of yacc.c  */
-#line 355 "libmemcached/options/parser.yy"
+#line 353 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_NODELAY;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_KEEPALIVE;
           ;}
     break;
 
   case 44:
 
 /* Line 1464 of yacc.c  */
-#line 359 "libmemcached/options/parser.yy"
+#line 357 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_KEEPALIVE;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_KEEPIDLE;
           ;}
     break;
 
   case 45:
 
 /* Line 1464 of yacc.c  */
-#line 363 "libmemcached/options/parser.yy"
+#line 361 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_KEEPIDLE;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_USE_UDP;
           ;}
     break;
 
   case 46:
 
 /* Line 1464 of yacc.c  */
-#line 367 "libmemcached/options/parser.yy"
+#line 365 "libmemcached/options/parser.yy"
     {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_USE_UDP;
+            (yyval.behavior)= MEMCACHED_BEHAVIOR_VERIFY_KEY;
           ;}
     break;
 
@@ -1925,161 +1922,152 @@ yyreduce:
 
 /* Line 1464 of yacc.c  */
 #line 371 "libmemcached/options/parser.yy"
-    {
-            (yyval.behavior)= MEMCACHED_BEHAVIOR_VERIFY_KEY;
-          ;}
+    { ;}
     break;
 
   case 48:
 
 /* Line 1464 of yacc.c  */
-#line 377 "libmemcached/options/parser.yy"
+#line 373 "libmemcached/options/parser.yy"
     { ;}
     break;
 
   case 49:
 
 /* Line 1464 of yacc.c  */
-#line 379 "libmemcached/options/parser.yy"
+#line 377 "libmemcached/options/parser.yy"
     { ;}
     break;
 
   case 50:
 
 /* Line 1464 of yacc.c  */
-#line 383 "libmemcached/options/parser.yy"
+#line 379 "libmemcached/options/parser.yy"
     { ;}
     break;
 
   case 51:
 
 /* Line 1464 of yacc.c  */
-#line 385 "libmemcached/options/parser.yy"
-    { ;}
-    break;
-
-  case 52:
-
-/* Line 1464 of yacc.c  */
-#line 390 "libmemcached/options/parser.yy"
+#line 384 "libmemcached/options/parser.yy"
     {
             (yyval.hash)= MEMCACHED_HASH_MD5;
           ;}
     break;
 
-  case 53:
+  case 52:
 
 /* Line 1464 of yacc.c  */
-#line 394 "libmemcached/options/parser.yy"
+#line 388 "libmemcached/options/parser.yy"
     {
             (yyval.hash)= MEMCACHED_HASH_CRC;
           ;}
     break;
 
-  case 54:
+  case 53:
 
 /* Line 1464 of yacc.c  */
-#line 398 "libmemcached/options/parser.yy"
+#line 392 "libmemcached/options/parser.yy"
     {
             (yyval.hash)= MEMCACHED_HASH_FNV1_64;
           ;}
     break;
 
-  case 55:
+  case 54:
 
 /* Line 1464 of yacc.c  */
-#line 402 "libmemcached/options/parser.yy"
+#line 396 "libmemcached/options/parser.yy"
     {
             (yyval.hash)= MEMCACHED_HASH_FNV1A_64;
           ;}
     break;
 
-  case 56:
+  case 55:
 
 /* Line 1464 of yacc.c  */
-#line 406 "libmemcached/options/parser.yy"
+#line 400 "libmemcached/options/parser.yy"
     {
             (yyval.hash)= MEMCACHED_HASH_FNV1_32;
           ;}
     break;
 
-  case 57:
+  case 56:
 
 /* Line 1464 of yacc.c  */
-#line 410 "libmemcached/options/parser.yy"
+#line 404 "libmemcached/options/parser.yy"
     {
             (yyval.hash)= MEMCACHED_HASH_FNV1A_32;
           ;}
     break;
 
-  case 58:
+  case 57:
 
 /* Line 1464 of yacc.c  */
-#line 414 "libmemcached/options/parser.yy"
+#line 408 "libmemcached/options/parser.yy"
     {
             (yyval.hash)= MEMCACHED_HASH_HSIEH;
           ;}
     break;
 
-  case 59:
+  case 58:
 
 /* Line 1464 of yacc.c  */
-#line 418 "libmemcached/options/parser.yy"
+#line 412 "libmemcached/options/parser.yy"
     {
             (yyval.hash)= MEMCACHED_HASH_MURMUR;
           ;}
     break;
 
-  case 60:
+  case 59:
 
 /* Line 1464 of yacc.c  */
-#line 422 "libmemcached/options/parser.yy"
+#line 416 "libmemcached/options/parser.yy"
     {
             (yyval.hash)= MEMCACHED_HASH_JENKINS;
           ;}
     break;
 
-  case 61:
+  case 60:
 
 /* Line 1464 of yacc.c  */
-#line 429 "libmemcached/options/parser.yy"
+#line 423 "libmemcached/options/parser.yy"
     {
             (yyval.string)= (yyvsp[(1) - (1)].string);
           ;}
     break;
 
-  case 62:
+  case 61:
 
 /* Line 1464 of yacc.c  */
-#line 433 "libmemcached/options/parser.yy"
+#line 427 "libmemcached/options/parser.yy"
     {
             (yyval.string).c_str= (yyvsp[(1) - (1)].string).c_str +1; // +1 to move use passed the initial quote
             (yyval.string).length= (yyvsp[(1) - (1)].string).length -1; // -1 removes the end quote
           ;}
     break;
 
-  case 63:
+  case 62:
 
 /* Line 1464 of yacc.c  */
-#line 441 "libmemcached/options/parser.yy"
+#line 435 "libmemcached/options/parser.yy"
     {
             (yyval.distribution)= MEMCACHED_DISTRIBUTION_CONSISTENT;
           ;}
     break;
 
-  case 64:
+  case 63:
 
 /* Line 1464 of yacc.c  */
-#line 445 "libmemcached/options/parser.yy"
+#line 439 "libmemcached/options/parser.yy"
     {
             (yyval.distribution)= MEMCACHED_DISTRIBUTION_MODULA;
           ;}
     break;
 
-  case 65:
+  case 64:
 
 /* Line 1464 of yacc.c  */
-#line 449 "libmemcached/options/parser.yy"
+#line 443 "libmemcached/options/parser.yy"
     {
             (yyval.distribution)= MEMCACHED_DISTRIBUTION_RANDOM;
           ;}
@@ -2088,7 +2076,7 @@ yyreduce:
 
 
 /* Line 1464 of yacc.c  */
-#line 2092 "libmemcached/options/parser.cc"
+#line 2080 "libmemcached/options/parser.cc"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2300,7 +2288,7 @@ yyreturn:
 
 
 /* Line 1684 of yacc.c  */
-#line 454 "libmemcached/options/parser.yy"
+#line 448 "libmemcached/options/parser.yy"
  
 
 void Context::start() 
index f25789aff6a8b24c9ee5d5d1bf7a91593eb4957f..09abf9c8150ac0b3eef2fdbd148354bb704206ff 100644 (file)
      SERVERS_OPTION = 268,
      UNKNOWN_OPTION = 269,
      UNKNOWN = 270,
-     AUTO_EJECT_HOSTS = 271,
-     BINARY_PROTOCOL = 272,
-     BUFFER_REQUESTS = 273,
-     CONNECT_TIMEOUT = 274,
-     DISTRIBUTION = 275,
-     HASH = 276,
-     HASH_WITH_PREFIX_KEY = 277,
-     IO_BYTES_WATERMARK = 278,
-     IO_KEY_PREFETCH = 279,
-     IO_MSG_WATERMARK = 280,
-     KETAMA_HASH = 281,
-     KETAMA_WEIGHTED = 282,
-     NOREPLY = 283,
-     NUMBER_OF_REPLICAS = 284,
-     POLL_TIMEOUT = 285,
-     RANDOMIZE_REPLICA_READ = 286,
-     RCV_TIMEOUT = 287,
+     BINARY_PROTOCOL = 271,
+     BUFFER_REQUESTS = 272,
+     CONNECT_TIMEOUT = 273,
+     DISTRIBUTION = 274,
+     HASH = 275,
+     HASH_WITH_PREFIX_KEY = 276,
+     IO_BYTES_WATERMARK = 277,
+     IO_KEY_PREFETCH = 278,
+     IO_MSG_WATERMARK = 279,
+     KETAMA_HASH = 280,
+     KETAMA_WEIGHTED = 281,
+     NOREPLY = 282,
+     NUMBER_OF_REPLICAS = 283,
+     POLL_TIMEOUT = 284,
+     RANDOMIZE_REPLICA_READ = 285,
+     RCV_TIMEOUT = 286,
+     REMOVE_FAILED_SERVERS = 287,
      RETRY_TIMEOUT = 288,
-     SERVER_FAILURE_LIMIT = 289,
-     SND_TIMEOUT = 290,
-     SOCKET_RECV_SIZE = 291,
-     SOCKET_SEND_SIZE = 292,
-     SORT_HOSTS = 293,
-     SUPPORT_CAS = 294,
-     _TCP_NODELAY = 295,
-     _TCP_KEEPALIVE = 296,
-     _TCP_KEEPIDLE = 297,
-     USER_DATA = 298,
-     USE_UDP = 299,
-     VERIFY_KEY = 300,
-     PREFIX_KEY = 301,
-     MD5 = 302,
-     CRC = 303,
-     FNV1_64 = 304,
-     FNV1A_64 = 305,
-     FNV1_32 = 306,
-     FNV1A_32 = 307,
-     HSIEH = 308,
-     MURMUR = 309,
-     JENKINS = 310,
-     CONSISTENT = 311,
-     MODULA = 312,
-     RANDOM = 313,
-     TRUE = 314,
-     FALSE = 315,
-     FLOAT = 316,
-     NUMBER = 317,
-     PORT = 318,
-     WEIGHT_START = 319,
-     IPADDRESS = 320,
-     HOSTNAME = 321,
-     STRING = 322,
-     QUOTED_STRING = 323,
-     FILE_PATH = 324
+     SND_TIMEOUT = 289,
+     SOCKET_RECV_SIZE = 290,
+     SOCKET_SEND_SIZE = 291,
+     SORT_HOSTS = 292,
+     SUPPORT_CAS = 293,
+     USER_DATA = 294,
+     USE_UDP = 295,
+     VERIFY_KEY = 296,
+     _TCP_KEEPALIVE = 297,
+     _TCP_KEEPIDLE = 298,
+     _TCP_NODELAY = 299,
+     PREFIX_KEY = 300,
+     MD5 = 301,
+     CRC = 302,
+     FNV1_64 = 303,
+     FNV1A_64 = 304,
+     FNV1_32 = 305,
+     FNV1A_32 = 306,
+     HSIEH = 307,
+     MURMUR = 308,
+     JENKINS = 309,
+     CONSISTENT = 310,
+     MODULA = 311,
+     RANDOM = 312,
+     TRUE = 313,
+     FALSE = 314,
+     FLOAT = 315,
+     NUMBER = 316,
+     PORT = 317,
+     WEIGHT_START = 318,
+     IPADDRESS = 319,
+     HOSTNAME = 320,
+     STRING = 321,
+     QUOTED_STRING = 322,
+     FILE_PATH = 323
    };
 #endif
 
index cf32ffca32947cb7028236497bb6705f97de07d6..9edffe13a95498f0d47d8ce5e7d6e213e408e771 100644 (file)
@@ -449,8 +449,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
        yyg->yy_c_buf_p = yy_cp;
 
 /* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
-#define YY_NUM_RULES 90
-#define YY_END_OF_BUFFER 91
+#define YY_NUM_RULES 88
+#define YY_END_OF_BUFFER 89
 /* This struct is not used in this scanner,
    but its presence is necessary. */
 struct yy_trans_info
@@ -458,92 +458,90 @@ struct yy_trans_info
        flex_int32_t yy_verify;
        flex_int32_t yy_nxt;
        };
-static yyconst flex_int16_t yy_accept[769] =
+static yyconst flex_int16_t yy_accept[747] =
     {   0,
-        0,    0,   91,   89,    5,    5,    1,   89,   89,   89,
-        2,   89,   89,   89,   89,   89,   89,   89,   89,   89,
-       89,   89,   89,   89,   89,    0,   88,   73,    0,    0,
+        0,    0,   89,   87,    5,    5,    1,   87,   87,   87,
+        2,   87,   87,   87,   87,   87,   87,   87,   87,   87,
+       87,   87,   87,   87,   87,    0,   86,   71,    0,    0,
         0,    2,    3,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    6,   73,   73,   73,   73,   73,   73,   73,   73,
-       73,   73,   73,   73,   73,   73,    4,   87,   87,    2,
-        3,   87,   78,   87,   69,   87,   87,   87,   87,   87,
-       87,   77,   87,   87,   87,   87,   87,   87,   73,   73,
-       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
-
-       73,   73,   73,   73,   73,   73,   73,   73,   73,    4,
-        0,   87,    2,    3,   87,   87,   87,   87,   87,   87,
-       87,   87,   87,   87,   87,   87,   87,   71,   73,   73,
-       73,   73,   73,   73,    0,    0,   73,   73,   73,   73,
-       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
-       73,    4,   87,   87,    3,   87,   67,   70,   72,   87,
-        0,   83,   87,   87,   87,   87,   87,   66,   87,   73,
-       73,   73,   73,   73,   73,   73,    0,    0,    0,    0,
-        0,    0,   73,   73,   73,   73,   73,    0,    0,   73,
-       73,    0,    0,   73,   73,   73,    0,    0,    0,   73,
-
-        0,   73,    4,    0,   87,    3,   87,    0,   87,   87,
-       87,   87,   75,   84,   76,   87,    0,    0,   73,   73,
-       73,   73,   73,    0,   21,    0,    0,    0,    0,    0,
-        0,    0,   73,   73,    0,    0,   73,   73,    0,    0,
-       73,   73,    0,    0,   73,    0,    0,   73,    0,    0,
-        0,    0,    0,    0,    0,    0,   73,    4,   86,   87,
-       87,   87,   87,   81,   79,   65,   85,   68,    0,    0,
-       73,   73,   73,   73,   73,    0,    0,    0,    0,    0,
-        0,    0,    0,   73,   73,    0,    0,   73,   73,    0,
-        0,    0,    0,   73,    0,    0,   73,    0,    0,   73,
-
-        0,    0,    0,    0,    0,    0,    0,    0,   73,   86,
-       87,   82,   80,    0,    0,    0,    0,    0,    0,   73,
-       73,   73,    0,    0,    0,    0,    0,    0,    0,    0,
-       30,    0,    0,    0,    0,    0,    0,   73,    0,    0,
-        0,    0,    0,    7,    0,    0,    0,    0,    0,    0,
-        0,   73,    0,    0,    0,    0,   62,    0,    0,   61,
-        0,    0,   86,   87,    0,    0,    0,    0,    0,    0,
-       73,    0,    0,   73,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,   73,    0,
+        0,    6,   71,   71,   71,   71,   71,   71,   71,   71,
+       71,   71,   71,   71,   71,    4,   85,   85,    2,    3,
+       85,   76,   85,   67,   85,   85,   85,   85,   85,   85,
+       75,   85,   85,   85,   85,   85,   85,   71,   71,   71,
+       71,   71,   71,   71,   71,   71,   71,   71,   71,   71,
+
+       71,   71,   71,   71,   71,   71,   71,    4,    0,   85,
+        2,    3,   85,   85,   85,   85,   85,   85,   85,   85,
+       85,   85,   85,   85,   85,   69,   71,   71,   71,   71,
+       71,    0,    0,   71,   71,   71,   71,   71,   71,   71,
+       71,   71,   71,   71,   71,   71,   71,   71,   71,    4,
+       85,   85,    3,   85,   65,   68,   70,   85,    0,   81,
+       85,   85,   85,   85,   85,   64,   85,   71,   71,   71,
+       71,   71,   71,    0,    0,    0,    0,    0,    0,   71,
+       71,   71,   71,   71,    0,    0,   71,   71,   71,    0,
+        0,   71,   71,   71,    0,    0,    0,   71,    0,   71,
+
+        4,    0,   85,    3,   85,    0,   85,   85,   85,   85,
+       73,   82,   74,   85,   71,   71,   71,   71,   71,    0,
+       19,    0,    0,    0,    0,    0,    0,    0,   71,   71,
+        0,    0,   71,   71,    0,    0,   71,   71,   71,    0,
+        0,   71,    0,    0,   71,    0,    0,    0,    0,    0,
+        0,    0,    0,   71,    4,   84,   85,   85,   85,   85,
+       79,   77,   63,   83,   66,   71,   71,   71,   71,   71,
+        0,    0,    0,    0,    0,    0,    0,    0,   71,   71,
+        0,    0,   71,   71,    0,    0,   71,    0,    0,   71,
+        0,    0,   71,    0,    0,   71,    0,    0,    0,    0,
+
+        0,    0,    0,    0,   71,   84,   85,   80,   78,    0,
+        0,    0,    0,   71,   71,   71,    0,    0,    0,    0,
+        0,    0,    0,    0,   28,    0,    0,    0,    0,    0,
+        0,   71,    0,    0,    0,    0,    0,    0,    7,    0,
+        0,    0,    0,    0,    0,   71,    0,    0,    0,    0,
+       60,    0,    0,   59,    0,    0,   84,   85,    0,    0,
+        0,    0,   71,    0,    0,   71,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-
+       71,    0,    0,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,   74,    0,    0,    0,    0,    0,    0,
-       73,    0,    0,   73,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,   73,    0,
+
+        0,    0,    0,    0,    0,   72,    0,    0,    0,    0,
+       71,    0,    0,   71,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,   71,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,   60,   59,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,   73,    0,    0,    0,    0,
+        0,   58,   57,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,   71,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,   48,   47,    0,    0,    0,    0,    0,    0,
 
-        0,    0,    0,    0,   50,   49,    0,    0,    0,    0,
-        0,    0,    0,    0,    9,    8,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,   73,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,   63,
-       64,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,   52,   51,    0,    0,   54,
-        0,    0,   53,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,   73,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,   38,   37,
-        0,    0,    0,    0,   44,   43,    0,    0,    0,    0,
-
-        0,   58,    0,   57,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,   20,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,   34,   33,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,   56,   55,    0,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    9,    8,    0,    0,    0,    0,    0,    0,
+        0,    0,   71,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,   61,   62,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,   40,   39,    0,    0,    0,    0,    0,    0,    0,
-        0,   13,   12,   15,   14,   17,   16,    0,    0,    0,
+        0,   50,   49,    0,    0,   52,    0,    0,   51,    0,
+        0,    0,    0,    0,    0,    0,    0,   71,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,   11,   10,   19,
+        0,    0,   36,   35,    0,    0,    0,    0,   40,   39,
+        0,    0,    0,    0,    0,   56,    0,   55,    0,    0,
+        0,    0,    0,    0,    0,    0,   18,    0,    0,    0,
 
-       18,    0,    0,    0,   27,    0,    0,   26,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,   32,   31,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,   54,
+       53,    0,    0,    0,    0,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,   29,    0,   28,    0,    0,    0,    0,    0,
-        0,   46,   48,   45,   47,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,   25,   24,   32,
-       31,    0,    0,    0,    0,   23,   22,    0,    0,    0,
-        0,    0,    0,   42,   41,   36,   35,    0
+        0,    0,    0,   38,   37,    0,    0,    0,    0,   11,
+       10,   13,   12,   15,   14,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,   17,   16,    0,    0,    0,
+       25,    0,    0,   24,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,   27,    0,
+
+       26,    0,    0,    0,    0,    0,    0,   44,   46,   43,
+       45,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,   23,   22,   30,   29,    0,    0,    0,
+        0,   21,   20,    0,    0,    0,    0,    0,    0,    0,
+        0,   34,   33,   42,   41,    0
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -590,185 +588,179 @@ static yyconst flex_int32_t yy_meta[74] =
         3,    3,    3
     } ;
 
-static yyconst flex_int16_t yy_base[773] =
+static yyconst flex_int16_t yy_base[751] =
     {   0,
-        0,  798,  802, 2094, 2094, 2094, 2094,  778,  760,  726,
+        0,  722,  724, 2044, 2044, 2044, 2044,  716,  712,  693,
        65,   72,    0,   55,   50,   57,   71,   55,   62,   72,
-       74,   78,   75,   63,  733,  716,  701,  132,  195,  103,
+       74,   78,   75,   63,  709,  701,  675,  132,  195,  103,
       208,  251,  215,  235,  228,  230,  237,  245,  265,  281,
       286,  294,  296,  311,  313,  327,  343,  354,  361,  370,
-      702, 2094,  418,   63,  305,   71,   78,   89,   78,  246,
-      291,  362,  361,   91,  113,  189,  419,  398,  483,  526,
-      490,  416,  467,  503,  508,  510,  515,  517,  543,  551,
-      558,  570,  577,  579,  591,  622,  599,  624,  209,  224,
-      254,  277,  274,  306,  210,  311,  321,  323,  342,  337,
-
-      346,  349,  353,  376,  571,  401,  407,  419,  412,  639,
-      672,  715,  758,  646,  635,  687,  670,  693,  695,  748,
-      739,  704,  750,  776,  702,  782,  791,  784,  416,  432,
-      436,  567,  469,  519,  779,  793,  524,  531,  533,  544,
-      642,  292,  629,  628,  372,  641,  685,  702,  401,  780,
-      721,  843,  856,  827,  864,  877,  879,  884,  886,  891,
-      893,  900,  906,  912,  914,  920,  936,  943,  955,  485,
-      741,  769,  769,  788,  776,  800,  818,  887,  888,  904,
-      925,  916,  929,  943,  626,  941,  936,  932,  934,  933,
-      954,  940,  941,  959,  707,  951,  957,  969,  946,  714,
-
-      948,  968, 1020, 1033, 1076, 2094, 1054, 1052, 1059, 1068,
-     1070, 1095, 1100, 1102, 1111, 1120,  987,  999,  980,  988,
-     1001, 1006, 1014, 1028, 2094, 1043, 1057, 1067, 1087, 1078,
-     1081, 1100, 1098, 1095, 1095, 1096, 1093, 1105, 1114, 1115,
-      731, 1108, 1119, 1121, 1111, 1124, 1127, 1118, 1141, 1133,
-     1144, 1137, 1150, 1152, 1156, 1157, 1139, 2094, 1207, 1180,
-     1189, 1197, 1220, 1225, 1234, 1240, 1242, 1247, 1160, 1174,
-      803,  889, 1172, 1186, 1210, 1208, 1209, 1221,  682,  657,
-     1232,  601,  590, 1213, 1011, 1232, 1234, 1252, 1237, 1235,
-     1236, 1230, 1231, 1267, 1241, 1243, 1269, 1243, 1244, 1240,
-
-     1257, 1259, 1266, 1268, 1264, 1281, 1283, 1272, 1303, 1346,
-     1331, 1317, 1325, 1290, 1292, 1284, 1285, 1303, 1305, 1308,
-     1305, 1308, 1313, 1316, 1328, 1333, 1328, 1335, 1339, 1334,
-        0, 1344, 1346, 1349, 1351, 1354, 1355, 1341, 1363, 1364,
-     1361, 1362, 1369, 2094, 1371, 1374, 1375, 1381, 1390, 1364,
-     1366, 1402, 1371, 1396, 1387, 1400, 2094, 1391, 1393, 2094,
-     1404, 1405, 1432, 1434, 1415, 1421, 1407, 1413, 1428, 1432,
-     1434, 1421, 1424, 1426, 1439, 1440,  627, 1431, 1449,  578,
-     1435, 1454, 1450, 1451, 1457, 1458, 1460, 1462, 1464, 1455,
-     1457, 1465, 1466, 1484, 1485, 1472, 1473, 1486, 1488, 1490,
-
-     1493, 1480, 1481, 1499, 1500, 1507, 1492, 1508, 1495, 1509,
-     1510, 1514, 1516, 1562, 1506, 1512, 1518, 1524, 1523, 1524,
-     1535, 1533, 1536, 1540,  615,  575, 1529, 1549, 1535, 1533,
-     1552, 1538,  611,  567, 1546, 1548, 1539, 1540, 1582, 1550,
-     1552, 1569, 1570, 1568, 1569, 1559, 1565, 1584, 1579, 1591,
-     1581, 1577, 1578, 1598, 1602, 1594, 1604, 1609, 1599, 1608,
-     1614, 2094, 2094, 1591, 1592,  566,  564, 1598, 1599, 1604,
-     1606, 1622, 1623, 1618, 1619, 1619, 1620, 1624, 1640, 1641,
-     1643, 1648, 1644, 1646, 1635, 1639, 1639, 1641,  587,  584,
-     1646, 1647, 1646, 1649, 1655, 1656, 1660, 1661, 1659, 1661,
-
-     1660, 1679, 1663, 1682, 2094, 2094, 1669, 1671, 1685, 1683,
-     1676, 1693, 1691, 1679, 2094, 2094, 1697, 1699, 1696, 1699,
-     1711, 1713, 1710, 1711, 1718, 1719, 1711, 1708, 1709, 1713,
-     1730, 1718, 1717, 1734, 1722, 1737, 1739, 1728, 1729, 2094,
-     2094, 1750, 1751,  583,  572, 1736, 1737, 1738, 1740,  558,
-      550,  553,  550,  499,  486, 2094, 2094, 1743, 1763, 2094,
-     1748, 1767, 2094, 1758, 1759, 1774, 1775, 1760, 1761, 1769,
-     1775, 1774, 1775,  509, 1786, 1788, 1789, 1776, 1785, 1797,
-     1783, 1796, 1794, 1795,  508,  502, 1796, 1797, 2094, 2094,
-     1795, 1799, 1804, 1806, 2094, 2094, 1807, 1808, 1809, 1812,
-
-     1827, 2094, 1828, 2094, 1815, 1816, 1826, 1828, 1824, 1825,
-     1842, 1843, 1829, 1831, 2094, 1850, 1851, 1845, 1861, 1864,
-     1848, 1864, 1868, 1861, 1864, 2094, 2094, 1866, 1868,  491,
-      471, 1876, 1877, 1876, 1877, 1878, 1879, 2094, 2094, 1869,
-     1875, 1885, 1886, 1880, 1882,  446,  442, 1882, 1884, 1897,
-     1901, 1898, 1909, 1900, 1906, 1912, 1903, 1914, 1918, 1921,
-     1923, 2094, 2094,  441,  381, 1908, 1909, 1910, 1913, 1921,
-     1922, 2094, 2094, 2094, 2094, 2094, 2094,  386,  378, 1918,
-     1919, 1948,  365, 1940, 1951,  349, 1942, 1952, 1953, 1955,
-     1957, 1952, 1953, 1966, 1967, 1968, 1969, 2094, 2094, 2094,
-
-     2094,  300,  284, 1957, 2094,  306, 1959, 2094,  290, 1980,
-     1983, 1985, 1987, 1980, 1981,  287,  274,  253,  252, 1982,
-     1983, 1984, 2094, 1985, 2094, 1978, 1984,  240,  200, 1992,
-     1993, 2094, 2094, 2094, 2094, 2002, 2004,  215,  196,  132,
-      120, 1992, 1994, 2005, 2009, 1994, 2000, 2094, 2094, 2094,
-     2094, 2021, 2022, 2008, 2009, 2094, 2094, 2030, 2034,  119,
-      116, 2034, 2036, 2094, 2094, 2094, 2094, 2094, 2087,  126,
-     2090,  113
+      672, 2044,  417,  305,   69,   77,   86,   75,  246,  291,
+      362,  361,   90,   75,  127,  419,  416,  482,  525,  489,
+      504,  502,  509,  511,  517,  539,  519,  560,  552,  566,
+      554,  582,  584,  595,  601,  613,  627,  180,  223,  224,
+      241,  272,  210,  275,  312,  317,  329,  321,  325,  404,
+
+      333,  356,  377,  353,  355,  418,  409,  650,  678,  721,
+      764,  685,  625,  700,  702,  714,  736,  743,  750,  777,
+      755,  784,  791,  796,  804,  668,  427,  423,  428,  410,
+      424,  786,  799,  436,  443,  476,  520,  529,  292,  519,
+      517,  525,  568,  567,  574,  580,  580,  802,  591,  857,
+      870,  709,  877,  856,  891,  893,  899,  901,  906,  916,
+      921,  923,  928,  942,  934,  950,  957,  613,  632,  629,
+      679,  678,  808,  743,  770,  768,  775,  798,  800,  891,
+      909,  641,  915,  917,  916,  920,  922,  924,  948,  934,
+      938,  957,  695,  950,  959,  968,  945,  795,  947,  966,
+
+     1019, 1032, 1075, 2044, 1053, 1051, 1058, 1067, 1069, 1094,
+     1099, 1101, 1110, 1119,  953,  973,  996, 1001,  998,  985,
+     2044,  999, 1030, 1040, 1069, 1071, 1068, 1090, 1093, 1088,
+     1089, 1092, 1090, 1102, 1107, 1108, 1117,  829, 1105, 1116,
+     1118, 1109, 1122, 1123, 1116, 1130, 1130, 1142, 1133, 1147,
+     1149, 1151, 1155, 1135, 2044, 1203, 1178, 1188, 1196, 1218,
+     1223, 1229, 1236, 1243, 1248,  833,  850, 1162, 1182, 1214,
+     1210, 1213, 1221,  663,  662, 1222,  622,  621, 1209,  869,
+     1226, 1229,  969, 1230, 1227, 1228, 1006, 1222, 1224,  640,
+     1234, 1238, 1010, 1237, 1240, 1237, 1253, 1255, 1255, 1260,
+
+     1256, 1272, 1275, 1261, 1182, 1320, 1304, 1309, 1334, 1264,
+     1267, 1283, 1284, 1288, 1293, 1300, 1304, 1305, 1307, 1311,
+     1307, 1313, 1319, 1314,    0, 1323, 1324, 1327, 1328, 1331,
+     1332, 1318, 1341, 1344, 1344, 1349, 1347, 1349, 2044, 1355,
+     1358, 1356, 1360, 1353, 1361, 1307, 1365, 1379, 1370, 1383,
+     2044, 1369, 1371, 2044, 1381, 1382, 1409, 1415, 1377, 1378,
+     1405, 1407, 1409, 1397, 1401, 1404, 1417, 1418,  648, 1409,
+     1427,  598, 1411, 1429, 1425, 1426, 1428, 1429, 1433, 1435,
+     1438, 1430, 1431, 1446, 1448, 1437, 1450, 1449, 1451, 1463,
+     1464, 1466, 1470, 1458, 1459, 1477, 1478, 1483, 1470, 1485,
+
+     1471, 1484, 1486, 1483, 1484, 1512, 1484, 1488, 1487, 1500,
+     1530, 1511, 1513, 1514,  632,  592, 1501, 1520, 1507, 1505,
+     1524, 1512,  630,  590, 1518, 1519, 1510, 1511, 1549, 1517,
+     1519, 1532, 1533, 1538, 1540, 1525, 1527, 1550, 1544, 1561,
+     1552, 1552, 1555, 1576, 1577, 1567, 1577, 1581, 1571, 1580,
+     1585, 2044, 2044, 1562, 1563, 1569, 1570, 1571, 1573, 1589,
+     1590, 1584, 1586, 1585, 1586, 1587, 1606, 1606, 1613, 1619,
+     1619, 1623, 1613, 1614, 1612, 1614,  609,  589, 1618, 1619,
+     1618, 1620, 1629, 1630, 1628, 1629, 1626, 1628, 1627, 1646,
+     1629, 1649, 2044, 2044, 1635, 1637, 1648, 1649, 1641, 1663,
+
+     1662, 1654, 2044, 2044, 1667, 1670, 1681, 1682, 1680, 1681,
+     1686, 1687, 1680, 1677, 1678, 1677, 1693, 1682, 1682, 1698,
+     1686, 1700, 1702, 1688, 1690, 2044, 2044, 1706, 1710,  583,
+      577, 1715, 1721, 1707, 1712,  576,  564,  537,  524,  476,
+      474, 2044, 2044, 1714, 1734, 2044, 1718, 1736, 2044, 1740,
+     1741, 1726, 1727, 1736, 1737, 1735, 1736,  496, 1747, 1749,
+     1751, 1737, 1745, 1754, 1741, 1749, 1748, 1749,  450,  441,
+     1753, 1758, 2044, 2044, 1776, 1778, 1767, 1770, 2044, 2044,
+     1774, 1775, 1776, 1778, 1793, 2044, 1794, 2044, 1785, 1787,
+     1783, 1784, 1800, 1801, 1787, 1789, 2044, 1805, 1806, 1795,
+
+     1812, 1815, 1800, 1816, 1822, 1816, 1822, 2044, 2044, 1824,
+     1829,  420,  372,  390,  387, 1835, 1838, 1839, 1840, 2044,
+     2044, 1839, 1840, 1834, 1835,  386,  384, 1836, 1837, 1849,
+     1850, 1847, 1854, 1846, 1852, 1858, 1849, 1860, 1861, 1863,
+     1864, 1858, 1863, 2044, 2044, 1862, 1864, 1869, 1872, 2044,
+     2044, 2044, 2044, 2044, 2044,  378,  369, 1877, 1878, 1902,
+      365, 1894, 1905,  349, 1896, 1905, 1907, 1908, 1909, 1908,
+     1909, 1911, 1913, 1914, 1915, 2044, 2044,  300,  284, 1903,
+     2044,  306, 1905, 2044,  290, 1923, 1925, 1926, 1930, 1918,
+     1924,  287,  274,  253,  252, 1933, 1938, 1941, 2044, 1944,
+
+     2044, 1937, 1938,  240,  200, 1937, 1938, 2044, 2044, 2044,
+     2044, 1956, 1957,  215,  196,  132,  120, 1946, 1947, 1961,
+     1962, 1943, 1945, 2044, 2044, 2044, 2044, 1967, 1968, 1956,
+     1957, 2044, 2044, 1976, 1977, 1961, 1962, 1981, 1986,  119,
+      116, 2044, 2044, 2044, 2044, 2044, 2037,  126, 2040,  113
     } ;
 
-static yyconst flex_int16_t yy_def[773] =
+static yyconst flex_int16_t yy_def[751] =
     {   0,
-      768,    1,  768,  768,  768,  768,  768,  769,  768,  768,
-      770,  768,  770,  770,  770,  770,  770,  770,  770,  770,
-      770,  770,  770,  770,  771,  769,  769,  768,  768,  772,
-      772,  772,  768,  772,  772,  772,  772,  772,  772,  772,
-      772,  772,  772,  772,  772,  772,  772,  772,  772,  772,
-      771,  768,   28,   53,   53,   53,   53,   53,   53,   53,
-       53,   53,   53,   53,   53,   53,  768,  772,  772,  772,
-      768,  772,  772,  772,  772,  772,  772,  772,  772,  772,
-      772,  772,  772,  772,  772,  772,  772,  772,   53,   53,
+      746,    1,  746,  746,  746,  746,  746,  747,  746,  746,
+      748,  746,  748,  748,  748,  748,  748,  748,  748,  748,
+      748,  748,  748,  748,  749,  747,  747,  746,  746,  750,
+      750,  750,  746,  750,  750,  750,  750,  750,  750,  750,
+      750,  750,  750,  750,  750,  750,  750,  750,  750,  750,
+      749,  746,   28,   53,   53,   53,   53,   53,   53,   53,
+       53,   53,   53,   53,   53,  746,  750,  750,  750,  746,
+      750,  750,  750,  750,  750,  750,  750,  750,  750,  750,
+      750,  750,  750,  750,  750,  750,  750,   53,   53,   53,
        53,   53,   53,   53,   53,   53,   53,   53,   53,   53,
 
-       53,   53,   53,   53,   53,   53,   53,   53,   53,  768,
-      772,  772,  772,  768,  772,  772,  772,  772,  772,  772,
-      772,  772,  772,  772,  772,  772,  772,  772,   53,   53,
-       53,   53,   53,   53,  768,  768,   53,   53,   53,   53,
-       53,   53,   53,   53,   53,   53,   53,   53,   53,   53,
-       53,  768,  772,  772,  768,  772,  772,  772,  772,  772,
-      772,  772,  772,  772,  772,  772,  772,  772,  772,   53,
-       53,   53,   53,   53,   53,   53,  768,  768,  768,  768,
-      768,  768,   53,   53,   53,   53,   53,  768,  768,   53,
-       53,  768,  768,   53,   53,   53,  768,  768,  768,   53,
-
-      768,   53,  768,  772,  772,  768,  772,  772,  772,  772,
-      772,  772,  772,  772,  772,  772,  768,  768,   53,   53,
-       53,   53,   53,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,   53,   53,  768,  768,   53,   53,  768,  768,
-       53,   53,  768,  768,   53,  768,  768,   53,  768,  768,
-      768,  768,  768,  768,  768,  768,   53,  768,  772,  772,
-      772,  772,  772,  772,  772,  772,  772,  772,  768,  768,
-       53,   53,   53,   53,   53,  768,  768,  768,  768,  768,
-      768,  768,  768,   53,   53,  768,  768,   53,   53,  768,
-      768,  768,  768,   53,  768,  768,   53,  768,  768,   53,
-
-      768,  768,  768,  768,  768,  768,  768,  768,   53,  772,
-      772,  772,  772,  768,  768,  768,  768,  768,  768,   53,
-       53,   53,  768,  768,  768,  768,  768,  768,  768,  768,
-       53,  768,  768,  768,  768,  768,  768,   53,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,   53,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  772,  772,  768,  768,  768,  768,  768,  768,
-       53,  768,  768,   53,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,   53,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  772,  768,  768,  768,  768,  768,  768,
-       53,  768,  768,   53,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,   53,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,   53,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,   53,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,   53,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,    0,  768,  768,
-      768,  768
+       53,   53,   53,   53,   53,   53,   53,  746,  750,  750,
+      750,  746,  750,  750,  750,  750,  750,  750,  750,  750,
+      750,  750,  750,  750,  750,  750,   53,   53,   53,   53,
+       53,  746,  746,   53,   53,   53,   53,   53,   53,   53,
+       53,   53,   53,   53,   53,   53,   53,   53,   53,  746,
+      750,  750,  746,  750,  750,  750,  750,  750,  750,  750,
+      750,  750,  750,  750,  750,  750,  750,   53,   53,   53,
+       53,   53,   53,  746,  746,  746,  746,  746,  746,   53,
+       53,   53,   53,   53,  746,  746,   53,   53,   53,  746,
+      746,   53,   53,   53,  746,  746,  746,   53,  746,   53,
+
+      746,  750,  750,  746,  750,  750,  750,  750,  750,  750,
+      750,  750,  750,  750,   53,   53,   53,   53,   53,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,   53,   53,
+      746,  746,   53,   53,  746,  746,   53,   53,   53,  746,
+      746,   53,  746,  746,   53,  746,  746,  746,  746,  746,
+      746,  746,  746,   53,  746,  750,  750,  750,  750,  750,
+      750,  750,  750,  750,  750,   53,   53,   53,   53,   53,
+      746,  746,  746,  746,  746,  746,  746,  746,   53,   53,
+      746,  746,   53,   53,  746,  746,   53,  746,  746,   53,
+      746,  746,   53,  746,  746,   53,  746,  746,  746,  746,
+
+      746,  746,  746,  746,   53,  750,  750,  750,  750,  746,
+      746,  746,  746,   53,   53,   53,  746,  746,  746,  746,
+      746,  746,  746,  746,   53,  746,  746,  746,  746,  746,
+      746,   53,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,   53,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  750,  750,  746,  746,
+      746,  746,   53,  746,  746,   53,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+       53,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+
+      746,  746,  746,  746,  746,  750,  746,  746,  746,  746,
+       53,  746,  746,   53,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,   53,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,   53,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,   53,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,   53,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,    0,  746,  746,  746,  746
     } ;
 
-static yyconst flex_int16_t yy_nxt[2168] =
+static yyconst flex_int16_t yy_nxt[2118] =
     {   0,
         4,    5,    6,    7,    8,    4,    7,    9,    4,   10,
        11,   11,   11,   11,   11,   11,   11,   12,    7,    4,
@@ -781,236 +773,231 @@ static yyconst flex_int16_t yy_nxt[2168] =
        32,   32,   33,   33,   33,   33,   33,   33,   33,   34,
        37,   39,   35,   41,   38,   42,   43,   44,   47,   49,
 
-       50,   36,   48,   89,   40,   92,   93,   30,   45,   94,
-       30,   30,   95,  107,   46,   68,   34,   37,   39,   35,
+       50,   36,   48,   90,   40,   91,   92,   30,   45,   93,
+       30,   30,  105,  106,   46,   67,   34,   37,   39,   35,
        41,   38,   42,   43,   44,   47,   49,   50,   30,   48,
-       89,   40,   92,   93,  765,   45,   94,  764,  751,   95,
-      107,   46,   53,   53,   53,   53,   53,   53,   53,   30,
-      750,  108,   54,   55,   56,   57,   53,   53,   53,   58,
-       59,   53,   53,   53,   53,   60,   53,   61,   53,   62,
-       63,   64,   65,   66,   53,   53,   53,   53,  108,   54,
-       55,   56,   57,   53,   53,   53,   58,   59,   53,   53,
-       53,   53,   60,   53,   61,   53,   62,   63,   64,   65,
-
-       66,   53,   53,   53,   53,   67,   67,   67,   67,   67,
-       67,   67,   30,  109,  749,   30,   30,  135,   69,   69,
-       69,   69,   69,   69,   69,   71,   71,   71,   71,   71,
-       71,   71,   30,  748,   30,   30,   30,   30,   30,   30,
-      109,   30,   30,   30,   30,   30,  743,  742,  129,   30,
-       73,   74,   30,   30,   30,   30,  136,  130,   30,   31,
-       75,   70,   70,   70,   70,   70,   70,   70,   72,   30,
-      735,  734,   30,   30,   30,  129,   30,   73,   74,  131,
-       96,   30,   76,   30,  130,   30,   97,   75,   30,   30,
-       30,   30,  733,   30,   30,   72,   77,   30,   30,  188,
-
-       30,   30,   30,   30,   30,  732,  131,   96,  725,   76,
-      132,   30,  133,   97,   79,   30,   80,   30,   30,   30,
-       30,   30,   78,   77,  723,   98,   82,   30,   99,   81,
-      721,   30,   30,   90,   30,   30,   83,  132,  189,  133,
-       30,   79,   30,   80,  134,   91,  720,   30,  137,   78,
-       30,   30,   98,  138,  139,   99,   81,   30,   30,   30,
-       90,   30,   30,   83,   84,   30,  140,  708,   30,   30,
-      141,  134,   91,   30,   30,  137,   85,   30,   30,  192,
-      138,  139,  100,  705,  101,  103,  102,  142,  143,   30,
-      144,   84,   86,  140,  104,  105,  701,  141,   87,  145,
-
-       30,  106,   30,   85,  700,   30,   30,   30,  197,  100,
-       88,  101,  103,  102,  142,  143,   30,  144,  193,   86,
-       30,  104,  105,   30,   30,   87,  145,  693,  106,  110,
-      110,  110,  110,  110,  110,  110,  148,   88,   53,   53,
-       53,   53,  149,  150,   30,   53,   53,  198,  692,  151,
-      170,   53,  171,   53,  115,   53,   53,   53,   53,   53,
-      677,  172,   30,  148,  676,   53,   53,   53,   53,  149,
-      150,   30,   53,   53,   30,   30,  151,  170,   53,  171,
-       53,  115,   53,   53,   53,   53,   53,   30,  172,  663,
-       30,  111,  217,  112,  112,  112,  112,  112,  112,  112,
-
-      114,  114,  114,  114,  114,  114,  114,   30,  175,  662,
-       30,   30,   30,   30,   30,   30,   30,   30,   30,   30,
-      627,   30,   30,   30,   30,   30,  626,  615,  119,   30,
-       30,  218,  600,   30,   31,  175,  113,  113,  113,  113,
-      113,  113,  113,  116,  117,  599,  176,   30,  183,   30,
-       30,   30,  184,  118,   30,   30,   30,  598,   30,   30,
-      597,   30,   30,   30,  185,   30,   30,  120,  596,  186,
-      116,  117,   30,  176,   30,  183,  595,   30,   30,  184,
-      118,   30,  121,   30,   30,   30,   30,   30,  122,   30,
-      590,  185,  173,  146,  120,   30,  186,   30,   30,   30,
-
-      174,  589,  541,   30,   30,  540,   30,   30,  147,  121,
-      518,  124,  517,  486,  125,  122,   30,  123,  485,  173,
-      146,  478,  477,   30,  430,   30,   30,  174,   30,   30,
-       30,   30,   30,  235,  427,  147,  330,   30,  124,   30,
-      127,  125,   30,   30,  123,   30,  126,  329,  128,  152,
-      152,  152,  152,  152,  152,  152,  155,  155,  155,  155,
-      155,  155,  155,  156,  327,  187,  190,  127,   30,  191,
-       30,  194,  236,  126,   30,  128,   30,   30,   30,   30,
-       30,   30,  153,  153,  153,  153,  153,  153,  153,  326,
-      156,   30,  187,  190,   30,   30,  191,   30,  194,   30,
-
-       30,   30,   30,   30,   52,   27,   30,  158,   30,   30,
-       30,   30,   30,  157,  246,  160,   30,  159,   30,   30,
-       27,  254,   30,  111,  195,  154,  154,  154,  154,  154,
-      154,  154,  164,   30,  158,   52,  167,  196,  292,   30,
-      157,  161,  160,   30,  159,   29,   30,   30,   30,  202,
-       30,  195,   30,  247,   30,   30,   30,   30,   30,  164,
-      255,   30,   30,  167,  196,   30,   30,   28,  113,  113,
-      113,  113,  113,  113,  113,  162,  202,  293,  219,  163,
-       30,  165,   27,   30,   30,   30,   30,  199,   30,   30,
-       30,   30,   30,  220,   30,   30,   30,  221,   30,   30,
-
-      177,  768,  162,   25,   30,  219,  163,  224,  165,  178,
-      316,  179,  222,  223,  180,  169,  166,  200,  225,  768,
-      220,  168,   30,  181,  221,  182,  201,  177,   30,  768,
-       30,   30,  768,  768,   30,  111,  178,   30,  179,  222,
-      223,  180,  169,  166,  200,  768,  226,  768,  168,  317,
-      181,  768,  182,  203,  203,  203,  203,  203,  203,  203,
-       30,  768,  227,   30,  204,  768,  205,  205,  205,  205,
-      205,  205,  205,   30,  206,  206,  206,  206,  206,  206,
-      206,   30,  768,   30,   30,   30,   30,   30,   30,  227,
-       30,   30,   30,   30,   30,   30,  318,   30,   30,   30,
-
-       30,   30,   30,  768,   30,  768,  209,   30,   30,  210,
-       30,  228,  768,   30,   30,  207,   30,  768,   30,   30,
-       30,   30,   30,   30,   30,   30,  229,   30,   30,  211,
-       30,  768,   30,  768,  213,  319,  768,  208,  228,   30,
-       30,  768,  207,   30,   30,  212,   30,   30,  230,  231,
-       30,   30,   30,  229,  232,  768,  211,  214,   30,   30,
-       30,  213,   30,   30,  233,  768,   30,  234,  215,  237,
-      238,  239,  212,  240,  768,  230,  231,  241,  242,  243,
-      244,  232,   30,  245,  214,  248,  253,  249,  256,   30,
-      250,  233,  216,  257,  234,  215,  237,  238,  239,  251,
-
-      240,   30,  252,  768,  241,  242,  243,  244,  768,  768,
-      245,  269,  248,  253,  249,  256,  768,  250,  332,  216,
-      257,  768,  768,  270,  271,  272,  251,  273,  274,  252,
-      258,  258,  258,  258,  258,  258,  258,   30,  269,  768,
-       30,   30,  275,  259,  259,  259,  259,  259,  259,  259,
-      270,  271,  272,  768,  273,  274,   30,  333,   30,   30,
-       30,   30,   30,   30,  768,  262,   30,   30,  263,  275,
-      276,  264,   30,  768,   30,   30,   30,   30,   30,   30,
-       30,  768,  265,   30,  204,  277,  260,  260,  260,  260,
-      260,  260,  260,  261,  266,  768,  278,  276,   30,   30,
-
-       30,  768,   30,   30,   30,   30,   30,   30,   30,   30,
-       30,  279,  277,  280,   30,   30,   30,  281,   30,   30,
-      261,  266,   30,  278,   30,  282,  283,   30,   30,  284,
-      768,  768,  285,  267,  286,  287,  288,  289,  279,  768,
-      280,   30,  290,  291,  281,  294,   30,  295,   30,  296,
-      297,  298,  282,  283,  299,  300,  284,   30,  268,  285,
-      267,  286,  287,  288,  289,  301,   30,  302,  303,  290,
-      291,  304,  294,  305,  295,  306,  296,  297,  298,  307,
-      308,  299,  300,  309,   30,  268,  768,   30,  204,  314,
-      768,  768,  301,   30,  302,  303,   30,   30,  304,  768,
-
-      305,   30,  306,  315,   30,   30,  307,  308,  768,  312,
-      309,   30,  320,  311,   30,   30,  314,  310,  310,  310,
-      310,  310,  310,  310,   30,  321,   30,   30,   30,   30,
-      315,  322,   30,   30,  313,   30,  323,  324,   30,  320,
-      311,   30,   30,   30,   30,  325,   30,   30,   30,   30,
-       30,   30,  321,   30,   30,   30,  328,  331,  322,  336,
-      334,  768,  335,  323,  324,  338,   30,  339,  340,  341,
-      342,   30,  325,  346,  343,  347,  348,  350,  351,  352,
-       30,  353,  354,  328,  331,  344,   30,  334,   30,  335,
-      355,  356,  338,   30,  339,  340,  341,  342,  337,  357,
-
-      346,  358,  347,  359,  350,  351,  352,  360,  353,  354,
-      361,  768,  372,  345,  365,  349,  366,  355,  356,  367,
-      368,   30,  768,  768,   30,   30,  357,  768,  358,   30,
-      359,  768,   30,   30,  360,   30,  768,  768,   30,   30,
-      369,  365,  370,  366,  768,  371,  367,  368,  374,  362,
-       30,  373,  375,   30,   30,  376,  363,  363,  363,  363,
-      363,  363,  363,   30,  364,  768,  377,  369,  378,  370,
-      379,   30,  371,  380,  381,  374,  382,   30,  383,  375,
-      384,  385,  376,  386,  387,  388,  389,  390,  391,  392,
-      393,  364,   30,  377,  394,  378,  395,  379,  396,  397,
-
-      380,  381,  402,  382,  403,  383,  406,  384,  385,  404,
-      386,  387,  388,  389,  390,  391,  392,  393,  398,  399,
-      407,  394,  408,  395,  409,  396,  397,  400,  401,  402,
-      410,  403,  411,  406,  412,  413,   30,  415,   30,   30,
-       30,   30,   30,  416,  417,  398,  399,  407,  405,  408,
-      418,  409,  419,  768,  400,  401,  420,  410,  421,  411,
-      422,  412,  413,  423,  415,  424,  425,  426,  428,  429,
-      416,  417,  431,  414,  432,  433,  434,  418,   30,  419,
-       30,  435,  436,  420,  437,  421,  438,  422,  439,  440,
-      423,  441,  424,  425,  426,  428,  429,  442,  443,  431,
-
-      414,  432,  433,  434,  444,  445,  446,  447,  435,  436,
-      448,  437,  449,  438,  450,  439,  440,  451,  441,  452,
-      453,  454,  455,  458,  442,  443,  461,  456,  459,  462,
-      463,  444,  445,  446,  447,  457,  460,  448,  464,  449,
-      465,  450,  472,  768,  451,  466,  452,  453,  454,  455,
-      458,  467,  468,  461,  456,  459,  462,  463,  469,  470,
-      471,  474,  457,  460,  475,  464,   30,  465,  476,   30,
-       30,  479,  466,  480,  481,  482,  483,  484,  467,  468,
-      487,  473,  488,  489,  490,  469,  470,  471,  474,  491,
-      493,  475,  494,  495,  496,  476,  497,  498,  479,  499,
-
-      480,  481,  482,  483,  484,  500,  501,  487,   30,  488,
-      489,  490,  502,  503,  504,  505,  506,  493,  507,  494,
-      495,  496,  508,  497,  498,  509,  499,  510,  492,  511,
-      512,  513,  500,  501,  514,  515,  516,  519,  520,  502,
-      503,  504,  505,  506,  521,  507,  522,  523,  524,  508,
-      525,  526,  509,  527,  510,  528,  511,  512,  513,  529,
-      530,  514,  515,  516,  519,  520,  531,  532,  533,  534,
-      535,  521,  536,  522,  523,  524,  537,  525,  526,  538,
-      527,  539,  528,  542,  543,  544,  529,  530,  545,  546,
-      547,  548,  549,  531,  532,  533,  534,  535,  550,  536,
-
-      551,  552,  553,  537,  554,  555,  538,  556,  539,  557,
-      542,  543,  544,  558,  559,  545,  546,  547,  548,  549,
-      560,  561,  562,  563,  564,  550,  565,  551,  552,  553,
-      566,  554,  555,  567,  556,  568,  557,  569,  570,  571,
-      558,  559,  572,  573,  574,  575,  576,  560,  561,  562,
-      563,  564,  577,  565,  578,  579,  580,  566,  581,  582,
-      567,  583,  568,  584,  569,  570,  571,  585,  586,  572,
-      573,  574,  575,  576,  587,  588,  591,  592,  593,  577,
-      594,  578,  579,  580,  601,  581,  582,  602,  583,  603,
-      584,  604,  605,  606,  585,  586,  607,  608,  609,  610,
-
-      611,  587,  588,  591,  592,  593,  612,  594,  613,  614,
-      616,  601,  617,  618,  602,  619,  603,  620,  604,  605,
-      606,  621,  622,  607,  608,  609,  610,  611,  623,  624,
-      625,  628,  629,  612,  630,  613,  614,  616,  631,  617,
-      618,  632,  619,  633,  620,  634,  635,  636,  621,  622,
-      637,  638,  639,  640,  641,  623,  624,  625,  628,  629,
-      642,  630,  643,  644,  645,  631,  646,  647,  632,  648,
-      633,  649,  634,  635,  636,  650,  651,  637,  638,  639,
-      640,  641,  652,  653,  654,  655,  656,  642,  657,  643,
-      644,  645,  658,  646,  647,  659,  648,  660,  649,  661,
-
-      664,  665,  650,  651,  666,  667,  668,  669,  670,  652,
-      653,  654,  655,  656,  671,  657,  672,  673,  674,  658,
-      675,  678,  659,  679,  660,  680,  661,  664,  665,  681,
-      682,  666,  667,  668,  669,  670,  683,  684,  685,  686,
-      687,  671,  688,  672,  673,  674,  689,  675,  678,  690,
-      679,  691,  680,  694,  695,  696,  681,  682,  697,  698,
-      699,  702,  703,  683,  684,  685,  686,  687,  704,  688,
-      706,  707,  709,  689,  710,  711,  690,  712,  691,  713,
-      694,  695,  696,  714,  715,  697,  698,  699,  702,  703,
-      716,  717,  718,  719,  722,  704,  724,  706,  707,  709,
-
-      726,  710,  711,  727,  712,  728,  713,  729,  730,  731,
-      714,  715,  736,  737,  738,  739,  740,  716,  717,  718,
-      719,  722,  741,  724,  744,  745,  746,  726,  747,  752,
-      727,  753,  728,  754,  729,  730,  731,  755,  756,  736,
-      737,  738,  739,  740,  757,  758,  759,  760,  761,  741,
-      762,  744,  745,  746,  763,  747,  752,  766,  753,  767,
-      754,  768,  768,  768,  755,  756,  768,  768,  768,  768,
-      768,  757,  758,  759,  760,  761,  768,  762,  768,  768,
-      768,  763,  768,  768,  766,  768,  767,   26,  768,   26,
-       51,   51,   51,    3,  768,  768,  768,  768,  768,  768,
-
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768
+       90,   40,   91,   92,  745,   45,   93,  744,  727,  105,
+      106,   46,   53,   53,   53,   53,   53,   53,   53,   30,
+      726,  107,   53,   54,   55,   56,   53,   53,   53,   57,
+       58,   53,   53,   53,   53,   59,   53,   60,   53,   61,
+       62,   63,   64,   65,   53,   53,   53,   53,  107,   53,
+       54,   55,   56,   53,   53,   53,   57,   58,   53,   53,
+       53,   53,   59,   53,   60,   53,   61,   62,   63,   64,
+
+       65,   53,   53,   53,   53,   66,   66,   66,   66,   66,
+       66,   66,   30,  127,  725,   30,   30,  132,   68,   68,
+       68,   68,   68,   68,   68,   70,   70,   70,   70,   70,
+       70,   70,   30,  724,   30,   30,   30,   30,   30,   30,
+      127,   30,   30,   30,   30,   30,  719,  718,  128,   30,
+       72,   73,   30,   30,   30,   30,  133,  129,   30,   31,
+       74,   69,   69,   69,   69,   69,   69,   69,   71,   30,
+      711,  710,   30,   30,   30,  128,   30,   72,   73,  130,
+       94,   30,   75,   30,  129,   30,   95,   74,   30,   30,
+       30,   30,  709,   30,   30,   71,   76,   30,   30,  185,
+
+       30,   30,   30,   30,   30,  708,  130,   94,  701,   75,
+      131,   30,  134,   95,   78,   30,   79,   30,   30,   30,
+       30,   30,   77,   76,  699,   96,   81,   30,   97,   80,
+      697,   30,   30,   88,   30,   30,   82,  131,  186,  134,
+       30,   78,   30,   79,  135,   89,  696,   30,  136,   77,
+       30,   30,   96,  137,  138,   97,   80,   30,   30,   30,
+       88,   30,   30,   82,   83,   30,  139,  684,   30,   30,
+      142,  135,   89,   30,   30,  136,   84,   30,   30,  143,
+      137,  138,   98,  681,   99,  101,  100,  677,  146,   30,
+      147,   83,   85,  139,  102,  103,  676,  142,   86,  144,
+
+       30,  104,  655,   84,  654,  645,  143,   30,  644,   98,
+       87,   99,  101,  100,  145,  146,   30,  147,  643,   85,
+       30,  102,  103,   30,   30,   86,  144,  642,  104,  108,
+      108,  108,  108,  108,  108,  108,  140,   87,   53,   53,
+       53,  145,  148,  141,   53,   53,  149,  168,  169,  172,
+       53,  173,   53,  170,   53,   53,   53,   53,   53,  609,
+      180,  171,   30,  140,  181,   53,   53,   53,  608,  148,
+      141,   53,   53,  149,  168,  169,  172,   53,  173,   53,
+      170,   53,   53,   53,   53,   53,   30,  180,  171,   30,
+      109,  181,  110,  110,  110,  110,  110,  110,  110,  112,
+
+      112,  112,  112,  112,  112,  112,   30,  182,   30,   30,
+       30,   30,   30,   30,  597,   30,   30,   30,   30,   30,
+      584,   30,  583,   30,   30,   30,   30,   30,   30,   30,
+      117,  582,   30,   31,  182,  111,  111,  111,  111,  111,
+      111,  111,  113,   30,  581,  183,   30,   30,   30,  114,
+       30,  115,  184,  187,  188,   30,   30,   30,   30,   30,
+       30,   30,   30,   30,   30,   30,  189,   30,   30,  113,
+       30,   30,  183,   30,   30,  190,  114,  116,  115,  184,
+      187,  188,  580,  119,  118,   30,   30,  195,   30,   30,
+       30,   30,   30,  189,  579,  574,  120,  192,   30,   30,
+
+       30,  573,   30,   30,  116,   30,   30,  527,   30,   30,
+      119,  118,   30,  193,  191,  194,  122,   30,  123,  200,
+       30,   30,  121,  120,  192,  124,  196,  526,   30,   30,
+       30,   30,   30,   30,   30,   30,  474,  473,  466,  465,
+      193,   30,  194,  122,  420,  123,  200,   30,  231,  121,
+      215,  126,  124,  154,  125,  417,  216,  217,  339,   30,
+      150,  150,  150,  150,  150,  150,  150,  324,  323,  321,
+      320,   30,   30,   30,   52,   30,   30,  215,  126,   27,
+      154,  125,   30,  216,  217,   30,   30,  232,  151,  151,
+      151,  151,  151,  151,  151,  153,  153,  153,  153,  153,
+
+      153,  153,  243,  218,   30,   27,   30,   30,   30,   30,
+       30,   52,   29,   30,   30,  219,   30,  109,   30,   28,
+       27,   30,   30,  746,   30,   30,  155,   25,   30,  109,
+      218,  152,  152,  152,  152,  152,  152,  152,  157,  156,
+       30,  244,  219,   30,   30,  746,   30,   30,   30,  746,
+       30,   30,  746,  155,   30,   30,  158,   30,   30,   30,
+       30,  746,   30,   30,  746,  157,  156,   30,   30,  746,
+      160,   30,   30,  746,  111,  111,  111,  111,  111,  111,
+      111,   30,  159,  158,   30,   30,  163,  223,   30,   30,
+      161,   30,   30,  746,  224,   30,   30,  160,   30,   30,
+
+       30,   30,  251,   30,   30,  162,  225,  174,   30,  197,
+       30,   30,   30,  163,  223,  220,  175,  161,  176,  226,
+      177,  224,  227,   30,  164,  165,  221,  746,  167,  178,
+       30,  179,  162,  225,  174,  166,  288,   30,  228,  198,
+      310,  252,   30,  175,  746,  176,  226,  177,  199,  227,
+       30,  164,  165,  746,  222,  167,  178,  312,  179,  746,
+       30,  746,  166,   30,   30,  228,  198,  201,  201,  201,
+      201,  201,  201,  201,   30,  289,  326,   30,  202,  311,
+      203,  203,  203,  203,  203,  203,  203,  204,  204,  204,
+      204,  204,  204,  204,  205,   30,  313,   30,   30,   30,
+
+       30,   30,   30,   30,  746,   30,   30,   30,   30,   30,
+       30,  746,  746,   30,   30,  327,   30,  746,  746,  207,
+       30,  205,  208,   30,   30,   30,  229,   30,   30,   30,
+       30,   30,   30,  230,  746,   30,   30,   30,   30,   30,
+      746,   30,   30,  233,  209,   30,   30,  206,  211,   30,
+       30,  234,   30,  229,   30,  235,  210,   30,   30,  236,
+      230,   30,   30,  237,   30,   30,  213,   30,  238,   30,
+      233,  209,  239,  240,   30,  211,  330,  241,  234,  212,
+       30,  242,  235,  210,  245,  250,  236,  253,   30,  246,
+      237,  254,  247,  213,  214,  238,   30,  266,  248,  239,
+
+      240,  249,  746,   30,  241,  746,  212,  746,  242,  746,
+      267,  245,  250,  335,  253,  331,  246,  342,  254,  247,
+      746,  214,  268,  269,  266,  248,  270,  271,  249,  255,
+      255,  255,  255,  255,  255,  255,   30,  267,  746,   30,
+       30,  272,  256,  256,  256,  256,  256,  256,  256,  268,
+      269,  746,  336,  270,  271,   30,  343,   30,   30,   30,
+       30,   30,   30,  746,  259,   30,   30,  260,  272,  273,
+      261,   30,  746,   30,   30,   30,   30,   30,   30,   30,
+      746,  262,   30,  202,  274,  257,  257,  257,  257,  257,
+      257,  257,  258,  263,  746,  275,  273,   30,   30,   30,
+
+      746,   30,   30,   30,   30,   30,   30,   30,   30,   30,
+      276,  274,  277,   30,   30,   30,  278,   30,   30,  258,
+      263,   30,  275,   30,  279,  280,   30,   30,  281,  746,
+      746,  282,  264,  283,  284,  285,  286,  276,  746,  277,
+       30,  287,  290,  278,  291,   30,  292,   30,  293,  294,
+      295,  279,  280,  296,  297,  281,   30,  265,  282,  264,
+      283,  284,  285,  286,  298,   30,  299,  300,  287,  290,
+      301,  291,  302,  292,  303,  293,  294,  295,  304,  305,
+      296,  297,   30,  746,  265,   30,  202,  746,  746,  355,
+      746,  298,   30,  299,  300,   30,   30,  301,  746,  302,
+
+       30,  303,  314,   30,   30,  304,  305,   30,  308,  746,
+       30,   30,  307,  306,  306,  306,  306,  306,  306,  306,
+      746,  315,   30,  746,   30,   30,   30,   30,  356,  314,
+       30,   30,  309,   30,   30,  316,   30,   30,  317,  307,
+       30,  318,   30,   30,   30,  319,  322,   30,  315,   30,
+       30,   30,   30,  325,  328,   30,   30,  329,  332,  333,
+      334,  337,  316,  338,   30,  317,  340,  746,  318,   30,
+      341,  344,  319,  322,  345,   30,  346,  347,  348,  349,
+      325,  328,   30,  350,  329,  332,  333,  334,  337,   30,
+      338,  351,  352,  340,   30,  353,  354,  341,  344,  359,
+
+      364,  345,  360,  346,  347,  348,  349,  746,   30,  746,
+      350,   30,   30,   30,  396,  746,   30,   30,  351,  352,
+      361,  362,  353,  354,   30,  363,  359,   30,   30,  360,
+      357,  357,  357,  357,  357,  357,  357,  358,   30,  365,
+      366,   30,   30,  367,  368,  369,  370,  361,  362,  371,
+       30,  372,  363,  397,  373,   30,  374,  375,  376,  377,
+      378,  379,  380,  381,  358,  382,   30,  366,  383,  384,
+      367,  368,  369,  370,  385,  386,  371,  387,  372,  388,
+       30,  373,  389,  374,  375,  376,  377,  378,  379,  380,
+      381,  394,  382,  390,  391,  383,  384,  392,  393,  395,
+
+      398,  385,  386,  399,  387,  400,  388,  401,  402,  389,
+      403,  404,  405,   30,  407,  408,   30,   30,  394,   30,
+      390,  391,   30,   30,  392,  393,  395,  398,  746,  409,
+      399,  410,  400,  411,  401,  402,  412,  403,  404,  405,
+      413,  407,  408,  414,  415,  416,  418,  419,  421,  422,
+      423,  424,  425,  426,  406,   30,  409,  427,  410,  428,
+      411,   30,  429,  412,  430,  431,  432,  413,  433,  434,
+      414,  415,  416,  418,  419,  421,  422,  423,  424,  425,
+      426,  406,  435,  436,  427,  437,  428,  438,  439,  429,
+      440,  430,  431,  432,  441,  433,  434,  442,  443,  444,
+
+      445,  448,  451,  446,  452,  449,  453,  454,  455,  435,
+      436,  447,  437,  450,  438,  439,   30,  440,  456,   30,
+       30,  441,  457,  458,  442,  443,  444,  445,  448,  451,
+      446,  452,  449,  453,  454,  455,  459,  460,  447,  462,
+      450,  463,  464,  467,  468,  456,  469,  470,  471,  457,
+      458,  472,  475,  476,  477,  478,  479,  481,   30,  482,
+      483,  484,  485,  459,  486,  487,  462,  488,  463,  464,
+      467,  468,  489,  469,  470,  471,  461,  490,  472,  475,
+      476,  477,  478,  491,  481,  492,  482,  483,  484,  485,
+      493,  486,  487,  494,  488,  480,  495,  496,  497,  489,
+
+      498,  499,  500,  501,  490,  502,  503,  504,  505,  506,
+      491,  507,  492,  508,  509,  510,  511,  493,  512,  513,
+      494,  514,  515,  495,  496,  497,  516,  498,  499,  500,
+      501,  517,  502,  503,  504,  505,  506,  518,  507,  519,
+      508,  509,  510,  511,  520,  512,  513,  521,  514,  515,
+      522,  523,  524,  516,  525,  528,  529,  530,  517,  531,
+      532,  533,  534,  535,  518,  536,  519,  537,  538,  539,
+      540,  520,  541,  542,  521,  543,  544,  522,  523,  524,
+      545,  525,  528,  529,  530,  546,  531,  532,  533,  534,
+      535,  547,  536,  548,  537,  538,  539,  540,  549,  541,
+
+      542,  550,  543,  544,  551,  552,  553,  545,  554,  555,
+      556,  557,  546,  558,  559,  560,  561,  562,  547,  563,
+      548,  564,  565,  566,  567,  549,  568,  569,  550,  570,
+      571,  551,  552,  553,  572,  554,  555,  556,  557,  575,
+      558,  559,  560,  561,  562,  576,  563,  577,  564,  565,
+      566,  567,  578,  568,  569,  585,  570,  571,  586,  587,
+      588,  572,  589,  590,  591,  592,  575,  593,  594,  595,
+      596,  598,  576,  599,  577,  600,  601,  602,  603,  578,
+      604,  605,  585,  606,  607,  586,  587,  588,  610,  589,
+      590,  591,  592,  611,  593,  594,  595,  596,  598,  612,
+
+      599,  613,  600,  601,  602,  603,  614,  604,  605,  615,
+      606,  607,  616,  617,  618,  610,  619,  620,  621,  622,
+      611,  623,  624,  625,  626,  627,  612,  628,  613,  629,
+      630,  631,  632,  614,  633,  634,  615,  635,  636,  616,
+      617,  618,  637,  619,  620,  621,  622,  638,  623,  624,
+      625,  626,  627,  639,  628,  640,  629,  630,  631,  632,
+      641,  633,  634,  646,  635,  636,  647,  648,  649,  637,
+      650,  651,  652,  653,  638,  656,  657,  658,  659,  660,
+      639,  661,  640,  662,  663,  664,  665,  641,  666,  667,
+      646,  668,  669,  647,  648,  649,  670,  650,  651,  652,
+
+      653,  671,  656,  657,  658,  659,  660,  672,  661,  673,
+      662,  663,  664,  665,  674,  666,  667,  675,  668,  669,
+      678,  679,  680,  670,  682,  683,  685,  686,  671,  687,
+      688,  689,  690,  691,  672,  692,  673,  693,  694,  695,
+      698,  674,  700,  702,  675,  703,  704,  678,  679,  680,
+      705,  682,  683,  685,  686,  706,  687,  688,  689,  690,
+      691,  707,  692,  712,  693,  694,  695,  698,  713,  700,
+      702,  714,  703,  704,  715,  716,  717,  705,  720,  721,
+      722,  723,  706,  728,  729,  730,  731,  732,  707,  733,
+      712,  734,  735,  736,  737,  713,  738,  739,  714,  740,
+
+      741,  715,  716,  717,  742,  720,  721,  722,  723,  743,
+      728,  729,  730,  731,  732,  746,  733,  746,  734,  735,
+      736,  737,  746,  738,  739,  746,  740,  741,  746,  746,
+      746,  742,  746,  746,  746,  746,  743,   26,  746,   26,
+       51,   51,   51,    3,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746
     } ;
 
-static yyconst flex_int16_t yy_chk[2168] =
+static yyconst flex_int16_t yy_chk[2118] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -1023,236 +1010,231 @@ static yyconst flex_int16_t yy_chk[2168] =
        11,   11,   12,   12,   12,   12,   12,   12,   12,   14,
        16,   17,   14,   18,   16,   19,   20,   21,   22,   23,
 
-       24,   15,   22,   54,   17,   56,   57,   30,   21,   58,
-       30,   30,   59,   64,   21,  772,   14,   16,   17,   14,
-       18,   16,   19,   20,   21,   22,   23,   24,  770,   22,
-       54,   17,   56,   57,  761,   21,   58,  760,  741,   59,
+       24,   15,   22,   55,   17,   56,   57,   30,   21,   58,
+       30,   30,   63,   64,   21,  750,   14,   16,   17,   14,
+       18,   16,   19,   20,   21,   22,   23,   24,  748,   22,
+       55,   17,   56,   57,  741,   21,   58,  740,  717,   63,
        64,   21,   28,   28,   28,   28,   28,   28,   28,   30,
-      740,   65,   28,   28,   28,   28,   28,   28,   28,   28,
+      716,   65,   28,   28,   28,   28,   28,   28,   28,   28,
        28,   28,   28,   28,   28,   28,   28,   28,   28,   28,
        28,   28,   28,   28,   28,   28,   28,   28,   65,   28,
        28,   28,   28,   28,   28,   28,   28,   28,   28,   28,
        28,   28,   28,   28,   28,   28,   28,   28,   28,   28,
 
        28,   28,   28,   28,   28,   29,   29,   29,   29,   29,
-       29,   29,   31,   66,  739,   31,   31,   95,   31,   31,
+       29,   29,   31,   88,  715,   31,   31,   93,   31,   31,
        31,   31,   31,   31,   31,   33,   33,   33,   33,   33,
-       33,   33,   35,  738,   36,   35,   35,   36,   36,   34,
-       66,   37,   34,   34,   37,   37,  729,  728,   89,   38,
-       35,   36,   38,   38,   31,   32,   95,   90,   32,   32,
+       33,   33,   35,  714,   36,   35,   35,   36,   36,   34,
+       88,   37,   34,   34,   37,   37,  705,  704,   89,   38,
+       35,   36,   38,   38,   31,   32,   93,   90,   32,   32,
        37,   32,   32,   32,   32,   32,   32,   32,   34,   39,
-      719,  718,   39,   39,   35,   89,   36,   35,   36,   91,
-       60,   34,   38,   37,   90,   40,   60,   37,   40,   40,
-       41,   38,  717,   41,   41,   34,   39,   32,   42,  142,
-
-       43,   42,   42,   43,   43,  716,   91,   60,  709,   38,
-       92,   39,   93,   60,   41,   44,   42,   45,   44,   44,
-       45,   45,   40,   39,  706,   61,   44,   40,   61,   43,
-      703,   46,   41,   55,   46,   46,   45,   92,  142,   93,
-       42,   41,   43,   42,   94,   55,  702,   47,   96,   40,
-       47,   47,   61,   97,   98,   61,   43,   44,   48,   45,
-       55,   48,   48,   45,   46,   49,   99,  686,   49,   49,
-      100,   94,   55,   46,   50,   96,   47,   50,   50,  145,
-       97,   98,   62,  683,   62,   63,   62,  101,  102,   47,
-      103,   46,   48,   99,   63,   63,  679,  100,   49,  104,
-
-       48,   63,   68,   47,  678,   68,   68,   49,  149,   62,
-       50,   62,   63,   62,  101,  102,   50,  103,  145,   48,
-       72,   63,   63,   72,   72,   49,  104,  665,   63,   67,
-       67,   67,   67,   67,   67,   67,  106,   50,   53,   53,
-       53,   53,  107,  108,   68,   53,   53,  149,  664,  109,
-      129,   53,  130,   53,   72,   53,   53,   53,   53,   53,
-      647,  131,   72,  106,  646,   53,   53,   53,   53,  107,
-      108,   73,   53,   53,   73,   73,  109,  129,   53,  130,
-       53,   72,   53,   53,   53,   53,   53,   69,  131,  631,
-       69,   69,  170,   69,   69,   69,   69,   69,   69,   69,
-
-       71,   71,   71,   71,   71,   71,   71,   74,  133,  630,
-       74,   74,   75,   73,   76,   75,   75,   76,   76,   77,
-      586,   78,   77,   77,   78,   78,  585,  574,   78,   69,
-       70,  170,  555,   70,   70,  133,   70,   70,   70,   70,
-       70,   70,   70,   74,   76,  554,  134,   79,  137,   74,
-       79,   79,  138,   77,   75,   80,   76,  553,   80,   80,
-      552,   77,   81,   78,  139,   81,   81,   79,  551,  140,
-       74,   76,   70,  134,   82,  137,  550,   82,   82,  138,
-       77,   83,   80,   84,   83,   83,   84,   84,   81,   79,
-      545,  139,  132,  105,   79,   85,  140,   80,   85,   85,
-
-      132,  544,  490,   87,   81,  489,   87,   87,  105,   80,
-      467,   84,  466,  434,   85,   81,   82,   83,  433,  132,
-      105,  426,  425,   83,  380,   84,   86,  132,   88,   86,
-       86,   88,   88,  185,  377,  105,  283,   85,   84,  115,
-       87,   85,  115,  115,   83,   87,   86,  282,   88,  110,
-      110,  110,  110,  110,  110,  110,  114,  114,  114,  114,
-      114,  114,  114,  115,  280,  141,  143,   87,   86,  144,
-       88,  146,  185,   86,  117,   88,  111,  117,  117,  111,
-      111,  115,  111,  111,  111,  111,  111,  111,  111,  279,
-      115,  116,  141,  143,  116,  116,  144,  118,  146,  119,
-
-      118,  118,  119,  119,   51,   27,  125,  117,  122,  125,
-      125,  122,  122,  116,  195,  119,  117,  118,  111,  112,
-       26,  200,  112,  112,  147,  112,  112,  112,  112,  112,
-      112,  112,  122,  116,  117,   25,  125,  148,  241,  118,
-      116,  119,  119,  121,  118,   10,  121,  121,  125,  151,
-      122,  147,  120,  195,  123,  120,  120,  123,  123,  122,
-      200,  112,  113,  125,  148,  113,  113,    9,  113,  113,
-      113,  113,  113,  113,  113,  120,  151,  241,  171,  121,
-      124,  123,    8,  124,  124,  121,  126,  150,  128,  126,
-      126,  128,  128,  172,  120,  127,  123,  173,  127,  127,
-
-      135,    3,  120,    2,  113,  171,  121,  176,  123,  135,
-      271,  135,  174,  175,  136,  127,  124,  150,  176,    0,
-      172,  126,  124,  136,  173,  136,  150,  135,  126,    0,
-      128,  154,    0,    0,  154,  154,  135,  127,  135,  174,
-      175,  136,  127,  124,  150,    0,  176,    0,  126,  271,
-      136,    0,  136,  152,  152,  152,  152,  152,  152,  152,
-      153,    0,  177,  153,  153,    0,  153,  153,  153,  153,
-      153,  153,  153,  154,  155,  155,  155,  155,  155,  155,
-      155,  156,    0,  157,  156,  156,  157,  157,  158,  177,
-      159,  158,  158,  159,  159,  160,  272,  161,  160,  160,
-
-      161,  161,  153,    0,  162,    0,  161,  162,  162,  161,
-      163,  178,    0,  163,  163,  156,  164,    0,  165,  164,
-      164,  165,  165,  156,  166,  157,  179,  166,  166,  163,
-      158,    0,  159,    0,  165,  272,    0,  160,  178,  161,
-      167,    0,  156,  167,  167,  164,  162,  168,  180,  181,
-      168,  168,  163,  179,  182,    0,  163,  166,  164,  169,
-      165,  165,  169,  169,  183,    0,  166,  184,  167,  186,
-      187,  188,  164,  189,    0,  180,  181,  190,  191,  192,
-      193,  182,  167,  194,  166,  196,  199,  197,  201,  168,
-      197,  183,  169,  202,  184,  167,  186,  187,  188,  198,
-
-      189,  169,  198,    0,  190,  191,  192,  193,    0,    0,
-      194,  217,  196,  199,  197,  201,    0,  197,  285,  169,
-      202,    0,    0,  218,  219,  220,  198,  221,  222,  198,
-      203,  203,  203,  203,  203,  203,  203,  204,  217,    0,
-      204,  204,  223,  204,  204,  204,  204,  204,  204,  204,
-      218,  219,  220,    0,  221,  222,  208,  285,  207,  208,
-      208,  207,  207,  209,    0,  208,  209,  209,  208,  223,
-      224,  209,  210,    0,  211,  210,  210,  211,  211,  204,
-      205,    0,  210,  205,  205,  226,  205,  205,  205,  205,
-      205,  205,  205,  207,  211,    0,  227,  224,  208,  212,
-
-      207,    0,  212,  212,  213,  209,  214,  213,  213,  214,
-      214,  228,  226,  229,  210,  215,  211,  230,  215,  215,
-      207,  211,  205,  227,  216,  231,  232,  216,  216,  233,
-        0,    0,  234,  212,  235,  236,  237,  238,  228,    0,
-      229,  212,  239,  240,  230,  242,  213,  243,  214,  244,
-      245,  246,  231,  232,  247,  248,  233,  215,  216,  234,
-      212,  235,  236,  237,  238,  249,  216,  250,  251,  239,
-      240,  252,  242,  253,  243,  254,  244,  245,  246,  255,
-      256,  247,  248,  257,  260,  216,    0,  260,  260,  269,
-        0,    0,  249,  261,  250,  251,  261,  261,  252,    0,
-
-      253,  262,  254,  270,  262,  262,  255,  256,    0,  262,
-      257,  259,  273,  261,  259,  259,  269,  259,  259,  259,
-      259,  259,  259,  259,  263,  274,  260,  263,  263,  264,
-      270,  275,  264,  264,  263,  261,  276,  277,  265,  273,
-      261,  265,  265,  262,  266,  278,  267,  266,  266,  267,
-      267,  268,  274,  259,  268,  268,  281,  284,  275,  288,
-      286,    0,  287,  276,  277,  289,  263,  290,  291,  292,
-      293,  264,  278,  295,  294,  296,  297,  298,  299,  300,
-      265,  301,  302,  281,  284,  294,  266,  286,  267,  287,
-      303,  304,  289,  268,  290,  291,  292,  293,  288,  305,
-
-      295,  306,  296,  307,  298,  299,  300,  308,  301,  302,
-      309,    0,  321,  294,  314,  297,  315,  303,  304,  316,
-      317,  312,    0,    0,  312,  312,  305,    0,  306,  313,
-      307,    0,  313,  313,  308,  311,    0,    0,  311,  311,
-      318,  314,  319,  315,    0,  320,  316,  317,  322,  309,
-      310,  321,  323,  310,  310,  324,  310,  310,  310,  310,
-      310,  310,  310,  312,  311,    0,  325,  318,  326,  319,
-      327,  313,  320,  328,  329,  322,  330,  311,  332,  323,
-      333,  334,  324,  335,  336,  337,  338,  339,  340,  341,
-      342,  311,  310,  325,  343,  326,  345,  327,  346,  347,
-
-      328,  329,  350,  330,  351,  332,  353,  333,  334,  352,
-      335,  336,  337,  338,  339,  340,  341,  342,  348,  348,
-      354,  343,  355,  345,  356,  346,  347,  349,  349,  350,
-      358,  351,  359,  353,  361,  362,  363,  365,  364,  363,
-      363,  364,  364,  366,  367,  348,  348,  354,  352,  355,
-      368,  356,  369,    0,  349,  349,  370,  358,  371,  359,
-      372,  361,  362,  373,  365,  374,  375,  376,  378,  379,
-      366,  367,  381,  364,  382,  383,  384,  368,  363,  369,
-      364,  385,  386,  370,  387,  371,  388,  372,  389,  390,
-      373,  391,  374,  375,  376,  378,  379,  392,  393,  381,
-
-      364,  382,  383,  384,  394,  395,  396,  397,  385,  386,
-      398,  387,  399,  388,  400,  389,  390,  401,  391,  402,
-      403,  404,  405,  407,  392,  393,  409,  406,  408,  410,
-      411,  394,  395,  396,  397,  406,  408,  398,  412,  399,
-      413,  400,  421,    0,  401,  415,  402,  403,  404,  405,
-      407,  416,  417,  409,  406,  408,  410,  411,  418,  419,
-      420,  422,  406,  408,  423,  412,  414,  413,  424,  414,
-      414,  427,  415,  428,  429,  430,  431,  432,  416,  417,
-      435,  421,  436,  437,  438,  418,  419,  420,  422,  439,
-      440,  423,  441,  442,  443,  424,  444,  445,  427,  446,
-
-      428,  429,  430,  431,  432,  447,  448,  435,  414,  436,
-      437,  438,  449,  450,  451,  452,  453,  440,  454,  441,
-      442,  443,  455,  444,  445,  456,  446,  457,  439,  458,
-      459,  460,  447,  448,  461,  464,  465,  468,  469,  449,
-      450,  451,  452,  453,  470,  454,  471,  472,  473,  455,
-      474,  475,  456,  476,  457,  477,  458,  459,  460,  478,
-      479,  461,  464,  465,  468,  469,  480,  481,  482,  483,
-      484,  470,  485,  471,  472,  473,  486,  474,  475,  487,
-      476,  488,  477,  491,  492,  493,  478,  479,  494,  495,
-      496,  497,  498,  480,  481,  482,  483,  484,  499,  485,
-
-      500,  501,  502,  486,  503,  504,  487,  507,  488,  508,
-      491,  492,  493,  509,  510,  494,  495,  496,  497,  498,
-      511,  512,  513,  514,  517,  499,  518,  500,  501,  502,
-      519,  503,  504,  520,  507,  521,  508,  522,  523,  524,
-      509,  510,  525,  526,  527,  528,  529,  511,  512,  513,
-      514,  517,  530,  518,  531,  532,  533,  519,  534,  535,
-      520,  536,  521,  537,  522,  523,  524,  538,  539,  525,
-      526,  527,  528,  529,  542,  543,  546,  547,  548,  530,
-      549,  531,  532,  533,  558,  534,  535,  559,  536,  561,
-      537,  562,  564,  565,  538,  539,  566,  567,  568,  569,
-
-      570,  542,  543,  546,  547,  548,  571,  549,  572,  573,
-      575,  558,  576,  577,  559,  578,  561,  579,  562,  564,
-      565,  580,  581,  566,  567,  568,  569,  570,  582,  583,
-      584,  587,  588,  571,  591,  572,  573,  575,  592,  576,
-      577,  593,  578,  594,  579,  597,  598,  599,  580,  581,
-      600,  601,  603,  605,  606,  582,  583,  584,  587,  588,
-      607,  591,  608,  609,  610,  592,  611,  612,  593,  613,
-      594,  614,  597,  598,  599,  616,  617,  600,  601,  603,
-      605,  606,  618,  619,  620,  621,  622,  607,  623,  608,
-      609,  610,  624,  611,  612,  625,  613,  628,  614,  629,
-
-      632,  633,  616,  617,  634,  635,  636,  637,  640,  618,
-      619,  620,  621,  622,  641,  623,  642,  643,  644,  624,
-      645,  648,  625,  649,  628,  650,  629,  632,  633,  651,
-      652,  634,  635,  636,  637,  640,  653,  654,  655,  656,
-      657,  641,  658,  642,  643,  644,  659,  645,  648,  660,
-      649,  661,  650,  666,  667,  668,  651,  652,  669,  670,
-      671,  680,  681,  653,  654,  655,  656,  657,  682,  658,
-      684,  685,  687,  659,  688,  689,  660,  690,  661,  691,
-      666,  667,  668,  692,  693,  669,  670,  671,  680,  681,
-      694,  695,  696,  697,  704,  682,  707,  684,  685,  687,
-
-      710,  688,  689,  711,  690,  712,  691,  713,  714,  715,
-      692,  693,  720,  721,  722,  724,  726,  694,  695,  696,
-      697,  704,  727,  707,  730,  731,  736,  710,  737,  742,
-      711,  743,  712,  744,  713,  714,  715,  745,  746,  720,
-      721,  722,  724,  726,  747,  752,  753,  754,  755,  727,
-      758,  730,  731,  736,  759,  737,  742,  762,  743,  763,
-      744,    0,    0,    0,  745,  746,    0,    0,    0,    0,
-        0,  747,  752,  753,  754,  755,    0,  758,    0,    0,
-        0,  759,    0,    0,  762,    0,  763,  769,    0,  769,
-      771,  771,  771,  768,  768,  768,  768,  768,  768,  768,
-
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
-      768,  768,  768,  768,  768,  768,  768
+      695,  694,   39,   39,   35,   89,   36,   35,   36,   91,
+       59,   34,   38,   37,   90,   40,   59,   37,   40,   40,
+       41,   38,  693,   41,   41,   34,   39,   32,   42,  139,
+
+       43,   42,   42,   43,   43,  692,   91,   59,  685,   38,
+       92,   39,   94,   59,   41,   44,   42,   45,   44,   44,
+       45,   45,   40,   39,  682,   60,   44,   40,   60,   43,
+      679,   46,   41,   54,   46,   46,   45,   92,  139,   94,
+       42,   41,   43,   42,   95,   54,  678,   47,   96,   40,
+       47,   47,   60,   97,   98,   60,   43,   44,   48,   45,
+       54,   48,   48,   45,   46,   49,   99,  664,   49,   49,
+      101,   95,   54,   46,   50,   96,   47,   50,   50,  102,
+       97,   98,   61,  661,   61,   62,   61,  657,  104,   47,
+      105,   46,   48,   99,   62,   62,  656,  101,   49,  103,
+
+       48,   62,  627,   47,  626,  615,  102,   49,  614,   61,
+       50,   61,   62,   61,  103,  104,   50,  105,  613,   48,
+       67,   62,   62,   67,   67,   49,  103,  612,   62,   66,
+       66,   66,   66,   66,   66,   66,  100,   50,   53,   53,
+       53,  103,  106,  100,   53,   53,  107,  127,  128,  130,
+       53,  131,   53,  129,   53,   53,   53,   53,   53,  570,
+      134,  129,   67,  100,  135,   53,   53,   53,  569,  106,
+      100,   53,   53,  107,  127,  128,  130,   53,  131,   53,
+      129,   53,   53,   53,   53,   53,   68,  134,  129,   68,
+       68,  135,   68,   68,   68,   68,   68,   68,   68,   70,
+
+       70,   70,   70,   70,   70,   70,   72,  136,   71,   72,
+       72,   71,   71,   73,  558,   74,   73,   73,   74,   74,
+      541,   75,  540,   77,   75,   75,   77,   77,   68,   69,
+       77,  539,   69,   69,  136,   69,   69,   69,   69,   69,
+       69,   69,   71,   76,  538,  137,   76,   76,   72,   73,
+       71,   75,  138,  140,  141,   73,   79,   74,   81,   79,
+       79,   81,   81,   75,   78,   77,  142,   78,   78,   71,
+       80,   69,  137,   80,   80,  143,   73,   76,   75,  138,
+      140,  141,  537,   79,   78,   76,   82,  147,   83,   82,
+       82,   83,   83,  142,  536,  531,   80,  144,   79,   84,
+
+       81,  530,   84,   84,   76,   85,   78,  478,   85,   85,
+       79,   78,   80,  145,  143,  146,   83,   86,   84,  149,
+       86,   86,   82,   80,  144,   85,  147,  477,   82,  113,
+       83,   87,  113,  113,   87,   87,  424,  423,  416,  415,
+      145,   84,  146,   83,  372,   84,  149,   85,  182,   82,
+      168,   87,   85,  113,   86,  369,  169,  170,  290,   86,
+      108,  108,  108,  108,  108,  108,  108,  278,  277,  275,
+      274,  113,  126,   87,   51,  126,  126,  168,   87,   27,
+      113,   86,  109,  169,  170,  109,  109,  182,  109,  109,
+      109,  109,  109,  109,  109,  112,  112,  112,  112,  112,
+
+      112,  112,  193,  171,  114,   26,  115,  114,  114,  115,
+      115,   25,   10,  152,  126,  172,  152,  152,  116,    9,
+        8,  116,  116,    3,  109,  110,  114,    2,  110,  110,
+      171,  110,  110,  110,  110,  110,  110,  110,  116,  115,
+      117,  193,  172,  117,  117,    0,  114,  118,  115,    0,
+      118,  118,    0,  114,  119,  152,  117,  119,  119,  121,
+      116,    0,  121,  121,    0,  116,  115,  110,  111,    0,
+      118,  111,  111,    0,  111,  111,  111,  111,  111,  111,
+      111,  120,  117,  117,  120,  120,  121,  174,  122,  118,
+      119,  122,  122,    0,  175,  123,  119,  118,  123,  123,
+
+      124,  121,  198,  124,  124,  120,  176,  132,  125,  148,
+      111,  125,  125,  121,  174,  173,  132,  119,  132,  177,
+      133,  175,  178,  120,  122,  123,  173,    0,  125,  133,
+      122,  133,  120,  176,  132,  124,  238,  123,  179,  148,
+      266,  198,  124,  132,    0,  132,  177,  133,  148,  178,
+      125,  122,  123,    0,  173,  125,  133,  267,  133,    0,
+      154,    0,  124,  154,  154,  179,  148,  150,  150,  150,
+      150,  150,  150,  150,  151,  238,  280,  151,  151,  266,
+      151,  151,  151,  151,  151,  151,  151,  153,  153,  153,
+      153,  153,  153,  153,  154,  155,  267,  156,  155,  155,
+
+      156,  156,  154,  157,    0,  158,  157,  157,  158,  158,
+      159,    0,    0,  159,  159,  280,  151,    0,    0,  159,
+      160,  154,  159,  160,  160,  161,  180,  162,  161,  161,
+      162,  162,  163,  181,    0,  163,  163,  155,  165,  156,
+        0,  165,  165,  183,  161,  157,  164,  158,  163,  164,
+      164,  184,  159,  180,  166,  185,  162,  166,  166,  186,
+      181,  167,  160,  187,  167,  167,  165,  161,  188,  162,
+      183,  161,  189,  190,  163,  163,  283,  191,  184,  164,
+      165,  192,  185,  162,  194,  197,  186,  199,  164,  195,
+      187,  200,  195,  165,  167,  188,  166,  215,  196,  189,
+
+      190,  196,    0,  167,  191,    0,  164,    0,  192,    0,
+      216,  194,  197,  287,  199,  283,  195,  293,  200,  195,
+        0,  167,  217,  218,  215,  196,  219,  220,  196,  201,
+      201,  201,  201,  201,  201,  201,  202,  216,    0,  202,
+      202,  222,  202,  202,  202,  202,  202,  202,  202,  217,
+      218,    0,  287,  219,  220,  206,  293,  205,  206,  206,
+      205,  205,  207,    0,  206,  207,  207,  206,  222,  223,
+      207,  208,    0,  209,  208,  208,  209,  209,  202,  203,
+        0,  208,  203,  203,  224,  203,  203,  203,  203,  203,
+      203,  203,  205,  209,    0,  225,  223,  206,  210,  205,
+
+        0,  210,  210,  211,  207,  212,  211,  211,  212,  212,
+      226,  224,  227,  208,  213,  209,  228,  213,  213,  205,
+      209,  203,  225,  214,  229,  230,  214,  214,  231,    0,
+        0,  232,  210,  233,  234,  235,  236,  226,    0,  227,
+      210,  237,  239,  228,  240,  211,  241,  212,  242,  243,
+      244,  229,  230,  245,  246,  231,  213,  214,  232,  210,
+      233,  234,  235,  236,  247,  214,  248,  249,  237,  239,
+      250,  240,  251,  241,  252,  242,  243,  244,  253,  254,
+      245,  246,  257,    0,  214,  257,  257,    0,    0,  305,
+        0,  247,  258,  248,  249,  258,  258,  250,    0,  251,
+
+      259,  252,  268,  259,  259,  253,  254,  256,  259,    0,
+      256,  256,  258,  256,  256,  256,  256,  256,  256,  256,
+        0,  269,  260,    0,  257,  260,  260,  261,  305,  268,
+      261,  261,  260,  262,  258,  270,  262,  262,  271,  258,
+      263,  272,  259,  263,  263,  273,  276,  264,  269,  256,
+      264,  264,  265,  279,  281,  265,  265,  282,  284,  285,
+      286,  288,  270,  289,  260,  271,  291,    0,  272,  261,
+      292,  294,  273,  276,  295,  262,  296,  297,  298,  299,
+      279,  281,  263,  300,  282,  284,  285,  286,  288,  264,
+      289,  301,  302,  291,  265,  303,  304,  292,  294,  310,
+
+      315,  295,  311,  296,  297,  298,  299,    0,  307,    0,
+      300,  307,  307,  308,  346,    0,  308,  308,  301,  302,
+      312,  313,  303,  304,  306,  314,  310,  306,  306,  311,
+      306,  306,  306,  306,  306,  306,  306,  307,  309,  315,
+      316,  309,  309,  317,  318,  319,  320,  312,  313,  321,
+      307,  322,  314,  346,  323,  308,  324,  326,  327,  328,
+      329,  330,  331,  332,  307,  333,  306,  316,  334,  335,
+      317,  318,  319,  320,  336,  337,  321,  338,  322,  340,
+      309,  323,  341,  324,  326,  327,  328,  329,  330,  331,
+      332,  344,  333,  342,  342,  334,  335,  343,  343,  345,
+
+      347,  336,  337,  348,  338,  349,  340,  350,  352,  341,
+      353,  355,  356,  357,  359,  360,  357,  357,  344,  358,
+      342,  342,  358,  358,  343,  343,  345,  347,    0,  361,
+      348,  362,  349,  363,  350,  352,  364,  353,  355,  356,
+      365,  359,  360,  366,  367,  368,  370,  371,  373,  374,
+      375,  376,  377,  378,  358,  357,  361,  379,  362,  380,
+      363,  358,  381,  364,  382,  383,  384,  365,  385,  386,
+      366,  367,  368,  370,  371,  373,  374,  375,  376,  377,
+      378,  358,  387,  388,  379,  389,  380,  390,  391,  381,
+      392,  382,  383,  384,  393,  385,  386,  394,  395,  396,
+
+      397,  399,  401,  398,  402,  400,  403,  404,  405,  387,
+      388,  398,  389,  400,  390,  391,  406,  392,  407,  406,
+      406,  393,  408,  409,  394,  395,  396,  397,  399,  401,
+      398,  402,  400,  403,  404,  405,  410,  411,  398,  412,
+      400,  413,  414,  417,  418,  407,  419,  420,  421,  408,
+      409,  422,  425,  426,  427,  428,  429,  430,  406,  431,
+      432,  433,  434,  410,  435,  436,  412,  437,  413,  414,
+      417,  418,  438,  419,  420,  421,  411,  439,  422,  425,
+      426,  427,  428,  440,  430,  441,  431,  432,  433,  434,
+      442,  435,  436,  443,  437,  429,  444,  445,  446,  438,
+
+      447,  448,  449,  450,  439,  451,  454,  455,  456,  457,
+      440,  458,  441,  459,  460,  461,  462,  442,  463,  464,
+      443,  465,  466,  444,  445,  446,  467,  447,  448,  449,
+      450,  468,  451,  454,  455,  456,  457,  469,  458,  470,
+      459,  460,  461,  462,  471,  463,  464,  472,  465,  466,
+      473,  474,  475,  467,  476,  479,  480,  481,  468,  482,
+      483,  484,  485,  486,  469,  487,  470,  488,  489,  490,
+      491,  471,  492,  495,  472,  496,  497,  473,  474,  475,
+      498,  476,  479,  480,  481,  499,  482,  483,  484,  485,
+      486,  500,  487,  501,  488,  489,  490,  491,  502,  492,
+
+      495,  505,  496,  497,  506,  507,  508,  498,  509,  510,
+      511,  512,  499,  513,  514,  515,  516,  517,  500,  518,
+      501,  519,  520,  521,  522,  502,  523,  524,  505,  525,
+      528,  506,  507,  508,  529,  509,  510,  511,  512,  532,
+      513,  514,  515,  516,  517,  533,  518,  534,  519,  520,
+      521,  522,  535,  523,  524,  544,  525,  528,  545,  547,
+      548,  529,  550,  551,  552,  553,  532,  554,  555,  556,
+      557,  559,  533,  560,  534,  561,  562,  563,  564,  535,
+      565,  566,  544,  567,  568,  545,  547,  548,  571,  550,
+      551,  552,  553,  572,  554,  555,  556,  557,  559,  575,
+
+      560,  576,  561,  562,  563,  564,  577,  565,  566,  578,
+      567,  568,  581,  582,  583,  571,  584,  585,  587,  589,
+      572,  590,  591,  592,  593,  594,  575,  595,  576,  596,
+      598,  599,  600,  577,  601,  602,  578,  603,  604,  581,
+      582,  583,  605,  584,  585,  587,  589,  606,  590,  591,
+      592,  593,  594,  607,  595,  610,  596,  598,  599,  600,
+      611,  601,  602,  616,  603,  604,  617,  618,  619,  605,
+      622,  623,  624,  625,  606,  628,  629,  630,  631,  632,
+      607,  633,  610,  634,  635,  636,  637,  611,  638,  639,
+      616,  640,  641,  617,  618,  619,  642,  622,  623,  624,
+
+      625,  643,  628,  629,  630,  631,  632,  646,  633,  647,
+      634,  635,  636,  637,  648,  638,  639,  649,  640,  641,
+      658,  659,  660,  642,  662,  663,  665,  666,  643,  667,
+      668,  669,  670,  671,  646,  672,  647,  673,  674,  675,
+      680,  648,  683,  686,  649,  687,  688,  658,  659,  660,
+      689,  662,  663,  665,  666,  690,  667,  668,  669,  670,
+      671,  691,  672,  696,  673,  674,  675,  680,  697,  683,
+      686,  698,  687,  688,  700,  702,  703,  689,  706,  707,
+      712,  713,  690,  718,  719,  720,  721,  722,  691,  723,
+      696,  728,  729,  730,  731,  697,  734,  735,  698,  736,
+
+      737,  700,  702,  703,  738,  706,  707,  712,  713,  739,
+      718,  719,  720,  721,  722,    0,  723,    0,  728,  729,
+      730,  731,    0,  734,  735,    0,  736,  737,    0,    0,
+        0,  738,    0,    0,    0,    0,  739,  747,    0,  747,
+      749,  749,  749,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746
     } ;
 
-static yyconst flex_int16_t yy_rule_linenum[90] =
+static yyconst flex_int16_t yy_rule_linenum[88] =
     {   0,
        77,   79,   81,   83,   85,   88,   92,   94,   95,   96,
        97,   98,   99,  100,  101,  102,  103,  104,  105,  106,
@@ -1260,9 +1242,9 @@ static yyconst flex_int16_t yy_rule_linenum[90] =
       117,  118,  119,  120,  121,  122,  123,  124,  125,  126,
       127,  128,  129,  130,  131,  132,  133,  134,  135,  136,
       137,  138,  139,  140,  141,  142,  143,  144,  145,  146,
-      147,  148,  150,  151,  153,  154,  155,  156,  157,  158,
-      160,  161,  164,  169,  170,  171,  173,  174,  175,  176,
-      177,  178,  179,  180,  181,  183,  192,  210,  216
+      148,  149,  151,  152,  153,  154,  155,  156,  158,  159,
+      162,  167,  168,  169,  171,  172,  173,  174,  175,  176,
+      177,  178,  179,  181,  190,  208,  214
     } ;
 
 /* The intent behind this definition is that it'll catch
@@ -1317,7 +1299,7 @@ static yyconst flex_int16_t yy_rule_linenum[90] =
 
 #define YY_INPUT(buffer, result, max_size) get_lex_chars(buffer, result, max_size, PARAM)
 
-#line 1321 "libmemcached/options/scanner.cc"
+#line 1303 "libmemcached/options/scanner.cc"
 
 #define INITIAL 0
 
@@ -1624,7 +1606,7 @@ YY_DECL
 
 
 
-#line 1628 "libmemcached/options/scanner.cc"
+#line 1610 "libmemcached/options/scanner.cc"
 
     yylval = yylval_param;
 
@@ -1690,13 +1672,13 @@ yy_match:
                        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                                {
                                yy_current_state = (int) yy_def[yy_current_state];
-                               if ( yy_current_state >= 769 )
+                               if ( yy_current_state >= 747 )
                                        yy_c = yy_meta[(unsigned int) yy_c];
                                }
                        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
                        ++yy_cp;
                        }
-               while ( yy_base[yy_current_state] != 2094 );
+               while ( yy_base[yy_current_state] != 2044 );
 
 yy_find_action:
 /* %% [10.0] code to find the action number goes here */
@@ -1719,13 +1701,13 @@ do_action:      /* This label is used only to access EOF actions. */
                        {
                        if ( yy_act == 0 )
                                fprintf( stderr, "--scanner backing up\n" );
-                       else if ( yy_act < 90 )
+                       else if ( yy_act < 88 )
                                fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
                                         (long)yy_rule_linenum[yy_act], yytext );
-                       else if ( yy_act == 90 )
+                       else if ( yy_act == 88 )
                                fprintf( stderr, "--accepting default rule (\"%s\")\n",
                                         yytext );
-                       else if ( yy_act == 91 )
+                       else if ( yy_act == 89 )
                                fprintf( stderr, "--(end of buffer or a NUL)\n" );
                        else
                                fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
@@ -1795,389 +1777,379 @@ YY_RULE_SETUP
 case 10:
 YY_RULE_SETUP
 #line 96 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return AUTO_EJECT_HOSTS; }
+{ yyextra->begin= yytext; return BINARY_PROTOCOL; }
        YY_BREAK
 case 11:
 YY_RULE_SETUP
 #line 97 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return AUTO_EJECT_HOSTS; }
+{ yyextra->begin= yytext; return BINARY_PROTOCOL; }
        YY_BREAK
 case 12:
 YY_RULE_SETUP
 #line 98 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return BINARY_PROTOCOL; }
+{ yyextra->begin= yytext; return BUFFER_REQUESTS; }
        YY_BREAK
 case 13:
 YY_RULE_SETUP
 #line 99 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return BINARY_PROTOCOL; }
+{ yyextra->begin= yytext; return BUFFER_REQUESTS; }
        YY_BREAK
 case 14:
 YY_RULE_SETUP
 #line 100 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return BUFFER_REQUESTS; }
+{ yyextra->begin= yytext; return CONFIGURE_FILE; }
        YY_BREAK
 case 15:
 YY_RULE_SETUP
 #line 101 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return BUFFER_REQUESTS; }
+{ yyextra->begin= yytext; return CONFIGURE_FILE; }
        YY_BREAK
 case 16:
 YY_RULE_SETUP
 #line 102 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return CONFIGURE_FILE; }
+{ yyextra->begin= yytext; return CONNECT_TIMEOUT; }
        YY_BREAK
 case 17:
 YY_RULE_SETUP
 #line 103 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return CONFIGURE_FILE; }
+{ yyextra->begin= yytext; return CONNECT_TIMEOUT; }
        YY_BREAK
 case 18:
 YY_RULE_SETUP
 #line 104 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return CONNECT_TIMEOUT; }
+{ yyextra->begin= yytext; return DISTRIBUTION; }
        YY_BREAK
 case 19:
 YY_RULE_SETUP
 #line 105 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return CONNECT_TIMEOUT; }
+{ yyextra->begin= yytext; return HASH; }
        YY_BREAK
 case 20:
 YY_RULE_SETUP
 #line 106 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return DISTRIBUTION; }
+{ yyextra->begin= yytext; return HASH_WITH_PREFIX_KEY; }
        YY_BREAK
 case 21:
 YY_RULE_SETUP
 #line 107 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return HASH; }
+{ yyextra->begin= yytext; return HASH_WITH_PREFIX_KEY; }
        YY_BREAK
 case 22:
 YY_RULE_SETUP
 #line 108 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return HASH_WITH_PREFIX_KEY; }
+{ yyextra->begin= yytext; return IO_BYTES_WATERMARK; }
        YY_BREAK
 case 23:
 YY_RULE_SETUP
 #line 109 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return HASH_WITH_PREFIX_KEY; }
+{ yyextra->begin= yytext; return IO_BYTES_WATERMARK; }
        YY_BREAK
 case 24:
 YY_RULE_SETUP
 #line 110 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return IO_BYTES_WATERMARK; }
+{ yyextra->begin= yytext; return IO_KEY_PREFETCH; }
        YY_BREAK
 case 25:
 YY_RULE_SETUP
 #line 111 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return IO_BYTES_WATERMARK; }
+{ yyextra->begin= yytext; return IO_KEY_PREFETCH; }
        YY_BREAK
 case 26:
 YY_RULE_SETUP
 #line 112 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return IO_KEY_PREFETCH; }
+{ yyextra->begin= yytext; return IO_MSG_WATERMARK; }
        YY_BREAK
 case 27:
 YY_RULE_SETUP
 #line 113 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return IO_KEY_PREFETCH; }
+{ yyextra->begin= yytext; return IO_MSG_WATERMARK; }
        YY_BREAK
 case 28:
 YY_RULE_SETUP
 #line 114 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return IO_MSG_WATERMARK; }
+{ yyextra->begin= yytext; return NOREPLY; }
        YY_BREAK
 case 29:
 YY_RULE_SETUP
 #line 115 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return IO_MSG_WATERMARK; }
+{ yyextra->begin= yytext; return NUMBER_OF_REPLICAS; }
        YY_BREAK
 case 30:
 YY_RULE_SETUP
 #line 116 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return NOREPLY; }
+{ yyextra->begin= yytext; return NUMBER_OF_REPLICAS; }
        YY_BREAK
 case 31:
 YY_RULE_SETUP
 #line 117 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return NUMBER_OF_REPLICAS; }
+{ yyextra->begin= yytext; return POLL_TIMEOUT; }
        YY_BREAK
 case 32:
 YY_RULE_SETUP
 #line 118 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return NUMBER_OF_REPLICAS; }
+{ yyextra->begin= yytext; return POLL_TIMEOUT; }
        YY_BREAK
 case 33:
 YY_RULE_SETUP
 #line 119 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return POLL_TIMEOUT; }
+{ yyextra->begin= yytext; return RANDOMIZE_REPLICA_READ; }
        YY_BREAK
 case 34:
 YY_RULE_SETUP
 #line 120 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return POLL_TIMEOUT; }
+{ yyextra->begin= yytext; return RANDOMIZE_REPLICA_READ; }
        YY_BREAK
 case 35:
 YY_RULE_SETUP
 #line 121 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return RANDOMIZE_REPLICA_READ; }
+{ yyextra->begin= yytext; return RCV_TIMEOUT; }
        YY_BREAK
 case 36:
 YY_RULE_SETUP
 #line 122 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return RANDOMIZE_REPLICA_READ; }
+{ yyextra->begin= yytext; return RCV_TIMEOUT; }
        YY_BREAK
 case 37:
 YY_RULE_SETUP
 #line 123 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return RCV_TIMEOUT; }
+{ yyextra->begin= yytext; return RETRY_TIMEOUT; }
        YY_BREAK
 case 38:
 YY_RULE_SETUP
 #line 124 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return RCV_TIMEOUT; }
+{ yyextra->begin= yytext; return RETRY_TIMEOUT; }
        YY_BREAK
 case 39:
 YY_RULE_SETUP
 #line 125 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return RETRY_TIMEOUT; }
+{ yyextra->begin= yytext; return SND_TIMEOUT; }
        YY_BREAK
 case 40:
 YY_RULE_SETUP
 #line 126 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return RETRY_TIMEOUT; }
+{ yyextra->begin= yytext; return SND_TIMEOUT; }
        YY_BREAK
 case 41:
 YY_RULE_SETUP
 #line 127 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return SERVER_FAILURE_LIMIT; }
+{ yyextra->begin= yytext; return REMOVE_FAILED_SERVERS; }
        YY_BREAK
 case 42:
 YY_RULE_SETUP
 #line 128 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return SERVER_FAILURE_LIMIT; }
+{ yyextra->begin= yytext; return REMOVE_FAILED_SERVERS; }
        YY_BREAK
 case 43:
 YY_RULE_SETUP
 #line 129 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return SND_TIMEOUT; }
+{ yyextra->begin= yytext; return SOCKET_RECV_SIZE; }
        YY_BREAK
 case 44:
 YY_RULE_SETUP
 #line 130 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return SND_TIMEOUT; }
+{ yyextra->begin= yytext; return SOCKET_RECV_SIZE; }
        YY_BREAK
 case 45:
 YY_RULE_SETUP
 #line 131 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return SOCKET_RECV_SIZE; }
+{ yyextra->begin= yytext; return SOCKET_SEND_SIZE; }
        YY_BREAK
 case 46:
 YY_RULE_SETUP
 #line 132 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return SOCKET_RECV_SIZE; }
+{ yyextra->begin= yytext; return SOCKET_SEND_SIZE; }
        YY_BREAK
 case 47:
 YY_RULE_SETUP
 #line 133 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return SOCKET_SEND_SIZE; }
+{ yyextra->begin= yytext; return SORT_HOSTS; }
        YY_BREAK
 case 48:
 YY_RULE_SETUP
 #line 134 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return SOCKET_SEND_SIZE; }
+{ yyextra->begin= yytext; return SORT_HOSTS; }
        YY_BREAK
 case 49:
 YY_RULE_SETUP
 #line 135 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return SORT_HOSTS; }
+{ yyextra->begin= yytext; return SUPPORT_CAS; }
        YY_BREAK
 case 50:
 YY_RULE_SETUP
 #line 136 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return SORT_HOSTS; }
+{ yyextra->begin= yytext; return SUPPORT_CAS; }
        YY_BREAK
 case 51:
 YY_RULE_SETUP
 #line 137 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return SUPPORT_CAS; }
+{ yyextra->begin= yytext; return _TCP_NODELAY; }
        YY_BREAK
 case 52:
 YY_RULE_SETUP
 #line 138 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return SUPPORT_CAS; }
+{ yyextra->begin= yytext; return _TCP_NODELAY; }
        YY_BREAK
 case 53:
 YY_RULE_SETUP
 #line 139 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return _TCP_NODELAY; }
+{ yyextra->begin= yytext; return _TCP_KEEPALIVE; }
        YY_BREAK
 case 54:
 YY_RULE_SETUP
 #line 140 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return _TCP_NODELAY; }
+{ yyextra->begin= yytext; return _TCP_KEEPALIVE; }
        YY_BREAK
 case 55:
 YY_RULE_SETUP
 #line 141 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return _TCP_KEEPALIVE; }
+{ yyextra->begin= yytext; return _TCP_KEEPIDLE; }
        YY_BREAK
 case 56:
 YY_RULE_SETUP
 #line 142 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return _TCP_KEEPALIVE; }
+{ yyextra->begin= yytext; return _TCP_KEEPIDLE; }
        YY_BREAK
 case 57:
 YY_RULE_SETUP
 #line 143 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return _TCP_KEEPIDLE; }
+{ yyextra->begin= yytext; return USER_DATA; }
        YY_BREAK
 case 58:
 YY_RULE_SETUP
 #line 144 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return _TCP_KEEPIDLE; }
+{ yyextra->begin= yytext; return USER_DATA; }
        YY_BREAK
 case 59:
 YY_RULE_SETUP
 #line 145 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return USER_DATA; }
+{ yyextra->begin= yytext; return USE_UDP; }
        YY_BREAK
 case 60:
 YY_RULE_SETUP
 #line 146 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return USER_DATA; }
+{ yyextra->begin= yytext; return USE_UDP; }
        YY_BREAK
 case 61:
 YY_RULE_SETUP
-#line 147 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return USE_UDP; }
+#line 148 "libmemcached/options/scanner.l"
+{ yyextra->begin= yytext; return PREFIX_KEY; }
        YY_BREAK
 case 62:
 YY_RULE_SETUP
-#line 148 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return USE_UDP; }
+#line 149 "libmemcached/options/scanner.l"
+{ yyextra->begin= yytext; return PREFIX_KEY; }
        YY_BREAK
 case 63:
 YY_RULE_SETUP
-#line 150 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return PREFIX_KEY; }
+#line 151 "libmemcached/options/scanner.l"
+{ yyextra->begin= yytext; return INCLUDE; }
        YY_BREAK
 case 64:
 YY_RULE_SETUP
-#line 151 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return PREFIX_KEY; }
+#line 152 "libmemcached/options/scanner.l"
+{ yyextra->begin= yytext; return RESET; }
        YY_BREAK
 case 65:
 YY_RULE_SETUP
 #line 153 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return INCLUDE; }
+{ yyextra->begin= yytext; return PARSER_DEBUG; }
        YY_BREAK
 case 66:
 YY_RULE_SETUP
 #line 154 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return RESET; }
+{ yyextra->begin= yytext; return SERVERS; }
        YY_BREAK
 case 67:
 YY_RULE_SETUP
 #line 155 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return PARSER_DEBUG; }
+{ yyextra->begin= yytext; return END; }
        YY_BREAK
 case 68:
 YY_RULE_SETUP
 #line 156 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return SERVERS; }
+{ yyextra->begin= yytext; return ERROR; }
        YY_BREAK
 case 69:
 YY_RULE_SETUP
-#line 157 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return END; }
+#line 158 "libmemcached/options/scanner.l"
+{ return TRUE; }
        YY_BREAK
 case 70:
 YY_RULE_SETUP
-#line 158 "libmemcached/options/scanner.l"
-{ yyextra->begin= yytext; return ERROR; }
+#line 159 "libmemcached/options/scanner.l"
+{ return FALSE; }
        YY_BREAK
 case 71:
 YY_RULE_SETUP
-#line 160 "libmemcached/options/scanner.l"
-{ return TRUE; }
+#line 162 "libmemcached/options/scanner.l"
+{
+      yyextra->begin= yytext;
+      return UNKNOWN_OPTION;
+    }
        YY_BREAK
 case 72:
 YY_RULE_SETUP
-#line 161 "libmemcached/options/scanner.l"
-{ return FALSE; }
+#line 167 "libmemcached/options/scanner.l"
+{ return CONSISTENT; }
        YY_BREAK
 case 73:
 YY_RULE_SETUP
-#line 164 "libmemcached/options/scanner.l"
-{
-      yyextra->begin= yytext;
-      return UNKNOWN_OPTION;
-    }
+#line 168 "libmemcached/options/scanner.l"
+{ return MODULA; }
        YY_BREAK
 case 74:
 YY_RULE_SETUP
 #line 169 "libmemcached/options/scanner.l"
-{ return CONSISTENT; }
+{ return RANDOM; }
        YY_BREAK
 case 75:
 YY_RULE_SETUP
-#line 170 "libmemcached/options/scanner.l"
-{ return MODULA; }
+#line 171 "libmemcached/options/scanner.l"
+{ return MD5; }
        YY_BREAK
 case 76:
 YY_RULE_SETUP
-#line 171 "libmemcached/options/scanner.l"
-{ return RANDOM; }
+#line 172 "libmemcached/options/scanner.l"
+{ return CRC; }
        YY_BREAK
 case 77:
 YY_RULE_SETUP
 #line 173 "libmemcached/options/scanner.l"
-{ return MD5; }
+{ return FNV1_64; }
        YY_BREAK
 case 78:
 YY_RULE_SETUP
 #line 174 "libmemcached/options/scanner.l"
-{ return CRC; }
+{ return FNV1A_64; }
        YY_BREAK
 case 79:
 YY_RULE_SETUP
 #line 175 "libmemcached/options/scanner.l"
-{ return FNV1_64; }
+{ return FNV1_32; }
        YY_BREAK
 case 80:
 YY_RULE_SETUP
 #line 176 "libmemcached/options/scanner.l"
-{ return FNV1A_64; }
+{ return FNV1A_32; }
        YY_BREAK
 case 81:
 YY_RULE_SETUP
 #line 177 "libmemcached/options/scanner.l"
-{ return FNV1_32; }
+{ return HSIEH; }
        YY_BREAK
 case 82:
 YY_RULE_SETUP
 #line 178 "libmemcached/options/scanner.l"
-{ return FNV1A_32; }
+{ return MURMUR; }
        YY_BREAK
 case 83:
 YY_RULE_SETUP
 #line 179 "libmemcached/options/scanner.l"
-{ return HSIEH; }
+{ return JENKINS; }
        YY_BREAK
 case 84:
 YY_RULE_SETUP
-#line 180 "libmemcached/options/scanner.l"
-{ return MURMUR; }
-       YY_BREAK
-case 85:
-YY_RULE_SETUP
 #line 181 "libmemcached/options/scanner.l"
-{ return JENKINS; }
-       YY_BREAK
-case 86:
-YY_RULE_SETUP
-#line 183 "libmemcached/options/scanner.l"
 {
       yylval->server.port= MEMCACHED_DEFAULT_PORT;
       yylval->server.weight= 1;
@@ -2187,9 +2159,9 @@ YY_RULE_SETUP
       return IPADDRESS;
     }
        YY_BREAK
-case 87:
+case 85:
 YY_RULE_SETUP
-#line 192 "libmemcached/options/scanner.l"
+#line 190 "libmemcached/options/scanner.l"
 {
       if (yyextra->is_server())
       {
@@ -2208,29 +2180,29 @@ YY_RULE_SETUP
       return STRING;
     }
        YY_BREAK
-case 88:
+case 86:
 YY_RULE_SETUP
-#line 210 "libmemcached/options/scanner.l"
+#line 208 "libmemcached/options/scanner.l"
 {
       yylval->string.c_str = yytext;
       yylval->string.length = yyleng;
       return QUOTED_STRING;
     }
        YY_BREAK
-case 89:
+case 87:
 YY_RULE_SETUP
-#line 216 "libmemcached/options/scanner.l"
+#line 214 "libmemcached/options/scanner.l"
 {
       yyextra->begin= yytext;
       return UNKNOWN;
     }
        YY_BREAK
-case 90:
+case 88:
 YY_RULE_SETUP
-#line 221 "libmemcached/options/scanner.l"
+#line 219 "libmemcached/options/scanner.l"
 ECHO;
        YY_BREAK
-#line 2234 "libmemcached/options/scanner.cc"
+#line 2206 "libmemcached/options/scanner.cc"
 case YY_STATE_EOF(INITIAL):
        yyterminate();
 
@@ -2546,7 +2518,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
                while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                        {
                        yy_current_state = (int) yy_def[yy_current_state];
-                       if ( yy_current_state >= 769 )
+                       if ( yy_current_state >= 747 )
                                yy_c = yy_meta[(unsigned int) yy_c];
                        }
                yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -2580,11 +2552,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                {
                yy_current_state = (int) yy_def[yy_current_state];
-               if ( yy_current_state >= 769 )
+               if ( yy_current_state >= 747 )
                        yy_c = yy_meta[(unsigned int) yy_c];
                }
        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-       yy_is_jam = (yy_current_state == 768);
+       yy_is_jam = (yy_current_state == 746);
 
        return yy_is_jam ? 0 : yy_current_state;
 }
@@ -3496,7 +3468,7 @@ void config_free (void * ptr , yyscan_t yyscanner)
 
 /* %ok-for-header */
 
-#line 221 "libmemcached/options/scanner.l"
+#line 219 "libmemcached/options/scanner.l"
 
 
 
index 5401206b580983558f1179ce025f078f889a2862..8e15027c2d805b2f4ea17104175c5a81b28a2e2a 100644 (file)
@@ -471,7 +471,7 @@ extern int config_lex \
 #undef YY_DECL
 #endif
 
-#line 221 "libmemcached/options/scanner.l"
+#line 219 "libmemcached/options/scanner.l"
 
 
 #line 478 "libmemcached/options/scanner.h"
index a82470000ff6496477e0cea7fcbc5f58dd62c57b..6d72906cb8022a92ed69f2ab7dfafb0bd616eba8 100644 (file)
@@ -83,16 +83,23 @@ void memcached_quit_server(memcached_server_st *ptr, bool io_death)
   }
 }
 
-void memcached_quit(memcached_st *ptr)
+void send_quit(memcached_st *ptr)
 {
-  if (memcached_server_count(ptr))
+  for (uint32_t x= 0; x < memcached_server_count(ptr); x++)
   {
-    for (uint32_t x= 0; x < memcached_server_count(ptr); x++)
-    {
-      memcached_server_write_instance_st instance=
-        memcached_server_instance_fetch(ptr, x);
+    memcached_server_write_instance_st instance=
+      memcached_server_instance_fetch(ptr, x);
 
-      memcached_quit_server(instance, false);
-    }
+    memcached_quit_server(instance, false);
+  }
+}
+
+void memcached_quit(memcached_st *ptr)
+{
+  if (initialize_query(ptr) != MEMCACHED_SUCCESS)
+  {
+    return;
   }
+
+  send_quit(ptr);
 }
index e252a1ea10b24396090ad082fbfda3449db68c92..e640020a3eb7a794490878db7acd84a10f002459 100644 (file)
@@ -22,6 +22,9 @@ void memcached_quit(memcached_st *ptr);
 LIBMEMCACHED_LOCAL
 void memcached_quit_server(memcached_server_st *ptr, bool io_death);
 
+LIBMEMCACHED_LOCAL
+void send_quit(memcached_st *ptr);
+
 #ifdef __cplusplus
 }
 #endif
index b446d13155bc33456e151c3c92012044b884c253..4fe676b05a82691493c326f61ed4962bb83e9cea 100644 (file)
@@ -168,6 +168,12 @@ memcached_return_t memcached_server_cursor(const memcached_st *ptr,
                                            void *context,
                                            uint32_t number_of_callbacks)
 {
+  memcached_return_t rc;
+  if ((rc= initialize_const_query(ptr)) != MEMCACHED_SUCCESS)
+  {
+    return rc;
+  }
+
   for (uint32_t x= 0; x < memcached_server_count(ptr); x++)
   {
     memcached_server_instance_st instance=
@@ -215,14 +221,20 @@ memcached_server_instance_st memcached_server_by_key(const memcached_st *ptr,
   uint32_t server_key;
   memcached_server_instance_st instance;
 
-  *error= memcached_validate_key_length(key_length,
-                                        ptr->flags.binary_protocol);
-  unlikely (*error != MEMCACHED_SUCCESS)
+  memcached_return_t rc;
+  if ((rc= initialize_const_query(ptr)) != MEMCACHED_SUCCESS)
+  {
+    if (error)
+      *error= rc;
+
     return NULL;
+  }
 
-  unlikely (memcached_server_count(ptr) == 0)
+  if ((rc= memcached_validate_key_length(key_length, ptr->flags.binary_protocol)) != MEMCACHED_SUCCESS)
   {
-    *error= MEMCACHED_NO_SERVERS;
+    if (error)
+      *error= rc;
+
     return NULL;
   }
 
@@ -239,14 +251,22 @@ memcached_server_instance_st memcached_server_by_key(const memcached_st *ptr,
 
 }
 
-void memcached_server_error_reset(memcached_server_st *ptr)
+void memcached_server_error_reset(memcached_server_st *self)
 {
-  ptr->cached_server_error[0]= 0;
+  WATCHPOINT_ASSERT(self);
+  if (! self)
+    return;
+
+  self->cached_server_error[0]= 0;
 }
 
-memcached_server_instance_st memcached_server_get_last_disconnect(const memcached_st *ptr)
+memcached_server_instance_st memcached_server_get_last_disconnect(const memcached_st *self)
 {
-  return ptr->last_disconnected_server;
+  WATCHPOINT_ASSERT(self);
+  if (! self)
+    return 0;
+
+  return self->last_disconnected_server;
 }
 
 void memcached_server_list_free(memcached_server_list_st self)
@@ -276,26 +296,46 @@ void memcached_server_list_free(memcached_server_list_st self)
 
 uint32_t memcached_servers_set_count(memcached_server_st *servers, uint32_t count)
 {
+  WATCHPOINT_ASSERT(servers);
+  if (! servers)
+    return 0;
+
   return servers->number_of_hosts= count;
 }
 
 uint32_t memcached_server_count(const memcached_st *self)
 {
+  WATCHPOINT_ASSERT(self);
+  if (! self)
+    return 0;
+
   return self->number_of_hosts;
 }
 
 const char *memcached_server_name(memcached_server_instance_st self)
 {
+  WATCHPOINT_ASSERT(self);
+  if (! self)
+    return NULL;
+
   return self->hostname;
 }
 
 in_port_t memcached_server_port(memcached_server_instance_st self)
 {
+  WATCHPOINT_ASSERT(self);
+  if (! self)
+    return 0;
+
   return self->port;
 }
 
 uint32_t memcached_server_response_count(memcached_server_instance_st self)
 {
+  WATCHPOINT_ASSERT(self);
+  if (! self)
+    return 0;
+
   return self->cursor_active;
 }
 
index 83d342a1f096559cc66d5a66be5e124415783d7c..45b530e491cbfab745576ec6c34f5bd742a6aecf 100644 (file)
@@ -405,15 +405,16 @@ memcached_stat_st *memcached_stat(memcached_st *self, char *args, memcached_retu
   memcached_return_t rc;
   memcached_stat_st *stats;
 
-  if (! self)
+  if ((rc= initialize_query(self)) != MEMCACHED_SUCCESS)
   {
-    WATCHPOINT_ASSERT(self);
+    if (error)
+      *error= rc;
+
     return NULL;
   }
 
   WATCHPOINT_ASSERT(error);
 
-
   unlikely (self->flags.use_udp)
   {
     if (error)
@@ -432,6 +433,7 @@ memcached_stat_st *memcached_stat(memcached_st *self, char *args, memcached_retu
     return NULL;
   }
 
+  WATCHPOINT_ASSERT(rc == MEMCACHED_SUCCESS);
   rc= MEMCACHED_SUCCESS;
   for (uint32_t x= 0; x < memcached_server_count(self); x++)
   {
@@ -467,7 +469,6 @@ memcached_stat_st *memcached_stat(memcached_st *self, char *args, memcached_retu
 memcached_return_t memcached_stat_servername(memcached_stat_st *memc_stat, char *args,
                                              const char *hostname, in_port_t port)
 {
-  memcached_return_t rc;
   memcached_st memc;
   memcached_st *memc_ptr;
   memcached_server_write_instance_st instance;
@@ -475,10 +476,17 @@ memcached_return_t memcached_stat_servername(memcached_stat_st *memc_stat, char
   memset(memc_stat, 0, sizeof(memcached_stat_st));
 
   memc_ptr= memcached_create(&memc);
-  WATCHPOINT_ASSERT(memc_ptr);
+  if (! memc_ptr)
+    return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
 
   memcached_server_add(&memc, hostname, port);
 
+  memcached_return_t rc;
+  if ((rc= initialize_query(memc_ptr)) != MEMCACHED_SUCCESS)
+  {
+    return rc;
+  }
+
   instance= memcached_server_instance_fetch(memc_ptr, 0);
 
   if (memc.flags.binary_protocol)
index c31a473a3b50291cc56798c50b2900b129f2fec7..331c7fae9ce7a985d2b906187657cfb9322d2c1b 100644 (file)
@@ -67,20 +67,22 @@ static inline memcached_return_t memcached_send(memcached_st *ptr,
 {
   bool to_write;
   size_t write_length;
-  memcached_return_t rc;
   char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
   uint32_t server_key;
   memcached_server_write_instance_st instance;
 
   WATCHPOINT_ASSERT(!(value == NULL && value_length > 0));
 
+  memcached_return_t rc;
+  if ((rc= initialize_query(ptr)) != MEMCACHED_SUCCESS)
+  {
+    return rc;
+  }
+
   rc= memcached_validate_key_length(key_length, ptr->flags.binary_protocol);
   unlikely (rc != MEMCACHED_SUCCESS)
     return rc;
 
-  unlikely (memcached_server_count(ptr) == 0)
-    return MEMCACHED_NO_SERVERS;
-
   if (ptr->flags.verify_key && (memcached_key_test((const char **)&key, &key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED))
     return MEMCACHED_BAD_KEY_PROVIDED;
 
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 6cf05fa1991be80b7ddb0d995d0cb35453b56d75..893a864c4f816919129913c310f1a6c82309527c 100644 (file)
@@ -121,11 +121,13 @@ void server_startup(server_startup_st *construct)
         int status;
 
         snprintf(construct->pid_file[x], FILENAME_MAX, "/tmp/memcached.pidXXXXXX");
-        if (mkstemp(construct->pid_file[x]) == -1)
+        int fd;
+        if ((fd= mkstemp(construct->pid_file[x])) == -1)
         {
           perror("mkstemp");
           return;
         }
+        close(fd);
 
         {
           char *var;
index 002f2fd339532abd614d915579ef66e0fc456099..ceb859af2dd74cf3a32c31af623431378093cce0 100644 (file)
@@ -4,7 +4,7 @@ dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 dnl Which version of the canonical setup we're using
-AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.171])
+AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.175])
 
 AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[
   AC_ARG_ENABLE([fat-binaries],
@@ -115,7 +115,7 @@ AC_DEFUN([PANDORA_CANONICAL_TARGET],[
     vc_changelog=yes
   ])
   m4_if(PCT_VERSION_FROM_VC,yes,[
-    PANDORA_VC_VERSION
+    PANDORA_VC_INFO_HEADER
   ],[
     PANDORA_TEST_VC_DIR
 
@@ -268,6 +268,7 @@ AC_DEFUN([PANDORA_CANONICAL_TARGET],[
 
   AC_LIB_PREFIX
   PANDORA_HAVE_BETTER_MALLOC
+  PANDORA_WITH_VALGRIND
 
   AC_CHECK_PROGS([DOXYGEN], [doxygen])
   AC_CHECK_PROGS([PERL], [perl])
@@ -328,6 +329,7 @@ AC_DEFUN([PANDORA_CANONICAL_TARGET],[
 #error "You should include config.h as your first include file"
 #endif
 
+#include <config/top.h>
 ])
   mkdir -p config
   cat > config/top.h.stamp <<EOF_CONFIG_TOP
index 83a725154ae25172e53c01a67d026733464aae70..e4a8b478c68d472a7814f7a13dab4de1730c883f 100644 (file)
@@ -1,3 +1,8 @@
+# Copyright (C) 2008 Sun Microsystems, Inc.
+# This file is free software; Sun Microsystems, Inc.
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
 # We check two things: where the include file is for cinttypes. We
 # include AC_TRY_COMPILE for all the combinations we've seen in the
 # wild.  We define one of HAVE_CINTTYPES or HAVE_TR1_CINTTYPES or 
index fb6fbacf87b21158f4754aafa8a24688e89d8a1c..9c84843823010b6d0e84f614dd2c87f078103849 100644 (file)
@@ -1,3 +1,8 @@
+# Copyright (C) 2008 Sun Microsystems, Inc.
+# This file is free software; Sun Microsystems, Inc.
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
 # We check two things: where the include file is for cstdint. We
 # include AC_TRY_COMPILE for all the combinations we've seen in the
 # wild.  We define one of HAVE_CSTDINT or HAVE_TR1_CSTDINT or 
diff --git a/m4/pandora_have_libaio.m4 b/m4/pandora_have_libaio.m4
new file mode 100644 (file)
index 0000000..000073b
--- /dev/null
@@ -0,0 +1,56 @@
+dnl  Copyright (C) 2011 Andrew Hutchings
+dnl This file is free software; Sun Microsystems, Inc.
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+#--------------------------------------------------------------------
+# Check for libaio
+#--------------------------------------------------------------------
+
+
+AC_DEFUN([_PANDORA_SEARCH_LIBAIO],[
+  AC_REQUIRE([AC_LIB_PREFIX])
+
+  AC_CHECK_HEADERS(libaio.h)
+  AC_LIB_HAVE_LINKFLAGS(aio,,
+  [
+    #include <libaio.h>
+  ],
+  [
+    int aio_cmd= IO_CMD_PREAD;
+  ])
+
+  AM_CONDITIONAL(HAVE_LIBAIO, [test "x${ac_cv_libaio}" = "xyes"])
+
+  AS_IF([test "x${ac_cv_libaio}" = "xyes"],[
+    AC_DEFINE([LINUX_NATIVE_AIO], [1], [Enabel libaio support in InnoDB])
+  ])
+])
+
+AC_DEFUN([_PANDORA_HAVE_LIBAIO],[
+
+  AC_ARG_ENABLE([libaio],
+    [AS_HELP_STRING([--disable-libaio],
+      [Build with libaio support @<:@default=on@:>@])],
+    [ac_enable_libaio="$enableval"],
+    [ac_enable_libaio="yes"])
+
+  _PANDORA_SEARCH_LIBAIO
+])
+
+
+AC_DEFUN([PANDORA_HAVE_LIBAIO],[
+  AC_REQUIRE([_PANDORA_HAVE_LIBAIO])
+])
+
+AC_DEFUN([_PANDORA_REQUIRE_LIBAIO],[
+  ac_enable_libaio="yes"
+  _PANDORA_SEARCH_LIBAIO
+  AS_IF([test "x$ac_cv_header_libaio_h" = "xno"],[
+    AC_MSG_ERROR([Couldn't find libaio.h. On Debian this can be found in libaio-dev. On Redhat this can be found in libaio-devel.])
+  ])
+])
+
+AC_DEFUN([PANDORA_REQUIRE_LIBAIO],[
+  AC_REQUIRE([_PANDORA_REQUIRE_LIBAIO])
+])
index 6b9ecba59ed8ca89f0378cb5cf523c5fb3e806df..ea6953ecf519f820f04f5cf158458894a8b4c7f7 100644 (file)
@@ -28,6 +28,8 @@ AC_DEFUN([_PANDORA_SEARCH_BOOST_FILESYSTEM],[
   AM_CONDITIONAL(HAVE_BOOST_FILESYSTEM,
     [test "x${ac_cv_libboost_filesystem}" = "xyes" -o "x${ac_cv_libboost_filesystem_mt}" = "xyes"])
   BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_FILESYSTEM_MT} ${LTLIBBOOST_FILESYSTEM}"
+  AC_DEFINE([BOOST_FILESYSTEM_DEPRECATED], [1],
+            [Use the v2 interface until we can stop using old versions])
   AC_SUBST(BOOST_LIBS) 
 ])
 
diff --git a/m4/pandora_have_libboost_test.m4 b/m4/pandora_have_libboost_test.m4
new file mode 100644 (file)
index 0000000..7a526c0
--- /dev/null
@@ -0,0 +1,45 @@
+dnl Copyright (C) 2011 Andrew Hutchings
+dnl This file is free software; Andrew Hutchings
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([_PANDORA_SEARCH_BOOST_TEST],[
+  AC_REQUIRE([AC_LIB_PREFIX])
+
+  dnl --------------------------------------------------------------------
+  dnl  Check for boost::test
+  dnl --------------------------------------------------------------------
+
+  AC_LANG_PUSH(C++)
+  AC_LIB_HAVE_LINKFLAGS(boost_unit_test_framework-mt,,[
+    #include <boost/test/unit_test.hpp>
+  ],[
+    boost::unit_test::unit_test_log.set_threshold_level(boost::unit_test::log_messages);
+  ])
+  AS_IF([test "x${ac_cv_libboost_unit_test_framework_mt}" = "xno"],[
+    AC_LIB_HAVE_LINKFLAGS(boost_unit_test_framework,,[
+      #include <boost/test/unit_test.hpp>
+    ],[
+      boost::unit_test::unit_test_log.set_threshold_level(boost::unit_test::log_messages);
+    ])
+  ])
+  AC_LANG_POP()
+  
+  AM_CONDITIONAL(HAVE_BOOST_TEST,
+    [test "x${ac_cv_libboost_unit_test_framework}" = "xyes" -o "x${ac_cv_libboost_unit_test_framework_mt}" = "xyes"])
+  BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_TEST_MT} ${LTLIBBOOST_TEST}"
+  AC_SUBST(BOOST_LIBS) 
+])
+
+AC_DEFUN([PANDORA_HAVE_BOOST_TEST],[
+  PANDORA_HAVE_BOOST($1)
+  _PANDORA_SEARCH_BOOST_TEST($1)
+])
+
+AC_DEFUN([PANDORA_REQUIRE_BOOST_TEST],[
+  PANDORA_REQUIRE_BOOST($1)
+  _PANDORA_SEARCH_BOOST_TEST($1)
+  AS_IF([test "x${ac_cv_libboost_unit_test_framework}" = "xno" -a "x${ac_cv_libboost_unit_test_framework_mt}" = "xno"],
+      AC_MSG_ERROR([boost::test is required for ${PACKAGE}]))
+])
+
index 56f71ccc03299189f7a7fcf0ce6c494d85886f2c..b957f64c5ce1852726833472fa39c663f3658d29 100644 (file)
@@ -21,7 +21,7 @@ AC_DEFUN([_PANDORA_SEARCH_LIBHAILDB],[
     AC_LIB_HAVE_LINKFLAGS(haildb,,[
       #include <haildb.h>
     ],[
-      ib_set_panic_handler(NULL);
+      ib_update_table_statistics(NULL);
     ])
     AS_IF([test "x${ac_cv_libhaildb}" = "xyes"],[
       AC_DEFINE([HAVE_HAILDB_H],[1],[Do we have haildb.h])
@@ -39,5 +39,5 @@ AC_DEFUN([PANDORA_HAVE_LIBHAILDB],[
 AC_DEFUN([PANDORA_REQUIRE_LIBHAILDB],[
   AC_REQUIRE([PANDORA_HAVE_LIBHAILDB])
   AS_IF([test "x${ac_cv_libhaildb}" = "xno"],
-      AC_MSG_ERROR([libhaildb 2.2.0 or later is required for ${PACKAGE}]))
+      AC_MSG_ERROR([libhaildb 2.3.2 or later is required for ${PACKAGE}]))
 ])
index f1c583e6e180ae550967cfe0f54cfed3ee789fe5..0bd28b9af89027dd637ac3060704eaae606aea1f 100644 (file)
@@ -46,7 +46,7 @@ AC_DEFUN([_PANDORA_REQUIRE_LIBUUID],[
   ac_enable_libuuid="yes"
   _PANDORA_SEARCH_LIBUUID
   AS_IF([test "x$ac_cv_header_uuid_uuid_h" = "xno"],[
-    AC_MSG_ERROR([Couldn't find uuid/uuid.h. On Debian this can be found in uuid-dev. On Redhat this can be found in e2fsprogs-devel.])
+    AC_MSG_ERROR([Couldn't find uuid/uuid.h. On Debian this can be found in uuid-dev. On RHEL 4 this can be found in e2fsprogs-devel and Fedora/RHEL 6 in libuuid-devel.])
   ])
 ])
 
index 6ee13da0bff286838731bfac18ea1b556055d801..540443b047f5c07703ba0c4648f496c6d7bd87e4 100644 (file)
@@ -17,7 +17,7 @@ AC_DEFUN([PANDORA_PLUGINS],[
   dnl get called probably during autoconf too, so it's important to protect
   dnl with test -f ... if the files exist, we don't have the chicken/egg 
   dnl problem and therefore don't need to do anything here
-  m4_syscmd([python config/pandora-plugin > /dev/null])
+  m4_syscmd([PYTHON=${PYTHON:-python} && $PYTHON config/pandora-plugin > /dev/null])
   m4_syscmd([test -f config/plugin.stamp || touch config/plugin.stamp aclocal.m4])
 
   m4_sinclude(config/pandora-plugin.ac)
index 30277d2f7aaee96e8cd1e3fe1d9204d300ba8835..ef1daac728fd297ffdc4673c8ecafbcc7bbb2ea9 100644 (file)
@@ -1,3 +1,8 @@
+# Copyright (C) 2008 Sun Microsystems, Inc.
+# This file is free software; Sun Microsystems, Inc.
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
 # We check two things: where the include file is for unordered_map, and
 # what namespace unordered_map lives in within that include file.  We
 # include AC_COMPILE_IFELSE for all the combinations we've seen in the
index 5e7ed652bfd553020cb0a444e8263f9f1392a723..a1fb60b3dd1d2fc077af8c58ca82673f219deea9 100644 (file)
@@ -60,10 +60,19 @@ AC_DEFUN([PANDORA_BUILDING_FROM_VC],[
         PANDORA_VC_REVNO="${PANDORA_BZR_REVNO}"
         PANDORA_VC_REVID=`bzr log -r-1 --show-ids | grep revision-id | cut -f2 -d' ' | head -1`
         PANDORA_VC_BRANCH=`bzr nick`
+        PANDORA_VC_TAG=`bzr tags -r-1 | cut -f1 -d' ' | head -1`
+        PANDORA_VC_LATEST_TAG=`bzr tags --sort=time | grep -v '\?'| cut -f1 -d' '  | tail -1`
         if test "x${vc_changelog}" = "xyes"; then
           bzr log --gnu > ChangeLog
         fi
       fi
+    elif test "${pandora_building_from_git}" = "yes"; then
+      echo "# Grabbing changelog and version information from git"
+      PANDORA_GIT_REVID=`git --no-pager log --max-count=1 | cut -f2 -d' ' | head -1`
+      if test "x$PANDORA_GIT_REVID" != "x${PANDORA_VC_REVNO}" ; then
+         PANDORA_VC_REVID="${PANDORA_GIT_REVID}"
+         PANDORA_VC_BRANCH=`git branch | grep -Ei "\* (.*)" | cut -f2 -d' '`
+      fi
     fi
 
     if ! test -d config ; then
@@ -75,6 +84,8 @@ AC_DEFUN([PANDORA_BUILDING_FROM_VC],[
 PANDORA_VC_REVNO=${PANDORA_VC_REVNO}
 PANDORA_VC_REVID=${PANDORA_VC_REVID}
 PANDORA_VC_BRANCH=${PANDORA_VC_BRANCH}
+PANDORA_VC_TAG=${PANDORA_VC_TAG}
+PANDORA_VC_LATEST_TAG=${PANDORA_VC_LATEST_TAG}
 PANDORA_RELEASE_DATE=${PANDORA_RELEASE_DATE}
 PANDORA_RELEASE_NODOTS_DATE=${PANDORA_RELEASE_NODOTS_DATE}
 EOF
@@ -100,6 +111,10 @@ AC_DEFUN([PANDORA_VC_VERSION],[
     _PANDORA_READ_FROM_FILE([PANDORA_VC_REVID],${srcdir}/config/pandora_vc_revinfo)
     _PANDORA_READ_FROM_FILE([PANDORA_VC_BRANCH],
                             ${srcdir}/config/pandora_vc_revinfo)
+    _PANDORA_READ_FROM_FILE([PANDORA_VC_TAG],
+                            ${srcdir}/config/pandora_vc_revinfo)
+    _PANDORA_READ_FROM_FILE([PANDORA_VC_LATEST_TAG],
+                            ${srcdir}/config/pandora_vc_revinfo)
     _PANDORA_READ_FROM_FILE([PANDORA_RELEASE_DATE],
                             ${srcdir}/config/pandora_vc_revinfo)
     _PANDORA_READ_FROM_FILE([PANDORA_RELEASE_NODOTS_DATE],
@@ -111,8 +126,19 @@ AC_DEFUN([PANDORA_VC_VERSION],[
     PANDORA_RELEASE_COMMENT="trunk"
   ])
     
-  PANDORA_RELEASE_VERSION="${PANDORA_RELEASE_DATE}.${PANDORA_VC_REVNO}"
-  PANDORA_RELEASE_ID="${PANDORA_RELEASE_NODOTS_DATE}${PANDORA_VC_REVNO}"
+  AS_IF([test "x${PANDORA_VC_TAG}" != "x"],[
+    PANDORA_RELEASE_VERSION="${PANDORA_VC_TAG}"
+  ],[
+    AS_IF([test "x${PANDORA_VC_LATEST_TAG}" != "x"],[
+      PANDORA_RELEASE_VERSION="${PANDORA_VC_LATEST_TAG}.${PANDORA_VC_REVNO}"
+    ],[
+      PANDORA_RELEASE_VERSION="${PANDORA_RELEASE_DATE}.${PANDORA_VC_REVNO}"
+    ])
+  ])
+  changequote(<<, >>)dnl
+  PANDORA_RELEASE_ID=`echo ${PANDORA_RELEASE_VERSION} | sed 's/[^0-9]//g'`
+  changequote([, ])dnl
+
 
   VERSION="${PANDORA_RELEASE_VERSION}"
   AC_DEFINE_UNQUOTED([PANDORA_RELEASE_VERSION],["${PANDORA_RELEASE_VERSION}"],
index a85d68b0c32c7dc74f57772ab62c9b8a9637cb34..f0baa60111f87f33d0a3163501fc87cc3fc42a02 100644 (file)
@@ -35,23 +35,33 @@ AC_DEFUN([PANDORA_CHECK_VISIBILITY],
          extern __attribute__((__visibility__("default"))) int exportedvar;
          extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
          extern __attribute__((__visibility__("default"))) int exportedfunc (void);],
-        [],
-        [gl_cv_cc_visibility=yes],
-        [gl_cv_cc_visibility=no])
+        [],[
+        case "$host_os" in
+          *darwin*)
+            gl_cv_cc_visibility=no
+            ;;
+          *)
+            gl_cv_cc_visibility=yes
+            ;;
+        esac
+        ],[gl_cv_cc_visibility=no])
       CFLAGS="$gl_save_CFLAGS"])
     AC_MSG_RESULT([$gl_cv_cc_visibility])
     if test $gl_cv_cc_visibility = yes; then
       CFLAG_VISIBILITY="-fvisibility=hidden"
+      CXXFLAG_VISIBILITY="-fvisibility=hidden -fvisibility-inlines-hidden"
       NO_VISIBILITY="-fvisibility=default"
       HAVE_VISIBILITY=1
     fi
   ])
   AS_IF([test "x$SUNCC" = "xyes"],[
     CFLAG_VISIBILITY="-xldscope=hidden"
+    CXXFLAG_VISIBILITY="-xldscope=hidden"
     NO_VISIBILITY="-xldscope=global"
     HAVE_VISIBILITY=1
   ])
   AC_SUBST([CFLAG_VISIBILITY])
+  AC_SUBST([CXXFLAG_VISIBILITY])
   AC_SUBST([NO_VISIBILITY])
   AC_SUBST([HAVE_VISIBILITY])
   AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
@@ -61,5 +71,5 @@ AC_DEFUN([PANDORA_CHECK_VISIBILITY],
 AC_DEFUN([PANDORA_ENABLE_VISIBILITY],[
   AC_REQUIRE([PANDORA_CHECK_VISIBILITY])
   AM_CFLAGS="${AM_CFLAGS} ${CFLAG_VISIBILITY}"
-  AM_CXXFLAGS="${AM_CXXFLAGS} ${CFLAG_VISIBILITY}"
+  AM_CXXFLAGS="${AM_CXXFLAGS} ${CXXFLAG_VISIBILITY}"
 ])
index 7ef435ff23b329d257b15407fe776cc51aabebd1..0f6d47afd6efb17dadbf5117f39e502bda5e265d 100644 (file)
@@ -75,8 +75,11 @@ AC_DEFUN([PANDORA_WARNINGS],[
 
 
         
-    AS_IF([test "$ac_cv_warnings_as_errors" = "yes"],
-          [W_FAIL="-Werror"])
+    AS_IF([test "$ac_cv_warnings_as_errors" = "yes"],[
+      W_FAIL="-Werror"
+      SPHINX_WARNINGS="-W"
+      INTLTOOL_WARNINGS="yes"
+    ])
 
     AC_CACHE_CHECK([whether it is safe to use -fdiagnostics-show-option],
       [ac_cv_safe_to_use_fdiagnostics_show_option_],
@@ -127,7 +130,7 @@ AC_DEFUN([PANDORA_WARNINGS],[
       
     ],[
       m4_if(PW_LESS_WARNINGS,[no],[
-        BASE_WARNINGS_FULL="${W_CONVERSION} -Wstrict-aliasing"
+        BASE_WARNINGS_FULL="${W_CONVERSION} -Wstrict-aliasing -Wswitch-enum "
         CC_WARNINGS_FULL="-Wswitch-default -Wswitch-enum -Wwrite-strings"
         CXX_WARNINGS_FULL=""
         NO_OLD_STYLE_CAST="-Wno-old-style-cast"
@@ -153,7 +156,7 @@ AC_DEFUN([PANDORA_WARNINGS],[
         [ac_cv_safe_to_use_Wextra_=no])
       CFLAGS="$save_CFLAGS"])
 
-      BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wswitch-enum -Wundef -Wshadow ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${F_LOOP_PARALLELIZE_ALL} ${BASE_WARNINGS_FULL}"
+      BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wundef -Wshadow ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${F_LOOP_PARALLELIZE_ALL} ${BASE_WARNINGS_FULL}"
       AS_IF([test "$ac_cv_safe_to_use_Wextra_" = "yes"],
             [BASE_WARNINGS="${BASE_WARNINGS} -Wextra"],
             [BASE_WARNINGS="${BASE_WARNINGS} -W"])
@@ -372,6 +375,7 @@ inline const EnumDescriptor* GetEnumDescriptor<Table_TableOptions_RowType>() {
       PROTOSKIP_WARNINGS="-Wno-effc++ -Wno-shadow -Wno-missing-braces ${NO_ATTRIBUTES}"
       NO_WERROR="-Wno-error"
       PERMISSIVE_WARNINGS="-Wno-error -Wno-unused-function -fpermissive"
+      PERMISSIVE_C_WARNINGS="-Wno-error -Wno-redundant-decls"
       AS_IF([test "$host_vendor" = "apple"],[
         BOOSTSKIP_WARNINGS="-Wno-uninitialized"
       ])
@@ -434,7 +438,10 @@ inline const EnumDescriptor* GetEnumDescriptor<Table_TableOptions_RowType>() {
   AC_SUBST(INNOBASE_SKIP_WARNINGS)
   AC_SUBST(BOOSTSKIP_WARNINGS)
   AC_SUBST(PERMISSIVE_WARNINGS)
+  AC_SUBST(PERMISSIVE_C_WARNINGS)
   AC_SUBST(NO_WERROR)
   AC_SUBST([GCOV_LIBS])
+  AC_SUBST([SPHINX_WARNINGS])
+  AC_SUBST([INTLTOOL_WARNINGS])
 
 ])
diff --git a/m4/pandora_with_valgrind.m4 b/m4/pandora_with_valgrind.m4
new file mode 100644 (file)
index 0000000..47944d8
--- /dev/null
@@ -0,0 +1,17 @@
+dnl  Copyright (C) 2010 Brian Aker
+dnl This file is free software; Brian Aker
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([PANDORA_WITH_VALGRIND],[
+
+  AC_ARG_WITH([valgrind],
+    [AS_HELP_STRING([--with-valgrind],
+       [Add additional valgrind code for testing with valgrind.])],
+    [with_valgrind=yes],
+    [with_valgrind=no])
+  AM_CONDITIONAL(HAVE_VALGRIND,[test "x${with_valgrind}" = "xyes"])
+  AS_IF([test "x$with_valgrind" = "xyes"],
+        AC_DEFINE([HAVE_VALGRIND],[1],
+                  [Add additional valgrind code for testing with valgrind.]))
+])
diff --git a/m4/pod2man.m4 b/m4/pod2man.m4
deleted file mode 100644 (file)
index 2658998..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-AC_DEFUN([REQUIRE_POD2MAN],[
-  AC_PATH_PROG([POD2MAN], [pod2man],
-    "no", [$PATH:/usr/bin:/usr/local/bin:/usr/perl5/bin])
-  AS_IF([test "x$POD2MAN" = "xno"],
-    AC_MSG_ERROR(["Could not find pod2man anywhere in path"]))
-  AC_SUBST(POD2MAN)
-])
diff --git a/m4/podchecker.m4 b/m4/podchecker.m4
deleted file mode 100644 (file)
index ae10a6b..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-AC_DEFUN([REQUIRE_PODCHECKER],[
-  AC_PATH_PROG([PODCHECKER], [podchecker],
-    "no", [$PATH:/usr/bin:/usr/local/bin:/usr/perl5/bin])
-  AS_IF([test "x$PODCHECKER" = "xno"],
-    AC_MSG_ERROR(["Could not find podchecker anywhere in path"]))
-  AC_SUBST(PODCHECKER)
-])
index 05f369a83fe5771ee2a9bd6f41cfc65fb9b6c93d..8535bcad5493b9277382570ad5aa117102069ebb 100644 (file)
@@ -49,7 +49,7 @@ you will need to install %{name}-devel.
 
 %build
 %configure
-%{__make} %{_smp_mflags}
+%{__make}
 
 
 %install
index 98f21a31af983a4e902288c5502513cdd5631fcb..f689742a97fb35779a70aad58504ce9ea58b46df 100644 (file)
@@ -50,7 +50,7 @@ you will need to install %{name}-devel.
 
 %build
 %configure
-%{__make} %{_smp_mflags}
+%{__make}
 
 
 %install
@@ -97,6 +97,7 @@ you will need to install %{name}-devel.
 %{_mandir}/man1/memerror.1.gz
 %{_mandir}/man1/memflush.1.gz
 %{_mandir}/man1/memrm.1.gz
+%{_mandir}/man1/memaslap.1.gz
 %{_mandir}/man1/memslap.1.gz
 %{_mandir}/man1/memstat.1.gz
 
@@ -121,6 +122,8 @@ you will need to install %{name}-devel.
 %{_includedir}/libmemcached/callback.h
 %{_includedir}/libmemcached/configure.h
 %{_includedir}/libmemcached/constants.h
+%{_includedir}/libhashkit/str_algorithm.h
+%{_includedir}/libmemcached/memcached/vbucket.h
 %{_includedir}/libmemcached/delete.h
 %{_includedir}/libmemcached/dump.h
 %{_includedir}/libmemcached/error.h
@@ -179,7 +182,10 @@ you will need to install %{name}-devel.
 %{_mandir}/man3/hashkit_md5.3.gz
 %{_mandir}/man3/hashkit_murmur.3.gz
 %{_mandir}/man3/hashkit_value.3.gz
+%{_mandir}/man3/libhashkit.3.gz
 %{_mandir}/man3/libmemcached.3.gz
+%{_mandir}/man3/libmemcached_check_configuration.3.gz
+%{_mandir}/man3/libmemcached_configuration.3.gz
 %{_mandir}/man3/libmemcached_examples.3.gz
 %{_mandir}/man3/libmemcachedutil.3.gz
 %{_mandir}/man3/memcached_add.3.gz
@@ -195,6 +201,7 @@ you will need to install %{name}-devel.
 %{_mandir}/man3/memcached_cas_by_key.3.gz
 %{_mandir}/man3/memcached_clone.3.gz
 %{_mandir}/man3/memcached_create.3.gz
+%{_mandir}/man3/memcached_create_with_options.3.gz
 %{_mandir}/man3/memcached_decrement.3.gz
 %{_mandir}/man3/memcached_decrement_with_initial.3.gz
 %{_mandir}/man3/memcached_delete.3.gz
index 15daa39fe001d85df5308810b0a66b882fcb0a3b..014c9bba65f98dcee30d5b0f98d22666a5e0dbc7 100644 (file)
@@ -319,8 +319,6 @@ static test_return_t clone_test(memcached_st *memc)
     { // Test all of the flags
       test_true(memc_clone->flags.no_block == memc->flags.no_block);
       test_true(memc_clone->flags.tcp_nodelay == memc->flags.tcp_nodelay);
-      test_true(memc_clone->flags.reuse_memory == memc->flags.reuse_memory);
-      test_true(memc_clone->flags.use_cache_lookups == memc->flags.use_cache_lookups);
       test_true(memc_clone->flags.support_cas == memc->flags.support_cas);
       test_true(memc_clone->flags.buffer_requests == memc->flags.buffer_requests);
       test_true(memc_clone->flags.use_sort_hosts == memc->flags.use_sort_hosts);
@@ -6219,7 +6217,6 @@ test_st parser_tests[] ={
   {"hash", 0, (test_callback_fn)parser_hash_test },
   {"libmemcached_check_configuration", 0, (test_callback_fn)libmemcached_check_configuration_test },
   {"libmemcached_check_configuration_with_filename", 0, (test_callback_fn)libmemcached_check_configuration_with_filename_test },
-  {"memcached_parse_configure_file", 0, (test_callback_fn)memcached_parse_configure_file_test },
   {"number_options", 0, (test_callback_fn)parser_number_options_test },
   {"randomly generated options", 0, (test_callback_fn)random_statement_build_test },
   {"prefix_key", 0, (test_callback_fn)parser_key_prefix_test },
index c7b7dc09cd82e832d3d1e52ee4322638ea1b079f..900e89a7631ba73a14a0bfea7d38f18774471f87 100644 (file)
@@ -40,6 +40,7 @@
 #include <vector>
 #include <iostream>
 #include <string>
+#include <errno.h>
 
 #define BUILDING_LIBMEMCACHED
 #include <libmemcached/memcached.h>
@@ -118,30 +119,26 @@ static test_return_t __check_IO_MSG_WATERMARK(memcached_st *memc, const scanner_
   return TEST_SUCCESS;
 }
 
-static test_return_t __check_AUTO_EJECT_HOSTS(memcached_st *memc, const scanner_string_st &value)
+static test_return_t __check_REMOVE_FAILED_SERVERS(memcached_st *memc, const scanner_string_st &)
 {
-  (void)value;
-  test_true(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS));
+  test_true(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS));
   return TEST_SUCCESS;
 }
 
-static test_return_t __check_NOREPLY(memcached_st *memc, const scanner_string_st &value)
+static test_return_t __check_NOREPLY(memcached_st *memc, const scanner_string_st &)
 {
-  (void)value;
   test_true(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_NOREPLY));
   return TEST_SUCCESS;
 }
 
-static test_return_t __check_VERIFY_KEY(memcached_st *memc, const scanner_string_st &value)
+static test_return_t __check_VERIFY_KEY(memcached_st *memc, const scanner_string_st &)
 {
-  (void)value;
   test_true(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_VERIFY_KEY));
   return TEST_SUCCESS;
 }
 
-static test_return_t __check_distribution_RANDOM(memcached_st *memc, const scanner_string_st &value)
+static test_return_t __check_distribution_RANDOM(memcached_st *memc, const scanner_string_st &)
 {
-  (void)value;
   test_true(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_DISTRIBUTION) == MEMCACHED_DISTRIBUTION_RANDOM);
   return TEST_SUCCESS;
 }
@@ -176,14 +173,14 @@ scanner_variable_t bad_test_strings[]= {
 
 scanner_variable_t test_number_options[]= {
   { ARRAY,  make_scanner_string("--CONNECT_TIMEOUT=456"), scanner_string_null, NULL },
-  { ARRAY,  make_scanner_string("--IO_MSG_WATERMARK=456"), make_scanner_string("456"), __check_IO_MSG_WATERMARK },
   { ARRAY,  make_scanner_string("--IO_BYTES_WATERMARK=456"), scanner_string_null, NULL },
   { ARRAY,  make_scanner_string("--IO_KEY_PREFETCH=456"), scanner_string_null, NULL },
+  { ARRAY,  make_scanner_string("--IO_MSG_WATERMARK=456"), make_scanner_string("456"), __check_IO_MSG_WATERMARK },
   { ARRAY,  make_scanner_string("--NUMBER_OF_REPLICAS=456"), scanner_string_null, NULL },
   { ARRAY,  make_scanner_string("--POLL_TIMEOUT=456"), scanner_string_null, NULL },
   { ARRAY,  make_scanner_string("--RCV_TIMEOUT=456"), scanner_string_null, NULL },
+  { ARRAY,  make_scanner_string("--REMOVE-FAILED-SERVERS=3"), scanner_string_null, __check_REMOVE_FAILED_SERVERS },
   { ARRAY,  make_scanner_string("--RETRY_TIMEOUT=456"), scanner_string_null, NULL },
-  { ARRAY,  make_scanner_string("--SERVER_FAILURE_LIMIT=456"), scanner_string_null, NULL },
   { ARRAY,  make_scanner_string("--SND_TIMEOUT=456"), scanner_string_null, NULL },
   { ARRAY,  make_scanner_string("--SOCKET_RECV_SIZE=456"), scanner_string_null, NULL },
   { ARRAY,  make_scanner_string("--SOCKET_SEND_SIZE=456"), scanner_string_null, NULL },
@@ -191,7 +188,6 @@ scanner_variable_t test_number_options[]= {
 };
 
 scanner_variable_t test_boolean_options[]= {
-  { ARRAY,  make_scanner_string("--AUTO_EJECT_HOSTS"), scanner_string_null, __check_AUTO_EJECT_HOSTS },
   { ARRAY,  make_scanner_string("--BINARY_PROTOCOL"), scanner_string_null, NULL },
   { ARRAY,  make_scanner_string("--BUFFER_REQUESTS"), scanner_string_null, NULL },
   { ARRAY,  make_scanner_string("--HASH_WITH_PREFIX_KEY"), scanner_string_null, NULL },
@@ -210,7 +206,7 @@ scanner_variable_t test_boolean_options[]= {
 scanner_variable_t prefix_key_strings[]= {
   { ARRAY, make_scanner_string("--PREFIX_KEY=foo"), make_scanner_string("foo"), __check_prefix_key },
   { ARRAY, make_scanner_string("--PREFIX-KEY=\"foo\""), make_scanner_string("foo"), __check_prefix_key },
-  { ARRAY, make_scanner_string("--PREFIX-KEY=\"This is a very long key\""), make_scanner_string("This is a very long key"), __check_prefix_key },
+  { ARRAY, make_scanner_string("--PREFIX-KEY=\"This_is_a_very_long_key\""), make_scanner_string("This_is_a_very_long_key"), __check_prefix_key },
   { NIL, scanner_string_null, scanner_string_null, NULL}
 };
 
@@ -239,36 +235,39 @@ scanner_variable_t hash_strings[]= {
 static test_return_t _test_option(scanner_variable_t *scanner, bool test_true= true)
 {
   (void)test_true;
-  memcached_st *memc;
-  memc= memcached_create(NULL);
 
   for (scanner_variable_t *ptr= scanner; ptr->type != NIL; ptr++)
   {
-    memcached_return_t rc;
-    rc= memcached_parse_configuration(memc, ptr->option.c_str, ptr->option.size);
+    memcached_st *memc;
+    memc= memcached_create_with_options(ptr->option.c_str, ptr->option.size);
     if (test_true)
     {
-      if (rc != MEMCACHED_SUCCESS)
+      if (not memc)
       {
-        memcached_error_print(memc);
+        char buffer[2048];
+        memcached_return_t rc= libmemcached_check_configuration(ptr->option.c_str, ptr->option.size, buffer, sizeof(buffer));
+        std::cerr << "About error for " << memcached_strerror(NULL, rc) << " : " << buffer << std::endl;
       }
 
-      test_true(rc == MEMCACHED_SUCCESS);
+      test_true(memc);
 
       if (ptr->check_func)
       {
         test_return_t test_rc= (*ptr->check_func)(memc, ptr->result);
         if (test_rc != TEST_SUCCESS)
+        {
+          memcached_free(memc);
           return test_rc;
+        }
       }
+
+      memcached_free(memc);
     }
     else
     {
-      test_false_with(rc == MEMCACHED_SUCCESS, ptr->option.c_str);
+      test_false_with(memc, ptr->option.c_str);
     }
-    memcached_reset(memc);
   }
-  memcached_free(memc);
 
   return TEST_SUCCESS;
 }
@@ -326,23 +325,6 @@ test_return_t parser_key_prefix_test(memcached_st*)
 
 #define SUPPORT_EXAMPLE_CNF "support/example.cnf"
 
-test_return_t memcached_parse_configure_file_test(memcached_st*)
-{
-  if (access(SUPPORT_EXAMPLE_CNF, R_OK))
-    return TEST_SKIPPED;
-
-  memcached_st memc;
-  memcached_st *memc_ptr= memcached_create(&memc);
-
-  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_free(memc_ptr);
-
-  return TEST_SUCCESS;
-}
-
 test_return_t memcached_create_with_options_with_filename(memcached_st*)
 {
   if (access(SUPPORT_EXAMPLE_CNF, R_OK))
@@ -481,13 +463,31 @@ test_return_t random_statement_build_test(memcached_st*)
       random_options+= " ";
     }
 
-    memcached_return_t rc;
     memcached_st *memc_ptr= memcached_create(NULL);
-    rc= memcached_parse_configuration(memc_ptr, random_options.c_str(), random_options.size() -1);
-    if (rc == MEMCACHED_PARSE_ERROR)
+    memc_ptr= memcached_create_with_options(random_options.c_str(), random_options.size() -1);
+    if (not memc_ptr)
     {
-      std::cerr << std::endl << "Failed to parse(" << memcached_strerror(NULL, rc) << "): " << random_options << std::endl;
-      memcached_error_print(memc_ptr);
+      switch (errno) 
+      {
+      case EINVAL:
+#if 0 // Testing framework is not smart enough for this just yet.
+        {
+          // We will try to find the specific error
+          char buffer[2048];
+          memcached_return_t rc= libmemcached_check_configuration(random_options.c_str(), random_options.size(), buffer, sizeof(buffer));
+          test_true_got(rc != MEMCACHED_SUCCESS, "memcached_create_with_options() failed whiled libmemcached_check_configuration() was successful");
+          std::cerr << "Error occured on " << random_options.c_str() << " : " << buffer << std::endl;
+          return TEST_FAILURE;
+        }
+#endif
+        break;
+      case ENOMEM:
+        std::cerr << "Failed to allocate memory for memcached_create_with_options()" << std::endl;
+        return TEST_FAILURE;
+      default:
+        std::cerr << "Unknown error from memcached_create_with_options?!!" << std::endl;
+        return TEST_FAILURE;
+      }
     }
     memcached_free(memc_ptr);
   }
index c12a7bdfcad98281a1c741a6c344172fade74072..c50b3789b1e2502a10acf75f383157b1b148db06 100644 (file)
@@ -67,9 +67,6 @@ test_return_t parser_boolean_options_test(memcached_st*);
 LIBTEST_INTERNAL_API
 test_return_t parser_key_prefix_test(memcached_st*);
 
-LIBTEST_INTERNAL_API
-test_return_t memcached_parse_configure_file_test(memcached_st*);
-
 LIBTEST_INTERNAL_API
   test_return_t libmemcached_check_configuration_test(memcached_st*);
 
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;