Merge in docs.
authorBrian Aker <brian@tangent.org>
Sun, 19 Jun 2011 08:25:48 +0000 (01:25 -0700)
committerBrian Aker <brian@tangent.org>
Sun, 19 Jun 2011 08:25:48 +0000 (01:25 -0700)
208 files changed:
.bzrignore
ChangeLog
Makefile.am
README
clients/include.am
clients/memcapable.cc
clients/ms_conn.c
configure.ac
docs/conf.py [deleted file]
docs/conf.py.in [new file with mode: 0644]
docs/hashkit_create.rst
docs/include.am
docs/index.rst
docs/libmemcached/memcached_return_t.rst [new file with mode: 0644]
docs/man/hashkit_clone.3 [deleted file]
docs/man/hashkit_crc32.3 [deleted file]
docs/man/hashkit_create.3 [deleted file]
docs/man/hashkit_fnv1_32.3 [deleted file]
docs/man/hashkit_fnv1_64.3 [deleted file]
docs/man/hashkit_fnv1a_32.3 [deleted file]
docs/man/hashkit_fnv1a_64.3 [deleted file]
docs/man/hashkit_free.3 [deleted file]
docs/man/hashkit_functions.3 [deleted file]
docs/man/hashkit_hsieh.3 [deleted file]
docs/man/hashkit_is_allocated.3 [deleted file]
docs/man/hashkit_jenkins.3 [deleted file]
docs/man/hashkit_md5.3 [deleted file]
docs/man/hashkit_murmur.3 [deleted file]
docs/man/hashkit_value.3 [deleted file]
docs/man/libhashkit.3 [deleted file]
docs/man/libmemcached.3 [deleted file]
docs/man/libmemcached_check_configuration.3 [deleted file]
docs/man/libmemcached_configuration.3 [deleted file]
docs/man/libmemcached_examples.3 [deleted file]
docs/man/libmemcachedutil.3 [deleted file]
docs/man/memaslap.1 [deleted file]
docs/man/memcached.3 [deleted file]
docs/man/memcached_add.3 [deleted file]
docs/man/memcached_add_by_key.3 [deleted file]
docs/man/memcached_analyze.3 [deleted file]
docs/man/memcached_append.3 [deleted file]
docs/man/memcached_append_by_key.3 [deleted file]
docs/man/memcached_auto.3 [deleted file]
docs/man/memcached_behavior.3 [deleted file]
docs/man/memcached_behavior_get.3 [deleted file]
docs/man/memcached_behavior_set.3 [deleted file]
docs/man/memcached_callback.3 [deleted file]
docs/man/memcached_callback_get.3 [deleted file]
docs/man/memcached_callback_set.3 [deleted file]
docs/man/memcached_cas.3 [deleted file]
docs/man/memcached_cas_by_key.3 [deleted file]
docs/man/memcached_clone.3 [deleted file]
docs/man/memcached_create.3 [deleted file]
docs/man/memcached_decrement.3 [deleted file]
docs/man/memcached_decrement_with_initial.3 [deleted file]
docs/man/memcached_delete.3 [deleted file]
docs/man/memcached_delete_by_key.3 [deleted file]
docs/man/memcached_destroy_sasl_auth_data.3 [deleted file]
docs/man/memcached_dump.3 [deleted file]
docs/man/memcached_fetch.3 [deleted file]
docs/man/memcached_fetch_execute.3 [deleted file]
docs/man/memcached_fetch_result.3 [deleted file]
docs/man/memcached_flush.3 [deleted file]
docs/man/memcached_flush_buffers.3 [deleted file]
docs/man/memcached_free.3 [deleted file]
docs/man/memcached_generate_hash.3 [deleted file]
docs/man/memcached_generate_hash_value.3 [deleted file]
docs/man/memcached_get.3 [deleted file]
docs/man/memcached_get_by_key.3 [deleted file]
docs/man/memcached_get_memory_allocators.3 [deleted file]
docs/man/memcached_get_sasl_callbacks.3 [deleted file]
docs/man/memcached_get_user_data.3 [deleted file]
docs/man/memcached_increment.3 [deleted file]
docs/man/memcached_increment_with_initial.3 [deleted file]
docs/man/memcached_lib_version.3 [deleted file]
docs/man/memcached_memory_allocators.3 [deleted file]
docs/man/memcached_mget.3 [deleted file]
docs/man/memcached_mget_by_key.3 [deleted file]
docs/man/memcached_mget_execute.3 [deleted file]
docs/man/memcached_mget_execute_by_key.3 [deleted file]
docs/man/memcached_pool.3 [deleted file]
docs/man/memcached_pool_behavior_get.3 [deleted file]
docs/man/memcached_pool_behavior_set.3 [deleted file]
docs/man/memcached_pool_create.3 [deleted file]
docs/man/memcached_pool_destroy.3 [deleted file]
docs/man/memcached_pool_pop.3 [deleted file]
docs/man/memcached_pool_push.3 [deleted file]
docs/man/memcached_pool_st.3 [deleted file]
docs/man/memcached_prepend.3 [deleted file]
docs/man/memcached_prepend_by_key.3 [deleted file]
docs/man/memcached_quit.3 [deleted file]
docs/man/memcached_replace.3 [deleted file]
docs/man/memcached_replace_by_key.3 [deleted file]
docs/man/memcached_result_cas.3 [deleted file]
docs/man/memcached_result_create.3 [deleted file]
docs/man/memcached_result_flags.3 [deleted file]
docs/man/memcached_result_free.3 [deleted file]
docs/man/memcached_result_key_length.3 [deleted file]
docs/man/memcached_result_key_value.3 [deleted file]
docs/man/memcached_result_length.3 [deleted file]
docs/man/memcached_result_st.3 [deleted file]
docs/man/memcached_result_value.3 [deleted file]
docs/man/memcached_sasl.3 [deleted file]
docs/man/memcached_sasl_set_auth_data.3 [deleted file]
docs/man/memcached_server_add.3 [deleted file]
docs/man/memcached_server_add_unix_socket.3 [deleted file]
docs/man/memcached_server_count.3 [deleted file]
docs/man/memcached_server_cursor.3 [deleted file]
docs/man/memcached_server_list.3 [deleted file]
docs/man/memcached_server_list_append.3 [deleted file]
docs/man/memcached_server_list_count.3 [deleted file]
docs/man/memcached_server_list_free.3 [deleted file]
docs/man/memcached_server_push.3 [deleted file]
docs/man/memcached_server_st.3 [deleted file]
docs/man/memcached_servers.3 [deleted file]
docs/man/memcached_servers_parse.3 [deleted file]
docs/man/memcached_servers_reset.3 [deleted file]
docs/man/memcached_set.3 [deleted file]
docs/man/memcached_set_by_key.3 [deleted file]
docs/man/memcached_set_memory_allocators.3 [deleted file]
docs/man/memcached_set_memory_allocators_context.3 [deleted file]
docs/man/memcached_set_sasl_callbacks.3 [deleted file]
docs/man/memcached_set_user_data.3 [deleted file]
docs/man/memcached_stat.3 [deleted file]
docs/man/memcached_stat_execute.3 [deleted file]
docs/man/memcached_stat_get_keys.3 [deleted file]
docs/man/memcached_stat_get_value.3 [deleted file]
docs/man/memcached_stat_servername.3 [deleted file]
docs/man/memcached_stats.3 [deleted file]
docs/man/memcached_strerror.3 [deleted file]
docs/man/memcached_user_data.3 [deleted file]
docs/man/memcached_verbosity.3 [deleted file]
docs/man/memcached_version.3 [deleted file]
docs/man/memcapable.1 [deleted file]
docs/man/memcat.1 [deleted file]
docs/man/memcp.1 [deleted file]
docs/man/memdump.1 [deleted file]
docs/man/memerror.1 [deleted file]
docs/man/memflush.1 [deleted file]
docs/man/memrm.1 [deleted file]
docs/man/memslap.1 [deleted file]
docs/man/memstat.1 [deleted file]
docs/memaslap.rst
docs/memcached_cas.rst
docs/memcached_flush.rst
docs/memcached_get.rst
docs/memcached_result_st.rst
docs/memcached_return_t.rst [deleted file]
docs/memcached_server_st.rst
docs/memcached_servers.rst
docs/memcached_version.rst
example/interface_v0.c
libmemcached/analyze.cc
libmemcached/auto.cc
libmemcached/byteorder.cc
libmemcached/byteorder.h
libmemcached/connect.cc
libmemcached/constants.h
libmemcached/delete.cc
libmemcached/do.cc
libmemcached/error.cc
libmemcached/error.hpp
libmemcached/fetch.cc
libmemcached/get.cc
libmemcached/hash.cc
libmemcached/hosts.cc
libmemcached/io.cc
libmemcached/io.h
libmemcached/memcached.cc
libmemcached/memcached.hpp
libmemcached/memcached_util.h
libmemcached/options.cc
libmemcached/options/parser.am
libmemcached/options/parser.yy [new file with mode: 0644]
libmemcached/options/scanner.l [new file with mode: 0644]
libmemcached/protocol/binary_handler.c
libmemcached/purge.cc
libmemcached/quit.cc
libmemcached/response.cc
libmemcached/result.cc
libmemcached/result.h
libmemcached/return.h
libmemcached/sasl.c
libmemcached/server.cc
libmemcached/server.h
libmemcached/stats.cc
libmemcached/stats.h
libmemcached/storage.cc
libmemcached/strerror.cc
libmemcached/string.cc
libmemcached/string.h
libmemcached/util/flush.cc [new file with mode: 0644]
libmemcached/util/flush.h [new file with mode: 0644]
libmemcached/util/include.am
libmemcached/util/ping.cc
libmemcached/watchpoint.h
libtest/server.c
libtest/server.h
libtest/test.c
libtest/test.h
m4/memaslap.m4 [new file with mode: 0644]
support/libmemcached.spec.in
tests/mem_functions.cc
tests/parser.cc
tests/parser.h
tests/plus.cpp
tests/replication.cc
tests/replication.h

index ab5bf8323e13c91c52344b94f2a37d9d7264c922..2431706f0d0c2a886687bdbc5d1592e1f36badc9 100644 (file)
@@ -49,10 +49,12 @@ config/top.h
 configure
 docs/*.[13]
 docs/*.html
+docs/conf.py
 docs/doctest/
 docs/doctrees/
 docs/html/
 docs/linkcheck/
+docs/man/*
 example/memcached_light
 libhashkit/configure.h
 libmemcached-*.tar.gz
index 388721a710c0d7edb7d48a54300098e1fbbb1233..3e7cc6392890b5f11dda22fc35cbc7eb48d92ea6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,10 @@
+0.50
+
  * Updates to C++ interface 
  * Custom free allocators need to now check for value before calling free.
 
+ * memcached_fetch_result() now uses the internal result when available (about 25 to 50% faster).
+
 0.49 Thu Apr 14 08:43:37 PDT 2011
   * Fix calls to auto methods so that if value is not passed in nothing bad happens.
   * New parser calls for generating memcached_st objects.
index 2c2760160a862144f2541861679a0054adaafcd9..65e07090f26d3de5d1ffca1f19b0ff4d37c89c23 100644 (file)
@@ -46,37 +46,50 @@ include poll/include.am
 include win32/include.am
 include docs/include.am
 
+docs: html man
+
 TESTS += ${check_PROGRAMS}
-EXTRA_DIST+= ${man_MANS}
 
+EXTRA_DIST+= ${man_MANS}
 
 fedora:
-       rm -f ~/rpmbuild/RPMS/x86_64/libmemcached-$(VERSION)*.rpm
-       rm -f ~/rpmbuild/SRPMS/libmemcached-$(VERSION)*.rpm
-       cp libmemcached-$(VERSION).tar.gz ~/rpmbuild/SOURCES/
-       rpmbuild -ba support/libmemcached.spec
-       cp ~/rpmbuild/RPMS/x86_64/libmemcached-$(VERSION)*.rpm .
-       cp ~/rpmbuild/SRPMS/libmemcached-$(VERSION)*.rpm .
+       @rm -f ~/rpmbuild/RPMS/x86_64/libmemcached-$(VERSION)*.rpm
+       @rm -f ~/rpmbuild/SRPMS/libmemcached-$(VERSION)*.rpm
+       @cp libmemcached-$(VERSION).tar.gz ~/rpmbuild/SOURCES/
+       @rpmbuild -ba support/libmemcached.spec
+       @cp ~/rpmbuild/RPMS/x86_64/libmemcached-$(VERSION)*.rpm .
+       @cp ~/rpmbuild/SRPMS/libmemcached-$(VERSION)*.rpm .
 
 generic:
-       rm -f ~/rpmbuild/RPMS/x86_64/libmemcached-$(VERSION)*.rpm
-       rm -f ~/rpmbuild/SRPMS/libmemcached-$(VERSION)*.rpm
-       cp libmemcached-$(VERSION).tar.gz ~/rpmbuild/SOURCES/
-       rpmbuild -ba support/libmemcached.spec
-       cp ~/rpmbuild/RPMS/x86_64/libmemcached-$(VERSION)*.rpm .
-       cp ~/rpmbuild/SRPMS/libmemcached-$(VERSION)*.rpm .
+       @rm -f ~/rpmbuild/RPMS/x86_64/libmemcached-$(VERSION)*.rpm
+       @rm -f ~/rpmbuild/SRPMS/libmemcached-$(VERSION)*.rpm
+       @cp libmemcached-$(VERSION).tar.gz ~/rpmbuild/SOURCES/
+       @rpmbuild -ba support/libmemcached.spec
+       @cp ~/rpmbuild/RPMS/x86_64/libmemcached-$(VERSION)*.rpm .
+       @cp ~/rpmbuild/RPMS/x86_64/libmemcached-devel-$(VERSION)*.rpm .
+       @cp ~/rpmbuild/RPMS/x86_64/libmemcached-debuginfo-$(VERSION)*.rpm .
+       @cp ~/rpmbuild/SRPMS/libmemcached-$(VERSION)*.rpm .
+
+rpm: man distcheck generic
 
-rpm: all man dist generic fedora
+release: rpm
+       @rpm --addsign libmemcached-$(VERSION)*.rpm .
+       @rpm --checksig libmemcached-$(VERSION)*.rpm .
+       @rpm --addsign libmemcached-devel-$(VERSION)*.rpm .
+       @rpm --checksig libmemcached-devel-$(VERSION)*.rpm .
+       @rpm --addsign libmemcached-debuginfo-$(VERSION)*.rpm .
+       @rpm --checksig libmemcached-debuginfo-$(VERSION)*.rpm .
 
 merge-clean:
-       find ./ | $(GREP) \.gcda | xargs rm -f
-       find ./ | $(GREP) \.gcno | xargs rm -f
-       find ./ | $(GREP) \.gz | xargs rm -f
-       find ./ | $(GREP) \.orig | xargs rm -f
-       find ./ | $(GREP) \.rej | xargs rm -f
-       find ./ | $(GREP) \.rpm | xargs rm -f
-       find ./ | $(GREP) \~$$ | xargs rm -f
-       bzr unknowns
+       @find ./ | $(GREP) \.gcda | xargs rm -f
+       @find ./ | $(GREP) \.gcno | xargs rm -f
+       @find ./ | $(GREP) \.gz | xargs rm -f
+       @find ./ | $(GREP) \.orig | xargs rm -f
+       @find ./ | $(GREP) \.rej | xargs rm -f
+       @find ./ | $(GREP) \.rpm | xargs rm -f
+       @find ./ | $(GREP) \~$$ | xargs rm -f
+       @echo "Files that need to be either removed or checked in:"
+       @bzr unknowns
 
 clean-local:
        -rm -rf docs/_build docs/doctrees
@@ -87,12 +100,12 @@ lcov: lcov-clean check
        @echo "Make sure ./configure was run with '--enable-coverage'"
        @echo "------------------------------------------------------"
        @echo
-       cd libmemcached && lcov --capture --directory . --base-directory .. --output-file lcov.out
-       genhtml -o lcov --function-coverage -t libmemcached libmemcached/lcov.out
+       @cd libmemcached && lcov --capture --directory . --base-directory .. --output-file lcov.out
+       @genhtml -o lcov --function-coverage -t libmemcached libmemcached/lcov.out
 
 lcov-clean: clean
-       rm -rf lcov */lcov.out
-       find . -name '*.gcno' | xargs rm -f
-       find . -name '*.gcda' | xargs rm -f
+       @rm -rf lcov */lcov.out
+       @find . -name '*.gcno' | xargs rm -f
+       @find . -name '*.gcda' | xargs rm -f
 
 DISTCLEANFILES+= config/top.h
diff --git a/README b/README
index cda967a5d6771db4277526ecd9bd6cdd21daeda4..a664bc0db2c196f2461e949fcb28d249d0b9369b 100644 (file)
--- a/README
+++ b/README
@@ -10,8 +10,11 @@ memrm - Remove a key(s) from the server.
 memstat - Dump the stats of your servers to standard output
 memslap - Load generation utility (benchmark!)
 
-The utilities are beta quality at this point. The library is in production
-in many locations (upwards to 1000+ nodes).
+The library is in production in many locations (upwards to 1000+ nodes).
+
+The project has information here: http://libmemcached.org/
+
+Documentation can be found here: http://docs.libmemcached.org/
 
 Want to contribute? If you write more then three good patches, then I will
 just ask you to commit directly to the tree. I am happy to have additional
@@ -24,10 +27,17 @@ by someone in the community.
 
 If you are looking for answers to your questions please check out the
 mailing list at:
-http://lists.tangent.org/  
+http://lists.libmemcached.org/  
 
 Subscription information for the libmemcached mailing list can be found there.
 
+Please report bugs here:
+https://bugs.launchpad.net/libmemcached/
+
+You can purchase support from:
+http://datadifferential.com/
+
+
 Cheers,
   -Brian Aker
    Seattle, WA.
index a744cf789b39b852b2928632b9dc4ceac01fb798..281aa0b92060dee3909454cafc0f6b48d9776ea6 100644 (file)
@@ -23,11 +23,13 @@ bin_PROGRAMS+= \
        clients/memslap \
        clients/memstat
 
+if BUILD_MEMASLAP
 if HAVE_LIBEVENT
 if !BUILD_WIN32_WRAPPERS
   bin_PROGRAMS+= clients/memaslap
 endif
 endif
+endif
 
 noinst_HEADERS+= \
                clients/client_options.h \
@@ -96,19 +98,19 @@ test-start-server:
        clients/memcat --servers=localhost /etc/services
        clients/memrm --servers=localhost /etc/services
        clients/memstat --servers=localhost
-       clients/memaslap --servers=localhost
-       clients/memaslap --servers=localhost --concurrency=10
-       clients/memaslap --servers=localhost --concurrency=10 --initial-load=1000
-       clients/memaslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10
-       clients/memaslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 --test=get
-       clients/memaslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 --test=set
-       clients/memaslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 --test=set --non-blocking
+       clients/memslap --servers=localhost
+       clients/memslap --servers=localhost --concurrency=10
+       clients/memslap --servers=localhost --concurrency=10 --initial-load=1000
+       clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10
+       clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 --test=get
+       clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 --test=set
+       clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 --test=set --non-blocking
 
 client-valgrind:
-       libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes  clients/memaslap --servers=localhost
-       libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes  clients/memaslap --servers=localhost --concurrency=10
-       libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes  clients/memaslap --servers=localhost --concurrency=10 --initial-load=1000
-       libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes  clients/memaslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10
-       libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes  clients/memaslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 --test=get
-       libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes  clients/memaslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 --test=set
-       libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes  clients/memaslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 --test=set --non-blocking
+       libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes  clients/memslap --servers=localhost
+       libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes  clients/memslap --servers=localhost --concurrency=10
+       libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes  clients/memslap --servers=localhost --concurrency=10 --initial-load=1000
+       libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes  clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10
+       libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes  clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 --test=get
+       libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes  clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 --test=set
+       libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes  clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 --test=set --non-blocking
index baac28b2484f9c9983334a2b3cb06500d484855e..9c9feb52d5d46ffa7356ed4a55b9490f17602bc9 100644 (file)
@@ -297,7 +297,7 @@ static enum test_return send_packet(command *cmd)
   cmd->plain.message.header.request.bodylen=
           ntohl(cmd->plain.message.header.request.bodylen);
   cmd->plain.message.header.request.cas=
-          ntohll(cmd->plain.message.header.request.cas);
+          memcached_ntohll(cmd->plain.message.header.request.cas);
 
   execute(resend_packet(cmd));
   return TEST_PASS;
@@ -343,7 +343,7 @@ static enum test_return recv_packet(response *rsp)
   rsp->plain.message.header.response.bodylen=
           ntohl(rsp->plain.message.header.response.bodylen);
   rsp->plain.message.header.response.cas=
-          ntohll(rsp->plain.message.header.response.cas);
+          memcached_ntohll(rsp->plain.message.header.response.cas);
 
   size_t bodysz= rsp->plain.message.header.response.bodylen;
   if (bodysz > 0)
@@ -472,8 +472,8 @@ static void arithmetic_command(command *cmd,
   cmd->incr.message.header.request.extlen= 20;
   cmd->incr.message.header.request.bodylen= (uint32_t)(keylen + 20);
   cmd->incr.message.header.request.opaque= 0xdeadbeef;
-  cmd->incr.message.body.delta= htonll(delta);
-  cmd->incr.message.body.initial= htonll(initial);
+  cmd->incr.message.body.delta= memcached_htonll(delta);
+  cmd->incr.message.body.initial= memcached_htonll(initial);
   cmd->incr.message.body.expiration= htonl(exptime);
 
   off_t key_offset= sizeof (protocol_binary_request_no_extras) + 20;
@@ -690,8 +690,7 @@ static enum test_return test_binary_set_impl(const char* key, uint8_t cc)
   }
 
   /* try to set with the correct CAS value */
-  cmd.plain.message.header.request.cas=
-          htonll(rsp.plain.message.header.response.cas);
+  cmd.plain.message.header.request.cas= memcached_htonll(rsp.plain.message.header.response.cas);
   execute(resend_packet(&cmd));
   if (cc == PROTOCOL_BINARY_CMD_SET)
   {
@@ -702,8 +701,7 @@ static enum test_return test_binary_set_impl(const char* key, uint8_t cc)
     execute(test_binary_noop());
 
   /* try to set with an incorrect CAS value */
-  cmd.plain.message.header.request.cas=
-          htonll(rsp.plain.message.header.response.cas - 1);
+  cmd.plain.message.header.request.cas= memcached_htonll(rsp.plain.message.header.response.cas - 1);
   execute(resend_packet(&cmd));
   execute(send_binary_noop());
   execute(recv_packet(&rsp));
@@ -819,8 +817,7 @@ static enum test_return test_binary_replace_impl(const char* key, uint8_t cc)
   }
 
   /* verify that replace with CAS value works! */
-  cmd.plain.message.header.request.cas=
-          htonll(rsp.plain.message.header.response.cas);
+  cmd.plain.message.header.request.cas= memcached_htonll(rsp.plain.message.header.response.cas);
   execute(resend_packet(&cmd));
 
   if (cc == PROTOCOL_BINARY_CMD_REPLACE)
@@ -832,8 +829,7 @@ static enum test_return test_binary_replace_impl(const char* key, uint8_t cc)
     execute(test_binary_noop());
 
   /* try to set with an incorrect CAS value */
-  cmd.plain.message.header.request.cas=
-          htonll(rsp.plain.message.header.response.cas - 1);
+  cmd.plain.message.header.request.cas= memcached_htonll(rsp.plain.message.header.response.cas - 1);
   execute(resend_packet(&cmd));
   execute(send_binary_noop());
   execute(recv_packet(&rsp));
@@ -956,7 +952,7 @@ static enum test_return test_binary_incr_impl(const char* key, uint8_t cc)
     {
       execute(recv_packet(&rsp));
       verify(validate_response_header(&rsp, cc, PROTOCOL_BINARY_RESPONSE_SUCCESS));
-      verify(ntohll(rsp.incr.message.body.value) == ii);
+      verify(memcached_ntohll(rsp.incr.message.body.value) == ii);
     }
     else
       execute(test_binary_noop());
@@ -994,7 +990,7 @@ static enum test_return test_binary_decr_impl(const char* key, uint8_t cc)
     {
       execute(recv_packet(&rsp));
       verify(validate_response_header(&rsp, cc, PROTOCOL_BINARY_RESPONSE_SUCCESS));
-      verify(ntohll(rsp.decr.message.body.value) == (uint64_t)ii);
+      verify(memcached_ntohll(rsp.decr.message.body.value) == (uint64_t)ii);
     }
     else
       execute(test_binary_noop());
@@ -1006,7 +1002,7 @@ static enum test_return test_binary_decr_impl(const char* key, uint8_t cc)
   {
     execute(recv_packet(&rsp));
     verify(validate_response_header(&rsp, cc, PROTOCOL_BINARY_RESPONSE_SUCCESS));
-    verify(ntohll(rsp.decr.message.body.value) == 0);
+    verify(memcached_ntohll(rsp.decr.message.body.value) == 0);
   }
   else
   {
index f380a6672a32cedfc78b3957c89085051e8ed46b..755a2e5a8a5db672a747479d88e6b0f21e6bb2d7 100644 (file)
@@ -2465,9 +2465,7 @@ static bool ms_need_yield(ms_conn_t *c)
   {
     gettimeofday(&curr_time, NULL);
     time_diff= ms_time_diff(&ms_thread->startup_time, &curr_time);
-    tps=
-      (int64_t)((task->get_opt
-                 + task->set_opt) / ((uint64_t)time_diff / 1000000));
+    tps= (int64_t)(((task->get_opt + task->set_opt) / (uint64_t)time_diff) * 1000000);
 
     /* current throughput is greater than expected throughput */
     if (tps > ms_thread->thread_ctx->tps_perconn)
index 9b8a82c581c3a0241ed5b3403eb008430a198cfc..681778b5249b955a3327bab22b94965886dc4a23 100644 (file)
@@ -115,6 +115,7 @@ ENABLE_UTILLIB
 SETSOCKOPT_SANITY
 ENABLE_HSIEH_HASH
 ENABLE_MURMUR_HASH
+ENABLE_MEMASLAP
 PROTOCOL_BINARY_TEST
 WITH_MEMCACHED
 ENABLE_DEPRECATED
@@ -149,6 +150,7 @@ SOCKET_SEND_FLAGS
 
 AC_CONFIG_FILES([
   Makefile
+  docs/conf.py
   libhashkit/configure.h
   libmemcached/configure.h
   support/libmemcached.pc
diff --git a/docs/conf.py b/docs/conf.py
deleted file mode 100644 (file)
index 9b05ccf..0000000
+++ /dev/null
@@ -1,348 +0,0 @@
-# -*- 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_configuration', 'libmemcached_check_configuration', u'libmemcached Documentation', [u'Brian Aker'], 3),
-  ('libmemcached_configuration', 'libmemcached_configuration', u'libmemcached Documentation', [u'Brian Aker'], 3),
-  ('libmemcached_configuration', 'memcached', u'libmemcached Documentation', [u'Brian Aker'], 3),
-  ('libmemcached_examples', 'libmemcached_examples', 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_append', 'memcached_append', u'Appending to or Prepending to data on the server', [u'Brian Aker'], 3),
-  ('memcached_append', 'memcached_append_by_key', u'Appending to or Prepending to data on the server', [u'Brian Aker'], 3),
-  ('memcached_append', 'memcached_prepend', u'Appending to or Prepending to data on the server', [u'Brian Aker'], 3),
-  ('memcached_append', 'memcached_prepend_by_key', u'Appending to or Prepending to data on the server', [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', u'Generating hash values directly', [u'Brian Aker'], 3),
-  ('memcached_generate_hash_value', 'memcached_generate_hash_value', 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_pop', u'libmemcached Documentation', [u'Brian Aker'], 3),
-  ('memcached_pool', 'memcached_pool_push', u'libmemcached Documentation', [u'Brian Aker'], 3),
-  ('memcached_pool', 'memcached_pool_push', u'libmemcached Documentation', [u'Brian Aker'], 3),
-  ('memcached_pool', 'memcached_pool_st', 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_sasl_set_auth_data', u'libmemcached Documentation', [u'Brian Aker'], 3),
-  ('memcached_sasl', 'memcached_set_sasl_callbacks', 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_cas', 'memcached_cas', u'Working with data on the server in an atomic fashion', [u'Brian Aker'], 3),
-  ('memcached_cas', 'memcached_cas_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/conf.py.in b/docs/conf.py.in
new file mode 100644 (file)
index 0000000..a6a1dfb
--- /dev/null
@@ -0,0 +1,355 @@
+# -*- 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 = []
+
+extensions = ['sphinxcontrib.googleanalytics']
+
+# Google 
+googleanalytics_id = 'UA-15307604-2'
+googleanalytics_enabled = 'True'
+
+# 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 = '@VERSION@'
+# The full version, including alpha/beta/rc tags.
+release = '@VERSION@'
+
+# 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 = False
+
+# 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 = [
+  ('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_hsieh', 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_value', 'hashkit_value', u'libhashkit Documentation', [u'Brian Aker'], 3),
+  ('libhashkit', 'libhashkit', u'libhashkit Documentation', [u'Brian Aker'], 3),
+  ('libmemcached', 'libmemcached', u'Introducing the C Client Library for memcached', [u'Brian Aker'], 3),
+  ('libmemcached_configuration', 'libmemcached_check_configuration', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('libmemcached_configuration', 'libmemcached_configuration', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('libmemcached_configuration', 'memcached', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('libmemcached_examples', 'libmemcached_examples', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('libmemcachedutil', 'libmemcachedutil', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memaslap', 'memaslap', u'libmemcached Documentation', [u'Brian Aker'], 1),
+  ('memcached_analyze', 'memcached_analyze', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_append', 'memcached_append', u'Appending to or Prepending to data on the server', [u'Brian Aker'], 3),
+  ('memcached_append', 'memcached_append_by_key', u'Appending to or Prepending to data on the server', [u'Brian Aker'], 3),
+  ('memcached_append', 'memcached_prepend', u'Appending to or Prepending to data on the server', [u'Brian Aker'], 3),
+  ('memcached_append', 'memcached_prepend_by_key', u'Appending to or Prepending to data on the server', [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_cas', 'memcached_cas', u'Working with data on the server in an atomic fashion', [u'Brian Aker'], 3),
+  ('memcached_cas', 'memcached_cas_by_key', u'Storing and Replacing Data', [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', u'Generating hash values directly', [u'Brian Aker'], 3),
+  ('memcached_generate_hash_value', 'memcached_generate_hash_value', 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_pop', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_pool', 'memcached_pool_push', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_pool', 'memcached_pool_push', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_pool', 'memcached_pool_st', 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),
+  ('libmemcached/memcached_return_t', 'memcached_return_t', u'Return type values ', [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_sasl_set_auth_data', u'libmemcached Documentation', [u'Brian Aker'], 3),
+  ('memcached_sasl', 'memcached_set_sasl_callbacks', 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_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),
+  ('memcapable', 'memcapable', u'libmemcached Documentation', [u'Brian Aker'], 1),
+  ('memcat', 'memcat', 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),
+  ('memcp', 'memcp', u'libmemcached Documentation', [u'Brian Aker'], 1),
+  ('memdump', 'memdump', 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),
+  ('memerror', 'memerror', 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),
+  ]
index 3b9a7acdf07ee489ff5776146ab6e7fc6d8a3bd6..8935b2d096f9d1c8eaca73bc58117604e0542ab8 100644 (file)
@@ -10,6 +10,8 @@ SYNOPSIS
 
 #include <libhashkit/hashkit.h>
  
+.. c:type:: hashkit_st
+
 .. c:function:: hashkit_st *hashkit_create(hashkit_st *hash);
  
 .. c:function:: hashkit_st *hashkit_clone(hashkit_st *destination, const hashkit_st *ptr);
@@ -19,37 +21,25 @@ SYNOPSIS
 .. c:function:: bool hashkit_is_allocated(const hashkit_st *hash);
 
 Compile and link with -lhashkit
-=======
-
-
-.. c:function:: perl
-
-.. c:function:: hashkit_st *hashkit_create(hashkit_st *hash);
-.. c:function:: hashkit_st *hashkit_clone(hashkit_st *destination, const hashkit_st *ptr);
-.. c:function:: void hashkit_free(hashkit_st *hash);
-.. c:function:: bool hashkit_is_allocated(const hashkit_st *hash);
 
 -----------
 DESCRIPTION
 -----------
 
 
-The hashkit_create() function initializes a hashkit object for use. If
+The :c:func:`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 :c:func:`hashkit_clone()` function initializes a hashkit object much like
+:c:func:`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 :c:func:`hashkit_free()` frees any resources being consumed by the hashkit
+objects that were initialized with :c:func:`hashkit_create()` or :c:func:`hashkit_clone()`.
 
-The hashkit_is_allocated() reports where the memory was allocated 
+The :c:func:`hashkit_is_allocated()` reports where the memory was allocated 
 for a hashkit object.
 
 
@@ -58,11 +48,11 @@ RETURN VALUE
 ------------
 
 
-hashkit_create() and hashkit_clone() will return NULL on failure or
+:c:func:`hashkit_create()` and :c:func:`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(),
+:c:func:`hashkit_is_allocated()` returns true if the memory for the hashkit
+object was allocated inside of :c:func:`hashkit_create()` or :c:func:`hashkit_clone()`,
 otherwise it is false and was user-supplied memory.
 
 
index b8b7a62be0aad4c2dcb26caa48eab81d7a0f1b76..022b218bf8315ccb334870c5c351c8175f4390c9 100644 (file)
 # included from Top Level Makefile.am
 # All paths should be given relative to the root
 
-EXTRA_DIST+= \
-            docs/conf.py \
-            docs/error_messages.rst \
-            docs/client_errors/MEMCACHED_AUTH_CONTINUE.rst \
-            docs/client_errors/MEMCACHED_AUTH_FAILURE.rst \
-            docs/client_errors/MEMCACHED_AUTH_PROBLEM.rst \
-            docs/client_errors/MEMCACHED_BAD_KEY_PROVIDED.rst \
-            docs/client_errors/MEMCACHED_BUFFERED.rst \
-            docs/client_errors/MEMCACHED_CLIENT_ERROR.rst \
-            docs/client_errors/MEMCACHED_CONNECTION_BIND_FAILURE.rst \
-            docs/client_errors/MEMCACHED_CONNECTION_FAILURE.rst \
-            docs/client_errors/MEMCACHED_CONNECTION_SOCKET_CREATE_FAILURE.rst \
-            docs/client_errors/MEMCACHED_DATA_DOES_NOT_EXIST.rst \
-            docs/client_errors/MEMCACHED_DATA_EXISTS.rst \
-            docs/client_errors/MEMCACHED_DELETED.rst \
-            docs/client_errors/MEMCACHED_DEPRECATED.rst \
-            docs/client_errors/MEMCACHED_E2BIG.rst \
-            docs/client_errors/MEMCACHED_END.rst \
-            docs/client_errors/MEMCACHED_ERRNO.rst \
-            docs/client_errors/MEMCACHED_FAILURE.rst \
-            docs/client_errors/MEMCACHED_FAIL_UNIX_SOCKET.rst \
-            docs/client_errors/MEMCACHED_FETCH_NOTFINISHED.rst \
-            docs/client_errors/MEMCACHED_HOST_LOOKUP_FAILURE.rst \
-            docs/client_errors/MEMCACHED_INVALID_ARGUMENTS.rst \
-            docs/client_errors/MEMCACHED_INVALID_HOST_PROTOCOL.rst \
-            docs/client_errors/MEMCACHED_ITEM.rst \
-            docs/client_errors/MEMCACHED_KEY_TOO_BIG.rst \
-            docs/client_errors/MEMCACHED_MAXIMUM_RETURN.rst \
-            docs/client_errors/MEMCACHED_MEMORY_ALLOCATION_FAILURE.rst \
-            docs/client_errors/MEMCACHED_NOTFOUND.rst \
-            docs/client_errors/MEMCACHED_NOTSTORED.rst \
-            docs/client_errors/MEMCACHED_NOT_SUPPORTED.rst \
-            docs/client_errors/MEMCACHED_NO_KEY_PROVIDED.rst \
-            docs/client_errors/MEMCACHED_NO_SERVERS.rst \
-            docs/client_errors/MEMCACHED_PARSE_ERROR.rst \
-            docs/client_errors/MEMCACHED_PARSE_USER_ERROR.rst \
-            docs/client_errors/MEMCACHED_PARTIAL_READ.rst \
-            docs/client_errors/MEMCACHED_PROTOCOL_ERROR.rst \
-            docs/client_errors/MEMCACHED_READ_FAILURE.rst \
-            docs/client_errors/MEMCACHED_SERVER_ERROR.rst \
-            docs/client_errors/MEMCACHED_SERVER_MARKED_DEAD.rst \
-            docs/client_errors/MEMCACHED_SOME_ERRORS.rst \
-            docs/client_errors/MEMCACHED_STAT.rst \
-            docs/client_errors/MEMCACHED_STORED.rst \
-            docs/client_errors/MEMCACHED_SUCCESS.rst \
-            docs/client_errors/MEMCACHED_TIMEOUT.rst \
-            docs/client_errors/MEMCACHED_UNKNOWN_READ_FAILURE.rst \
-            docs/client_errors/MEMCACHED_UNKNOWN_STAT_KEY.rst \
-            docs/client_errors/MEMCACHED_VALUE.rst \
-            docs/client_errors/MEMCACHED_WRITE_FAILURE.rst \
-            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_append.rst \
-            docs/memcached_auto.rst \
-            docs/memcached_behavior.rst \
-            docs/memcached_callback.rst \
-            docs/memcached_cas.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 \
-            docs/tap.rst
-
 # Makefile for Sphinx documentation
 #
 
-SPHINXOPTS    = ${SPHINX_WARNINGS} -D release=${PANDORA_RELEASE_VERSION}
+SPHINXOPTS    = ${SPHINX_WARNINGS}
 PAPER         =
 SPHINX_BUILDDIR      = ${top_builddir}/docs
 
@@ -333,4 +236,5 @@ 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
index cef0830dbd9e078b84a9ea59c5bd031ff4e1b584..77b5060020a7f8c89ae4a74fbf303f38b2e92d21 100644 (file)
@@ -53,6 +53,7 @@ Advanced Topics
    memcached_generate_hash_value
    memcached_memory_allocators
    memcached_quit
+   libmemcached/memcached_return_t
    memcached_sasl
    memcached_server_st
    memcached_servers
diff --git a/docs/libmemcached/memcached_return_t.rst b/docs/libmemcached/memcached_return_t.rst
new file mode 100644 (file)
index 0000000..3663c6d
--- /dev/null
@@ -0,0 +1,133 @@
+================================
+Error Codes (memcached_return_t)
+================================
+
+--------
+SYNOPSIS
+--------
+
+#include <libmemcached/memcached.h>
+
+.. c:type:: memcached_return_t
+
+.. c:function:: const char *libmemcached_strerror(libmemcached_return_t rc)
+
+.. c:function:: bool libmemcached_success(libmemcached_return_t rc)
+
+.. c:function:: bool libmemcached_failure(libmemcached_return_t rc)
+
+.. c:function:: bool libmemcache_continue(libmemcached_return_t rc)
+
+
+
+:c:func:`memcached_success()` return true if :c:type:`MEMCACHED_SUCCESS` tested true.
+
+:c:func:`memcached_failure()` return true if any value other then :c:type:`MEMCACHED_SUCCESS` was provided.
+
+
+
+
+.. c:type:: MEMCACHED_SUCCESS,
+
+Success
+
+.. c:type:: MEMCACHED_FAILURE,
+
+.. c:type:: MEMCACHED_HOST_LOOKUP_FAILURE, // getaddrinfo() only
+
+.. c:type:: MEMCACHED_CONNECTION_FAILURE,  // DEPRECATED
+
+.. c:type:: MEMCACHED_CONNECTION_BIND_FAILURE,  // DEPRECATED
+
+.. c:type:: MEMCACHED_WRITE_FAILURE,
+
+.. c:type:: MEMCACHED_READ_FAILURE,
+
+.. c:type:: MEMCACHED_UNKNOWN_READ_FAILURE,
+
+.. c:type:: MEMCACHED_PROTOCOL_ERROR,
+
+.. c:type:: MEMCACHED_CLIENT_ERROR,
+
+.. c:type:: MEMCACHED_SERVER_ERROR,
+
+.. c:type:: MEMCACHED_CONNECTION_SOCKET_CREATE_FAILURE, // DEPRECATED
+
+.. c:type:: MEMCACHED_DATA_EXISTS,
+
+.. c:type:: MEMCACHED_DATA_DOES_NOT_EXIST,
+
+.. c:type:: MEMCACHED_NOTSTORED,
+
+.. c:type:: MEMCACHED_STORED,
+
+.. c:type:: MEMCACHED_NOTFOUND,
+
+.. c:type:: MEMCACHED_MEMORY_ALLOCATION_FAILURE,
+
+.. c:type:: MEMCACHED_PARTIAL_READ,
+
+.. c:type:: MEMCACHED_SOME_ERRORS,
+
+.. c:type:: MEMCACHED_NO_SERVERS,
+
+.. c:type:: MEMCACHED_END,
+
+.. c:type:: MEMCACHED_DELETED,
+
+.. c:type:: MEMCACHED_VALUE,
+
+.. c:type:: MEMCACHED_STAT,
+
+.. c:type:: MEMCACHED_ITEM,
+
+.. c:type:: MEMCACHED_ERRNO,
+
+.. c:type:: MEMCACHED_FAIL_UNIX_SOCKET, // DEPRECATED
+
+.. c:type:: MEMCACHED_NOT_SUPPORTED,
+
+.. c:type:: MEMCACHED_NO_KEY_PROVIDED, /* Deprecated. Use MEMCACHED_BAD_KEY_PROVIDED! */
+
+.. c:type:: MEMCACHED_FETCH_NOTFINISHED,
+
+.. c:type:: MEMCACHED_TIMEOUT,
+
+Connection to server timed out.
+
+.. c:type:: MEMCACHED_BUFFERED,
+
+.. c:type:: MEMCACHED_BAD_KEY_PROVIDED,
+
+.. c:type:: MEMCACHED_INVALID_HOST_PROTOCOL,
+
+.. c:type:: MEMCACHED_SERVER_MARKED_DEAD,
+
+.. c:type:: MEMCACHED_UNKNOWN_STAT_KEY,
+
+.. c:type:: MEMCACHED_E2BIG,
+
+.. c:type:: MEMCACHED_INVALID_ARGUMENTS,
+
+.. c:type:: MEMCACHED_KEY_TOO_BIG,
+
+.. c:type:: MEMCACHED_AUTH_PROBLEM,
+
+.. c:type:: MEMCACHED_AUTH_FAILURE,
+
+.. c:type:: MEMCACHED_AUTH_CONTINUE,
+
+.. c:type:: MEMCACHED_PARSE_ERROR,
+
+.. c:type:: MEMCACHED_PARSE_USER_ERROR,
+
+.. c:type:: MEMCACHED_DEPRECATED,
+
+.. c:type:: MEMCACHED_MAXIMUM_RETURN /* Always add new error code before */
+   
+--------
+SEE ALSO
+--------
+
+:manpage:`memcached(8)` :manpage:`libmemcached(3)` :manpage:`memcached_client_error()` or :manpage:`memcached_worker_error()`
+
diff --git a/docs/man/hashkit_clone.3 b/docs/man/hashkit_clone.3
deleted file mode 100644 (file)
index d065315..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-.TH "HASHKIT_CLONE" "3" "May 23, 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.
-.
-.SH SYNOPSIS
-.sp
-#include <libhashkit/hashkit.h>
-.INDENT 0.0
-.TP
-.B hashkit_st *hashkit_create(hashkit_st *hash);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B hashkit_st *hashkit_clone(hashkit_st *destination, const hashkit_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void hashkit_free(hashkit_st *hash);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B bool hashkit_is_allocated(const hashkit_st *hash);
-.UNINDENT
-.sp
-Compile and link with \-lhashkit
-.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\%http://libmemcached.org/\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
deleted file mode 100644 (file)
index e024608..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-.TH "HASHKIT_CRC32" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libhashkit/hashkit.h>
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_default(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1_64(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1a_64(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1_32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1a_32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_crc32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_hsieh(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_murmur(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_jenkins(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_md5(const char *key, size_t key_length);
-.UNINDENT
-.sp
-Compile and link with \-lhashkit
-.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\%http://libmemcached.org/\fP
-.SH SEE ALSO
-.sp
-hashkit_create(3) hashkit_value(3) hashkit_set_hash_fn(3)
-hashkit_set_continuum_hash_fn(3)
-.SH AUTHOR
-Brian Aker
-.SH COPYRIGHT
-2011, Brian Aker DataDifferential, http://datadifferential.com/
-.\" Generated by docutils manpage writer.
-.\" 
-.
diff --git a/docs/man/hashkit_create.3 b/docs/man/hashkit_create.3
deleted file mode 100644 (file)
index ed937ca..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-.TH "HASHKIT_CREATE" "3" "May 23, 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.
-.
-.SH SYNOPSIS
-.sp
-#include <libhashkit/hashkit.h>
-.INDENT 0.0
-.TP
-.B hashkit_st *hashkit_create(hashkit_st *hash);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B hashkit_st *hashkit_clone(hashkit_st *destination, const hashkit_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void hashkit_free(hashkit_st *hash);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B bool hashkit_is_allocated(const hashkit_st *hash);
-.UNINDENT
-.sp
-Compile and link with \-lhashkit
-.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\%http://libmemcached.org/\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
deleted file mode 100644 (file)
index d00ebbe..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-.TH "HASHKIT_FNV1_32" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libhashkit/hashkit.h>
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_default(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1_64(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1a_64(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1_32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1a_32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_crc32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_hsieh(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_murmur(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_jenkins(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_md5(const char *key, size_t key_length);
-.UNINDENT
-.sp
-Compile and link with \-lhashkit
-.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\%http://libmemcached.org/\fP
-.SH SEE ALSO
-.sp
-hashkit_create(3) hashkit_value(3) hashkit_set_hash_fn(3)
-hashkit_set_continuum_hash_fn(3)
-.SH AUTHOR
-Brian Aker
-.SH COPYRIGHT
-2011, Brian Aker 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
deleted file mode 100644 (file)
index c3e7fa2..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-.TH "HASHKIT_FNV1_64" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libhashkit/hashkit.h>
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_default(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1_64(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1a_64(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1_32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1a_32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_crc32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_hsieh(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_murmur(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_jenkins(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_md5(const char *key, size_t key_length);
-.UNINDENT
-.sp
-Compile and link with \-lhashkit
-.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\%http://libmemcached.org/\fP
-.SH SEE ALSO
-.sp
-hashkit_create(3) hashkit_value(3) hashkit_set_hash_fn(3)
-hashkit_set_continuum_hash_fn(3)
-.SH AUTHOR
-Brian Aker
-.SH COPYRIGHT
-2011, Brian Aker 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
deleted file mode 100644 (file)
index 2f2bec6..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-.TH "HASHKIT_FNV1A_32" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libhashkit/hashkit.h>
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_default(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1_64(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1a_64(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1_32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1a_32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_crc32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_hsieh(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_murmur(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_jenkins(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_md5(const char *key, size_t key_length);
-.UNINDENT
-.sp
-Compile and link with \-lhashkit
-.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\%http://libmemcached.org/\fP
-.SH SEE ALSO
-.sp
-hashkit_create(3) hashkit_value(3) hashkit_set_hash_fn(3)
-hashkit_set_continuum_hash_fn(3)
-.SH AUTHOR
-Brian Aker
-.SH COPYRIGHT
-2011, Brian Aker 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
deleted file mode 100644 (file)
index a855d7e..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-.TH "HASHKIT_FNV1A_64" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libhashkit/hashkit.h>
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_default(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1_64(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1a_64(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1_32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1a_32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_crc32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_hsieh(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_murmur(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_jenkins(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_md5(const char *key, size_t key_length);
-.UNINDENT
-.sp
-Compile and link with \-lhashkit
-.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\%http://libmemcached.org/\fP
-.SH SEE ALSO
-.sp
-hashkit_create(3) hashkit_value(3) hashkit_set_hash_fn(3)
-hashkit_set_continuum_hash_fn(3)
-.SH AUTHOR
-Brian Aker
-.SH COPYRIGHT
-2011, Brian Aker DataDifferential, http://datadifferential.com/
-.\" Generated by docutils manpage writer.
-.\" 
-.
diff --git a/docs/man/hashkit_free.3 b/docs/man/hashkit_free.3
deleted file mode 100644 (file)
index 8bfb0a2..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-.TH "HASHKIT_FREE" "3" "May 23, 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.
-.
-.SH SYNOPSIS
-.sp
-#include <libhashkit/hashkit.h>
-.INDENT 0.0
-.TP
-.B hashkit_st *hashkit_create(hashkit_st *hash);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B hashkit_st *hashkit_clone(hashkit_st *destination, const hashkit_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void hashkit_free(hashkit_st *hash);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B bool hashkit_is_allocated(const hashkit_st *hash);
-.UNINDENT
-.sp
-Compile and link with \-lhashkit
-.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\%http://libmemcached.org/\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
deleted file mode 100644 (file)
index a71111c..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-.TH "HASHKIT_FUNCTIONS" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libhashkit/hashkit.h>
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_default(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1_64(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1a_64(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1_32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1a_32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_crc32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_hsieh(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_murmur(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_jenkins(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_md5(const char *key, size_t key_length);
-.UNINDENT
-.sp
-Compile and link with \-lhashkit
-.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\%http://libmemcached.org/\fP
-.SH SEE ALSO
-.sp
-hashkit_create(3) hashkit_value(3) hashkit_set_hash_fn(3)
-hashkit_set_continuum_hash_fn(3)
-.SH AUTHOR
-Brian Aker
-.SH COPYRIGHT
-2011, Brian Aker DataDifferential, http://datadifferential.com/
-.\" Generated by docutils manpage writer.
-.\" 
-.
diff --git a/docs/man/hashkit_hsieh.3 b/docs/man/hashkit_hsieh.3
deleted file mode 100644 (file)
index 36d54d5..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-.TH "HASHKIT_HSIEH" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libhashkit/hashkit.h>
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_default(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1_64(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1a_64(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1_32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1a_32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_crc32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_hsieh(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_murmur(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_jenkins(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_md5(const char *key, size_t key_length);
-.UNINDENT
-.sp
-Compile and link with \-lhashkit
-.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\%http://libmemcached.org/\fP
-.SH SEE ALSO
-.sp
-hashkit_create(3) hashkit_value(3) hashkit_set_hash_fn(3)
-hashkit_set_continuum_hash_fn(3)
-.SH AUTHOR
-Brian Aker
-.SH COPYRIGHT
-2011, Brian Aker 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
deleted file mode 100644 (file)
index 8aea2f7..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-.TH "HASHKIT_IS_ALLOCATED" "3" "May 23, 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.
-.
-.SH SYNOPSIS
-.sp
-#include <libhashkit/hashkit.h>
-.INDENT 0.0
-.TP
-.B hashkit_st *hashkit_create(hashkit_st *hash);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B hashkit_st *hashkit_clone(hashkit_st *destination, const hashkit_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void hashkit_free(hashkit_st *hash);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B bool hashkit_is_allocated(const hashkit_st *hash);
-.UNINDENT
-.sp
-Compile and link with \-lhashkit
-.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\%http://libmemcached.org/\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
deleted file mode 100644 (file)
index 22b60c0..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-.TH "HASHKIT_JENKINS" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libhashkit/hashkit.h>
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_default(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1_64(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1a_64(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1_32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1a_32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_crc32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_hsieh(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_murmur(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_jenkins(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_md5(const char *key, size_t key_length);
-.UNINDENT
-.sp
-Compile and link with \-lhashkit
-.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\%http://libmemcached.org/\fP
-.SH SEE ALSO
-.sp
-hashkit_create(3) hashkit_value(3) hashkit_set_hash_fn(3)
-hashkit_set_continuum_hash_fn(3)
-.SH AUTHOR
-Brian Aker
-.SH COPYRIGHT
-2011, Brian Aker DataDifferential, http://datadifferential.com/
-.\" Generated by docutils manpage writer.
-.\" 
-.
diff --git a/docs/man/hashkit_md5.3 b/docs/man/hashkit_md5.3
deleted file mode 100644 (file)
index a0bc92a..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-.TH "HASHKIT_MD5" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libhashkit/hashkit.h>
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_default(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1_64(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1a_64(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1_32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1a_32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_crc32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_hsieh(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_murmur(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_jenkins(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_md5(const char *key, size_t key_length);
-.UNINDENT
-.sp
-Compile and link with \-lhashkit
-.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\%http://libmemcached.org/\fP
-.SH SEE ALSO
-.sp
-hashkit_create(3) hashkit_value(3) hashkit_set_hash_fn(3)
-hashkit_set_continuum_hash_fn(3)
-.SH AUTHOR
-Brian Aker
-.SH COPYRIGHT
-2011, Brian Aker DataDifferential, http://datadifferential.com/
-.\" Generated by docutils manpage writer.
-.\" 
-.
diff --git a/docs/man/hashkit_murmur.3 b/docs/man/hashkit_murmur.3
deleted file mode 100644 (file)
index 37d5554..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-.TH "HASHKIT_MURMUR" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libhashkit/hashkit.h>
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_default(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1_64(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1a_64(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1_32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_fnv1a_32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_crc32(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_hsieh(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_murmur(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_jenkins(const char *key, size_t key_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_md5(const char *key, size_t key_length);
-.UNINDENT
-.sp
-Compile and link with \-lhashkit
-.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\%http://libmemcached.org/\fP
-.SH SEE ALSO
-.sp
-hashkit_create(3) hashkit_value(3) hashkit_set_hash_fn(3)
-hashkit_set_continuum_hash_fn(3)
-.SH AUTHOR
-Brian Aker
-.SH COPYRIGHT
-2011, Brian Aker DataDifferential, http://datadifferential.com/
-.\" Generated by docutils manpage writer.
-.\" 
-.
diff --git a/docs/man/hashkit_value.3 b/docs/man/hashkit_value.3
deleted file mode 100644 (file)
index a38cadf..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-.TH "HASHKIT_VALUE" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libhashkit/hashkit.h>
-.INDENT 0.0
-.TP
-.B uint32_t hashkit_value(hashkit_st *hash, const char *key, size_t key_length);
-.UNINDENT
-.sp
-Compile and link with \-lhashkit
-.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\%http://libmemcached.org/\fP
-.SH SEE ALSO
-.sp
-hashkit_create(3) hashkit_set_distribution(3) hashkit_set_hash_fn(3)
-.SH AUTHOR
-Brian Aker
-.SH COPYRIGHT
-2011, Brian Aker DataDifferential, http://datadifferential.com/
-.\" Generated by docutils manpage writer.
-.\" 
-.
diff --git a/docs/man/libhashkit.3 b/docs/man/libhashkit.3
deleted file mode 100644 (file)
index 2564814..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-.TH "LIBHASHKIT" "3" "May 23, 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.
-.
-.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\%http://libmemcached.org/\fP
-.SH SEE ALSO
-.sp
-\fIlibhashkit(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
deleted file mode 100644 (file)
index 5732607..0000000
+++ /dev/null
@@ -1,208 +0,0 @@
-.TH "LIBMEMCACHED" "3" "May 23, 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
-.sp
-libMemcached is an open source C/C++ client library and tools for the memcached server (\fI\%http://danga.com/memcached\fP). It has been designed to be light on memory usage, thread safe, and provide full access to server side methods.
-.sp
-libMemcached was designed to provide the greatest number of options to use Memcached. Some of the features provided:
-.INDENT 0.0
-.IP 1. 3
-.
-Asynchronous and Synchronous Transport Support.
-.IP 2. 3
-.
-Consistent Hashing and Distribution.
-.IP 3. 3
-.
-Tunable Hashing algorithm to match keys.
-.IP 4. 3
-.
-Access to large object support.
-.IP 5. 3
-.
-Local replication.
-.IP 6. 3
-.
-A complete reference guide and documentation to the API.
-.IP 7. 3
-.
-Tools to Manage your Memcached networks.
-.UNINDENT
-.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 to allow
-for both web and embedded usage. It handles the work behind routing
-individual keys to specific servers specified by the developer (and values are
-matched based on server order as supplied by the user). It implements
-a modular and consistent method of object distribution.
-.sp
-There are multiple implemented routing and hashing methods. See the
-memcached_behavior_set() manpage for more information.
-.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
-Objects are stored on servers by hashing keys. The hash value maps the key to a particular server. All clients understand how this hashing works, so it is possibly to reliably both push data to a server and retrieve data from a server.
-.sp
-Group keys can be optionally used to group sets of objects with servers.
-.sp
-Namespaces are supported, and can be used to partition caches so that multiple applications can use the same memcached 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 one instance
-of \fBmemcached_st\fP per process or thread. Without creating your own locking
-structures you can not share a single \fBmemcached_st\fP. However, you can 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\%http://libmemcached.org/\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_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
deleted file mode 100644 (file)
index 5acb295..0000000
+++ /dev/null
@@ -1,293 +0,0 @@
-.TH "LIBMEMCACHED_CHECK_CONFIGURATION" "3" "May 23, 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
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B memcached_st *memcached(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\-NAMESPACE
-.UNINDENT
-.sp
-When enabled the prefix key will be added to the key when determining which
-server to store the data in.
-.INDENT 0.0
-.TP
-.B \-\-NOREPLY
-.UNINDENT
-.sp
-Enable "no reply" for all calls that support this. It is highly recommended
-that you use this option with the binary protocol only.
-.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 \-\-RANDOMIZE\-REPLICA\-READ
-.UNINDENT
-.sp
-Select randomly the server within the replication pool to read from.
-.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 \-\-USE\-UDP
-.UNINDENT
-.sp
-See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_USE_UDP
-.INDENT 0.0
-.TP
-.B \-\-NAMESPACE=
-.UNINDENT
-.sp
-A namespace is a container that provides context for keys, only other
-requests that know the namespace can access these values. This is
-accomplished by prepending the namespace value to all keys.
-.SS Mecached Pool Options:
-.INDENT 0.0
-.TP
-.B \-\-POOL\-MIN
-.UNINDENT
-.sp
-Initial size of pool.
-.INDENT 0.0
-.TP
-.B \-\-POOL\-MAX
-.UNINDENT
-.sp
-Maximize size of the pool.
-.SS I/O Options:
-.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 \-\-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 \-\-POLL\-TIMEOUT=
-.UNINDENT
-.sp
-That sets the value of the timeout used by :manpage: \fIpoll()\fP.
-.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 \-\-TCP\-KEEPIDLE
-.UNINDENT
-.INDENT 0.0
-.TP
-.B \-\-RCV\-TIMEOUT=
-.UNINDENT
-.SS Other:
-.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() 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(config_string, strlen(config_string);
-{
- ...
-}
-memcached_free(memc);
-.ft P
-.fi
-.SH HOME
-.sp
-To find out more information please check:
-\fI\%http://libmemcached.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/libmemcached_configuration.3 b/docs/man/libmemcached_configuration.3
deleted file mode 100644 (file)
index d33c179..0000000
+++ /dev/null
@@ -1,293 +0,0 @@
-.TH "LIBMEMCACHED_CONFIGURATION" "3" "May 23, 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
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B memcached_st *memcached(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\-NAMESPACE
-.UNINDENT
-.sp
-When enabled the prefix key will be added to the key when determining which
-server to store the data in.
-.INDENT 0.0
-.TP
-.B \-\-NOREPLY
-.UNINDENT
-.sp
-Enable "no reply" for all calls that support this. It is highly recommended
-that you use this option with the binary protocol only.
-.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 \-\-RANDOMIZE\-REPLICA\-READ
-.UNINDENT
-.sp
-Select randomly the server within the replication pool to read from.
-.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 \-\-USE\-UDP
-.UNINDENT
-.sp
-See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_USE_UDP
-.INDENT 0.0
-.TP
-.B \-\-NAMESPACE=
-.UNINDENT
-.sp
-A namespace is a container that provides context for keys, only other
-requests that know the namespace can access these values. This is
-accomplished by prepending the namespace value to all keys.
-.SS Mecached Pool Options:
-.INDENT 0.0
-.TP
-.B \-\-POOL\-MIN
-.UNINDENT
-.sp
-Initial size of pool.
-.INDENT 0.0
-.TP
-.B \-\-POOL\-MAX
-.UNINDENT
-.sp
-Maximize size of the pool.
-.SS I/O Options:
-.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 \-\-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 \-\-POLL\-TIMEOUT=
-.UNINDENT
-.sp
-That sets the value of the timeout used by :manpage: \fIpoll()\fP.
-.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 \-\-TCP\-KEEPIDLE
-.UNINDENT
-.INDENT 0.0
-.TP
-.B \-\-RCV\-TIMEOUT=
-.UNINDENT
-.SS Other:
-.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() 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(config_string, strlen(config_string);
-{
- ...
-}
-memcached_free(memc);
-.ft P
-.fi
-.SH HOME
-.sp
-To find out more information please check:
-\fI\%http://libmemcached.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/libmemcached_examples.3 b/docs/man/libmemcached_examples.3
deleted file mode 100644 (file)
index 45c3da3..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-.TH "LIBMEMCACHED_EXAMPLES" "3" "May 23, 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 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(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 CREATING A POOL OF SERVERS
-.sp
-.nf
-.ft C
-const char *config_string= "\-\-SERVER=host10.example.com \-\-SERVER=host11.example.com \-\-SERVER=host10.example.com";
-
-memcached_pool_st* pool= memcached_pool(config_string, strlen(config_string));
-
-memcached_return_t rc;
-
-memcached_st *memc= memcached_pool_pop(pool, false, &rc);
-
-\&.... do work
-
-/*
-  Release the memc_ptr that was pulled from the pool
-*/
-memcached_pool_push(pool, memc);
-
-/*
-  Destroy the pool.
-*/
-memcached_pool_destroy(pool);
-.ft P
-.fi
-.sp
-In the above code you create a \fBmemcached_pool_st\fP object with three
-server by making use of \fImemcached_pool(3)\fP.
-.sp
-When memcached_pool_destroy() all memory will be released that is associated
-with the pool.
-.SH ADDING A VALUE TO THE SERVER
-.sp
-.nf
-.ft C
-char *key= "foo";
-char *value= "value";
-
-memcached_return_t rc= memcached_set(memc, key, strlen(key), value, value_length, (time_t)0, (uint32_t)0);
-
-if (rc != MEMCACHED_SUCCESS)
-{
-\&... // handle failure
-}
-.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\%http://libmemcached.org/\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
deleted file mode 100644 (file)
index f6960ae..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-.TH "LIBMEMCACHEDUTIL" "3" "May 23, 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 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\%http://libmemcached.org/\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
deleted file mode 100644 (file)
index 2436731..0000000
+++ /dev/null
@@ -1,1222 +0,0 @@
-.TH "MEMASLAP" "1" "May 23, 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
-.sp
-:program:: \fImemaslap\fP
-.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://libmemcached.org/\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.3 b/docs/man/memcached.3
deleted file mode 100644 (file)
index 8afca7c..0000000
+++ /dev/null
@@ -1,293 +0,0 @@
-.TH "MEMCACHED" "3" "May 23, 2011" "0.47" "libmemcached"
-.SH NAME
-memcached \- 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_st *memcached(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\-NAMESPACE
-.UNINDENT
-.sp
-When enabled the prefix key will be added to the key when determining which
-server to store the data in.
-.INDENT 0.0
-.TP
-.B \-\-NOREPLY
-.UNINDENT
-.sp
-Enable "no reply" for all calls that support this. It is highly recommended
-that you use this option with the binary protocol only.
-.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 \-\-RANDOMIZE\-REPLICA\-READ
-.UNINDENT
-.sp
-Select randomly the server within the replication pool to read from.
-.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 \-\-USE\-UDP
-.UNINDENT
-.sp
-See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_USE_UDP
-.INDENT 0.0
-.TP
-.B \-\-NAMESPACE=
-.UNINDENT
-.sp
-A namespace is a container that provides context for keys, only other
-requests that know the namespace can access these values. This is
-accomplished by prepending the namespace value to all keys.
-.SS Mecached Pool Options:
-.INDENT 0.0
-.TP
-.B \-\-POOL\-MIN
-.UNINDENT
-.sp
-Initial size of pool.
-.INDENT 0.0
-.TP
-.B \-\-POOL\-MAX
-.UNINDENT
-.sp
-Maximize size of the pool.
-.SS I/O Options:
-.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 \-\-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 \-\-POLL\-TIMEOUT=
-.UNINDENT
-.sp
-That sets the value of the timeout used by :manpage: \fIpoll()\fP.
-.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 \-\-TCP\-KEEPIDLE
-.UNINDENT
-.INDENT 0.0
-.TP
-.B \-\-RCV\-TIMEOUT=
-.UNINDENT
-.SS Other:
-.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() 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(config_string, strlen(config_string);
-{
- ...
-}
-memcached_free(memc);
-.ft P
-.fi
-.SH HOME
-.sp
-To find out more information please check:
-\fI\%http://libmemcached.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_add.3 b/docs/man/memcached_add.3
deleted file mode 100644 (file)
index e29bd2a..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-.TH "MEMCACHED_ADD" "3" "May 23, 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.
-.
-.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_set_by_key(memcached_st *ptr, const char *group_key, size_t group_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 *group_key, size_t group_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 *group_key, size_t group_key_length, const char *key, size_t key_length, const char *value, size_t value_length, time_t expiration, uint32_t flags);
-.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 when using either a version of memcached(1) which is 1.4 or below, or when using the text protocol.
-You must supply both a value and a length. Optionally you
-may test an expiration time for the object and a 16 byte value (it is
-meant to be used as a bitmap). "flags" is a 4byte space that is stored alongside of the main value. Many sub libraries make use of this field, so in most cases users should avoid making use of it.
-.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_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(), and memcached_replace_by_key()
-methods all behave in a similar method as the non key
-methods. The difference is that they use their group_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. However, 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 Memcached 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\%http://libmemcached.org/\fP
-.SH SEE ALSO
-.sp
-memcached(1) libmemached(3) memcached_strerror(3) memcached_prepend(3) memcached_cas(3) memcached_append(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
deleted file mode 100644 (file)
index 9686ad3..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-.TH "MEMCACHED_ADD_BY_KEY" "3" "May 23, 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.
-.
-.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_set_by_key(memcached_st *ptr, const char *group_key, size_t group_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 *group_key, size_t group_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 *group_key, size_t group_key_length, const char *key, size_t key_length, const char *value, size_t value_length, time_t expiration, uint32_t flags);
-.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 when using either a version of memcached(1) which is 1.4 or below, or when using the text protocol.
-You must supply both a value and a length. Optionally you
-may test an expiration time for the object and a 16 byte value (it is
-meant to be used as a bitmap). "flags" is a 4byte space that is stored alongside of the main value. Many sub libraries make use of this field, so in most cases users should avoid making use of it.
-.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_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(), and memcached_replace_by_key()
-methods all behave in a similar method as the non key
-methods. The difference is that they use their group_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. However, 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 Memcached 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\%http://libmemcached.org/\fP
-.SH SEE ALSO
-.sp
-memcached(1) libmemached(3) memcached_strerror(3) memcached_prepend(3) memcached_cas(3) memcached_append(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
deleted file mode 100644 (file)
index 2917b6e..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-.TH "MEMCACHED_ANALYZE" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B memcached_analysis_st * memcached_analyze (memcached_st *ptr, memcached_stat_st *stat, memcached_return_t *error);
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.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\%http://libmemcached.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_append.3 b/docs/man/memcached_append.3
deleted file mode 100644 (file)
index d41ef68..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-.TH "MEMCACHED_APPEND" "3" "May 23, 2011" "0.47" "libmemcached"
-.SH NAME
-memcached_append \- Appending to or Prepending to data on 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.
-.
-.sp
-Appending or Prepending to data on the server
-.SH SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.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_prepend_by_key(memcached_st *ptr, const char *group_key, size_t group_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 *group_key, size_t group_key_length, const char *key, size_t key_length, const char *value, size_t value_length, time_t expiration, uint32_t flags);
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.SH DESCRIPTION
-.sp
-memcached_prepend() and memcached_append are used to
-modify information on a server. All methods take a key, and its length to
-store the object. Keys are currently limited to 250 characters when using either a version of memcached(1) which is 1.4 or below, or when using the text protocol.
-You must supply both a value and a length. Optionally you
-may test an expiration time for the object and a 16 byte value (it is
-meant to be used as a bitmap). "flags" is a 4byte space that is stored alongside of the main value. Many sub libraries make use of this field, so in most cases users should avoid making use of it.
-.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_prepend_by_key() and memcached_append_by_key_by_key(,
-methods both behave in a similar method as the non key
-methods. The difference is that they use their group_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. However, 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 Memcached 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.
-.SH HOME
-.sp
-To find out more information please check:
-\fI\%http://libmemcached.org/\fP
-.SH SEE ALSO
-.sp
-memcached(1) libmemached(3) memcached_strerror(3) memcached_set(3) memcached_add(3) memcached_cas(3) memcached_replace(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
deleted file mode 100644 (file)
index 006656f..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-.TH "MEMCACHED_APPEND_BY_KEY" "3" "May 23, 2011" "0.47" "libmemcached"
-.SH NAME
-memcached_append_by_key \- Appending to or Prepending to data on 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.
-.
-.sp
-Appending or Prepending to data on the server
-.SH SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.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_prepend_by_key(memcached_st *ptr, const char *group_key, size_t group_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 *group_key, size_t group_key_length, const char *key, size_t key_length, const char *value, size_t value_length, time_t expiration, uint32_t flags);
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.SH DESCRIPTION
-.sp
-memcached_prepend() and memcached_append are used to
-modify information on a server. All methods take a key, and its length to
-store the object. Keys are currently limited to 250 characters when using either a version of memcached(1) which is 1.4 or below, or when using the text protocol.
-You must supply both a value and a length. Optionally you
-may test an expiration time for the object and a 16 byte value (it is
-meant to be used as a bitmap). "flags" is a 4byte space that is stored alongside of the main value. Many sub libraries make use of this field, so in most cases users should avoid making use of it.
-.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_prepend_by_key() and memcached_append_by_key_by_key(,
-methods both behave in a similar method as the non key
-methods. The difference is that they use their group_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. However, 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 Memcached 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.
-.SH HOME
-.sp
-To find out more information please check:
-\fI\%http://libmemcached.org/\fP
-.SH SEE ALSO
-.sp
-memcached(1) libmemached(3) memcached_strerror(3) memcached_set(3) memcached_add(3) memcached_cas(3) memcached_replace(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
deleted file mode 100644 (file)
index 44f2b2d..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-.TH "MEMCACHED_AUTO" "3" "May 23, 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 *group_key, size_t group_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 *group_key, size_t group_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 *group_key, size_t group_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 *group_key, size_t group_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\%http://libmemcached.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_behavior.3 b/docs/man/memcached_behavior.3
deleted file mode 100644 (file)
index a710f77..0000000
+++ /dev/null
@@ -1,333 +0,0 @@
-.TH "MEMCACHED_BEHAVIOR" "3" "May 23, 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 the behavior of a memcached_st structure.
-.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
-.sp
-Compile and link with \-lmemcached
-.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\%http://libmemcached.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_behavior_get.3 b/docs/man/memcached_behavior_get.3
deleted file mode 100644 (file)
index 722acfb..0000000
+++ /dev/null
@@ -1,333 +0,0 @@
-.TH "MEMCACHED_BEHAVIOR_GET" "3" "May 23, 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 the behavior of a memcached_st structure.
-.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
-.sp
-Compile and link with \-lmemcached
-.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\%http://libmemcached.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_behavior_set.3 b/docs/man/memcached_behavior_set.3
deleted file mode 100644 (file)
index 0aa111c..0000000
+++ /dev/null
@@ -1,333 +0,0 @@
-.TH "MEMCACHED_BEHAVIOR_SET" "3" "May 23, 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 the behavior of a memcached_st structure.
-.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
-.sp
-Compile and link with \-lmemcached
-.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\%http://libmemcached.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.3 b/docs/man/memcached_callback.3
deleted file mode 100644 (file)
index 8433838..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-.TH "MEMCACHED_CALLBACK" "3" "May 23, 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 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
-.sp
-Compile and link with \-lmemcached
-.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
-.UNINDENT
-.sp
-When memcached_delete() is called this function will be excuted. At the point of its execution all connections are closed.
-.INDENT 0.0
-.TP
-.B MEMCACHED_CALLBACK_CLONE_FUNCTION
-.UNINDENT
-.sp
-When memcached_delete() is called this function will be excuted. At the
-point of its execution all connections are closed.
-.INDENT 0.0
-.TP
-.B MEMCACHED_CALLBACK_PREFIX_KEY
-.UNINDENT
-.sp
-You can set a value which will be used to create a domain for your keys.
-The value specified here will be prefixed to each of your keys. The value can not be greater then MEMCACHED_PREFIX_KEY_MAX_SIZE \- 1 and will reduce MEMCACHED_MAX_KEY by the value of your key.
-.sp
-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.
-.INDENT 0.0
-.TP
-.B MEMCACHED_CALLBACK_USER_DATA
-.UNINDENT
-.sp
-This allows you to store a pointer to a specifc piece of data. This can be
-retrieved from inside of memcached_fetch_execute(). Cloning a memcached_st
-will copy the pointer to the clone.
-.INDENT 0.0
-.TP
-.B MEMCACHED_CALLBACK_MALLOC_FUNCTION
-.UNINDENT
-.sp
-DEPRECATED: use memcached_set_memory_allocators instead.
-.INDENT 0.0
-.TP
-.B MEMCACHED_CALLBACK_REALLOC_FUNCTION
-.UNINDENT
-.sp
-DEPRECATED: use memcached_set_memory_allocators instead.
-.INDENT 0.0
-.TP
-.B MEMCACHED_CALLBACK_FREE_FUNCTION
-.UNINDENT
-.sp
-DEPRECATED: use memcached_set_memory_allocators instead.
-.INDENT 0.0
-.TP
-.B MEMCACHED_CALLBACK_GET_FAILURE
-.UNINDENT
-.sp
-This function implements the read through cache behavior. On failure of retrieval this callback will be called.
-.sp
-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.
-.sp
-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);
-.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\%http://libmemcached.org/\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
deleted file mode 100644 (file)
index e928573..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-.TH "MEMCACHED_CALLBACK_GET" "3" "May 23, 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 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
-.sp
-Compile and link with \-lmemcached
-.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
-.UNINDENT
-.sp
-When memcached_delete() is called this function will be excuted. At the point of its execution all connections are closed.
-.INDENT 0.0
-.TP
-.B MEMCACHED_CALLBACK_CLONE_FUNCTION
-.UNINDENT
-.sp
-When memcached_delete() is called this function will be excuted. At the
-point of its execution all connections are closed.
-.INDENT 0.0
-.TP
-.B MEMCACHED_CALLBACK_PREFIX_KEY
-.UNINDENT
-.sp
-You can set a value which will be used to create a domain for your keys.
-The value specified here will be prefixed to each of your keys. The value can not be greater then MEMCACHED_PREFIX_KEY_MAX_SIZE \- 1 and will reduce MEMCACHED_MAX_KEY by the value of your key.
-.sp
-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.
-.INDENT 0.0
-.TP
-.B MEMCACHED_CALLBACK_USER_DATA
-.UNINDENT
-.sp
-This allows you to store a pointer to a specifc piece of data. This can be
-retrieved from inside of memcached_fetch_execute(). Cloning a memcached_st
-will copy the pointer to the clone.
-.INDENT 0.0
-.TP
-.B MEMCACHED_CALLBACK_MALLOC_FUNCTION
-.UNINDENT
-.sp
-DEPRECATED: use memcached_set_memory_allocators instead.
-.INDENT 0.0
-.TP
-.B MEMCACHED_CALLBACK_REALLOC_FUNCTION
-.UNINDENT
-.sp
-DEPRECATED: use memcached_set_memory_allocators instead.
-.INDENT 0.0
-.TP
-.B MEMCACHED_CALLBACK_FREE_FUNCTION
-.UNINDENT
-.sp
-DEPRECATED: use memcached_set_memory_allocators instead.
-.INDENT 0.0
-.TP
-.B MEMCACHED_CALLBACK_GET_FAILURE
-.UNINDENT
-.sp
-This function implements the read through cache behavior. On failure of retrieval this callback will be called.
-.sp
-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.
-.sp
-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);
-.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\%http://libmemcached.org/\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
deleted file mode 100644 (file)
index ea21198..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-.TH "MEMCACHED_CALLBACK_SET" "3" "May 23, 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 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
-.sp
-Compile and link with \-lmemcached
-.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
-.UNINDENT
-.sp
-When memcached_delete() is called this function will be excuted. At the point of its execution all connections are closed.
-.INDENT 0.0
-.TP
-.B MEMCACHED_CALLBACK_CLONE_FUNCTION
-.UNINDENT
-.sp
-When memcached_delete() is called this function will be excuted. At the
-point of its execution all connections are closed.
-.INDENT 0.0
-.TP
-.B MEMCACHED_CALLBACK_PREFIX_KEY
-.UNINDENT
-.sp
-You can set a value which will be used to create a domain for your keys.
-The value specified here will be prefixed to each of your keys. The value can not be greater then MEMCACHED_PREFIX_KEY_MAX_SIZE \- 1 and will reduce MEMCACHED_MAX_KEY by the value of your key.
-.sp
-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.
-.INDENT 0.0
-.TP
-.B MEMCACHED_CALLBACK_USER_DATA
-.UNINDENT
-.sp
-This allows you to store a pointer to a specifc piece of data. This can be
-retrieved from inside of memcached_fetch_execute(). Cloning a memcached_st
-will copy the pointer to the clone.
-.INDENT 0.0
-.TP
-.B MEMCACHED_CALLBACK_MALLOC_FUNCTION
-.UNINDENT
-.sp
-DEPRECATED: use memcached_set_memory_allocators instead.
-.INDENT 0.0
-.TP
-.B MEMCACHED_CALLBACK_REALLOC_FUNCTION
-.UNINDENT
-.sp
-DEPRECATED: use memcached_set_memory_allocators instead.
-.INDENT 0.0
-.TP
-.B MEMCACHED_CALLBACK_FREE_FUNCTION
-.UNINDENT
-.sp
-DEPRECATED: use memcached_set_memory_allocators instead.
-.INDENT 0.0
-.TP
-.B MEMCACHED_CALLBACK_GET_FAILURE
-.UNINDENT
-.sp
-This function implements the read through cache behavior. On failure of retrieval this callback will be called.
-.sp
-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.
-.sp
-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);
-.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\%http://libmemcached.org/\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
deleted file mode 100644 (file)
index 5e81881..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-.TH "MEMCACHED_CAS" "3" "May 23, 2011" "0.47" "libmemcached"
-.SH NAME
-memcached_cas \- Working with data on the server in an atomic fashion
-.
-.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_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_cas_by_key(memcached_st *ptr, const char *group_key, size_t group_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_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_cas_by_key() method behaves in a similar method as the non key
-methods. The difference is that it uses the group_key parameter to map
-objects to particular servers.
-.sp
-memcached_cas() is testsed with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPbehavior enabled. However, 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 Memcached 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.
-.SH HOME
-.sp
-To find out more information please check:
-\fI\%http://libmemcached.org/\fP
-.SH SEE ALSO
-.sp
-memcached(1) libmemached(3) memcached_strerror(3) memcached_set(3) memcached_append(3) memcached_add(3) memcached_prepend(3) memcached_replace(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
deleted file mode 100644 (file)
index bd0bfb2..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-.TH "MEMCACHED_CAS_BY_KEY" "3" "May 23, 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.
-.
-.SH SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.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_cas_by_key(memcached_st *ptr, const char *group_key, size_t group_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_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_cas_by_key() method behaves in a similar method as the non key
-methods. The difference is that it uses the group_key parameter to map
-objects to particular servers.
-.sp
-memcached_cas() is testsed with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPbehavior enabled. However, 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 Memcached 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.
-.SH HOME
-.sp
-To find out more information please check:
-\fI\%http://libmemcached.org/\fP
-.SH SEE ALSO
-.sp
-memcached(1) libmemached(3) memcached_strerror(3) memcached_set(3) memcached_append(3) memcached_add(3) memcached_prepend(3) memcached_replace(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
deleted file mode 100644 (file)
index 4da24c6..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-.TH "MEMCACHED_CLONE" "3" "May 23, 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.
-.
-.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\%http://libmemcached.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_create.3 b/docs/man/memcached_create.3
deleted file mode 100644 (file)
index 266d8c0..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-.TH "MEMCACHED_CREATE" "3" "May 23, 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.
-.
-.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\%http://libmemcached.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_decrement.3 b/docs/man/memcached_decrement.3
deleted file mode 100644 (file)
index ac5855c..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-.TH "MEMCACHED_DECREMENT" "3" "May 23, 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 *group_key, size_t group_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 *group_key, size_t group_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 *group_key, size_t group_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 *group_key, size_t group_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\%http://libmemcached.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_decrement_with_initial.3 b/docs/man/memcached_decrement_with_initial.3
deleted file mode 100644 (file)
index df7409a..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-.TH "MEMCACHED_DECREMENT_WITH_INITIAL" "3" "May 23, 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 *group_key, size_t group_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 *group_key, size_t group_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 *group_key, size_t group_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 *group_key, size_t group_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\%http://libmemcached.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.3 b/docs/man/memcached_delete.3
deleted file mode 100644 (file)
index d9bdaf8..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-.TH "MEMCACHED_DELETE" "3" "May 23, 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 *group_key, size_t group_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 be possible to retrieve it by the "get" command. The "add" and
-"replace" commands 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\%http://libmemcached.org/\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
deleted file mode 100644 (file)
index afe0239..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-.TH "MEMCACHED_DELETE_BY_KEY" "3" "May 23, 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 *group_key, size_t group_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 be possible to retrieve it by the "get" command. The "add" and
-"replace" commands 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\%http://libmemcached.org/\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
deleted file mode 100644 (file)
index 3ff9394..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-.TH "MEMCACHED_DESTROY_SASL_AUTH_DATA" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libmemcached/memcached_pool.h>
-.INDENT 0.0
-.TP
-.B void memcached_set_sasl_callbacks(memcached_st\fI\ *ptr\fP, const sasl_callback_t\fI\ *callbacks\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st\fI\ *ptr\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return memcached_set_sasl_auth_data(memcached_st\fI\ *ptr\fP, const char\fI\ *username\fP, const char\fI\ *password\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return memcached_destroy_sasl_auth_data(memcached_st\fI\ *ptr\fP)
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.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 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
deleted file mode 100644 (file)
index 5888887..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-.TH "MEMCACHED_DUMP" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_dump (memcached_st *ptr, memcached_dump_fn *function, void *context, uint32_t number_of_callbacks);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B typedef memcached_return_t (*memcached_dump_fn)(memcached_st *ptr,  const char *key, size_t key_length, void *context);
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.SH DESCRIPTION
-.sp
-memcached_dump() is used to get a list of keys found in 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 binary 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\%http://libmemcached.org/\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
deleted file mode 100644 (file)
index ace471e..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-.TH "MEMCACHED_FETCH" "3" "May 23, 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 *group_key, size_t group_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 *group_key, size_t group_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 *group_key, size_t group_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() must be freed 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 (it will 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 tested 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\%http://libmemcached.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_execute.3 b/docs/man/memcached_fetch_execute.3
deleted file mode 100644 (file)
index d2262c6..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-.TH "MEMCACHED_FETCH_EXECUTE" "3" "May 23, 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 *group_key, size_t group_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 *group_key, size_t group_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 *group_key, size_t group_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() must be freed 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 (it will 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 tested 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\%http://libmemcached.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_result.3 b/docs/man/memcached_fetch_result.3
deleted file mode 100644 (file)
index a762e2a..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-.TH "MEMCACHED_FETCH_RESULT" "3" "May 23, 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 *group_key, size_t group_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 *group_key, size_t group_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 *group_key, size_t group_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() must be freed 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 (it will 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 tested 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\%http://libmemcached.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.3 b/docs/man/memcached_flush.3
deleted file mode 100644 (file)
index 79cec02..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-.TH "MEMCACHED_FLUSH" "3" "May 23, 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\%http://libmemcached.org/\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
deleted file mode 100644 (file)
index 556fc99..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-.TH "MEMCACHED_FLUSH_BUFFERS" "3" "May 23, 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 and senf buffered commands
-.SH SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_flush_buffers (memcached_st *ptr);
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.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\%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_free.3 b/docs/man/memcached_free.3
deleted file mode 100644 (file)
index 806c0f2..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-.TH "MEMCACHED_FREE" "3" "May 23, 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.
-.
-.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\%http://libmemcached.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.3 b/docs/man/memcached_generate_hash.3
deleted file mode 100644 (file)
index 6f6a2e9..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-.TH "MEMCACHED_GENERATE_HASH" "3" "May 23, 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\%http://libmemcached.org/\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
deleted file mode 100644 (file)
index 41b2b05..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-.TH "MEMCACHED_GENERATE_HASH_VALUE" "3" "May 23, 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\%http://libmemcached.org/\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
deleted file mode 100644 (file)
index 4acfdec..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-.TH "MEMCACHED_GET" "3" "May 23, 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 *group_key, size_t group_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 *group_key, size_t group_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 *group_key, size_t group_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() must be freed 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 (it will 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 tested 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\%http://libmemcached.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_by_key.3 b/docs/man/memcached_get_by_key.3
deleted file mode 100644 (file)
index 49857b2..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-.TH "MEMCACHED_GET_BY_KEY" "3" "May 23, 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 *group_key, size_t group_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 *group_key, size_t group_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 *group_key, size_t group_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() must be freed 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 (it will 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 tested 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\%http://libmemcached.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_memory_allocators.3 b/docs/man/memcached_get_memory_allocators.3
deleted file mode 100644 (file)
index 2565aef..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-.TH "MEMCACHED_GET_MEMORY_ALLOCATORS" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B 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);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B 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);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void * memcached_get_memory_allocators_context(const memcached_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void * (*memcached_malloc_fn) (memcached_st *ptr, const size_t size, void *context);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void * (*memcached_realloc_fn) (memcached_st *ptr, void *mem, const size_t size, void *context);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void (*memcached_free_fn) (memcached_st *ptr, void *mem, void *context);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void * (*memcached_calloc_fn) (memcached_st *ptr, size_t nelem, const size_t elsize, void *context);
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.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\%http://libmemcached.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_sasl_callbacks.3 b/docs/man/memcached_get_sasl_callbacks.3
deleted file mode 100644 (file)
index 2dde727..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-.TH "MEMCACHED_GET_SASL_CALLBACKS" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libmemcached/memcached_pool.h>
-.INDENT 0.0
-.TP
-.B void memcached_set_sasl_callbacks(memcached_st\fI\ *ptr\fP, const sasl_callback_t\fI\ *callbacks\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st\fI\ *ptr\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return memcached_set_sasl_auth_data(memcached_st\fI\ *ptr\fP, const char\fI\ *username\fP, const char\fI\ *password\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return memcached_destroy_sasl_auth_data(memcached_st\fI\ *ptr\fP)
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.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 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
deleted file mode 100644 (file)
index 47b5d2d..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-.TH "MEMCACHED_GET_USER_DATA" "3" "May 23, 2011" "0.47" "libmemcached"
-.SH NAME
-memcached_get_user_data \- libmemcached Documentation
-.
-.nr rst2man-indent-level 0
-.
-.de1 rstReportMargin
-\\$1 \\n[an-margin]
-level \\n[rst2man-indent-level]
-level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
--
-\\n[rst2man-indent0]
-\\n[rst2man-indent1]
-\\n[rst2man-indent2]
-..
-.de1 INDENT
-.\" .rstReportMargin pre:
-. RS \\$1
-. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
-. nr rst2man-indent-level +1
-.\" .rstReportMargin post:
-..
-.de UNINDENT
-. RE
-.\" indent \\n[an-margin]
-.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
-.nr rst2man-indent-level -1
-.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
-.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
-..
-.\" Man page generated from reStructeredText.
-.
-.sp
-Manage user specific data
-.SH LIBRARY
-.sp
-C Client Library for memcached (libmemcached, \-lmemcached)
-.SH SYNOPSIS
-.sp
-.nf
-.ft C
-#include <libmemcached/memcached.h>
-
-void *memcached_get_user_data (memcached_st *ptr);
-
-void *memcached_set_user_data (memcached_st *ptr, void *data);
-.ft P
-.fi
-.SH DESCRIPTION
-.sp
-libmemcached(3) allows you to store a pointer to a user specific data inside
-the memcached_st structure.
-.sp
-memcached_set_user_data() is used to set the user specific data in the
-memcached_st structure.
-.sp
-memcached_get_user_data() is used to retrieve the user specific data in
-the memcached_st structure.
-.SH RETURN
-.sp
-memcached_set_user_data() returns the previous value of the user specific
-data.
-.sp
-memcached_get_user_data() returns the current value uf the user specific
-data.
-.SH HOME
-.sp
-To find out more information please check:
-\fI\%http://libmemcached.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/memcached_increment.3 b/docs/man/memcached_increment.3
deleted file mode 100644 (file)
index 166ac9f..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-.TH "MEMCACHED_INCREMENT" "3" "May 23, 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 *group_key, size_t group_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 *group_key, size_t group_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 *group_key, size_t group_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 *group_key, size_t group_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\%http://libmemcached.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_increment_with_initial.3 b/docs/man/memcached_increment_with_initial.3
deleted file mode 100644 (file)
index a54b847..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-.TH "MEMCACHED_INCREMENT_WITH_INITIAL" "3" "May 23, 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 *group_key, size_t group_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 *group_key, size_t group_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 *group_key, size_t group_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 *group_key, size_t group_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\%http://libmemcached.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_lib_version.3 b/docs/man/memcached_lib_version.3
deleted file mode 100644 (file)
index 2d3f56c..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-.TH "MEMCACHED_LIB_VERSION" "3" "May 23, 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.
-.
-.SH SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B const char * memcached_lib_version(void)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_version(memcached_st\fI\ *ptr\fP)
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.SH DESCRIPTION
-.sp
-memcached_lib_version() is used to return a simple version string representing
-the libmemcached version (client library version, not server version)
-.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\%http://libmemcached.org/\fP
-.SH 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
deleted file mode 100644 (file)
index 27ca3ed..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-.TH "MEMCACHED_MEMORY_ALLOCATORS" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B 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);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B 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);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void * memcached_get_memory_allocators_context(const memcached_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void * (*memcached_malloc_fn) (memcached_st *ptr, const size_t size, void *context);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void * (*memcached_realloc_fn) (memcached_st *ptr, void *mem, const size_t size, void *context);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void (*memcached_free_fn) (memcached_st *ptr, void *mem, void *context);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void * (*memcached_calloc_fn) (memcached_st *ptr, size_t nelem, const size_t elsize, void *context);
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.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\%http://libmemcached.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_mget.3 b/docs/man/memcached_mget.3
deleted file mode 100644 (file)
index 7968bb2..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-.TH "MEMCACHED_MGET" "3" "May 23, 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 *group_key, size_t group_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 *group_key, size_t group_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 *group_key, size_t group_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() must be freed 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 (it will 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 tested 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\%http://libmemcached.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_mget_by_key.3 b/docs/man/memcached_mget_by_key.3
deleted file mode 100644 (file)
index c87626a..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-.TH "MEMCACHED_MGET_BY_KEY" "3" "May 23, 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 *group_key, size_t group_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 *group_key, size_t group_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 *group_key, size_t group_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() must be freed 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 (it will 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 tested 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\%http://libmemcached.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_mget_execute.3 b/docs/man/memcached_mget_execute.3
deleted file mode 100644 (file)
index 02b3846..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-.TH "MEMCACHED_MGET_EXECUTE" "3" "May 23, 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 *group_key, size_t group_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 *group_key, size_t group_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 *group_key, size_t group_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() must be freed 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 (it will 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 tested 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\%http://libmemcached.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_mget_execute_by_key.3 b/docs/man/memcached_mget_execute_by_key.3
deleted file mode 100644 (file)
index ec11b3d..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-.TH "MEMCACHED_MGET_EXECUTE_BY_KEY" "3" "May 23, 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 *group_key, size_t group_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 *group_key, size_t group_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 *group_key, size_t group_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() must be freed 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 (it will 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 tested 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\%http://libmemcached.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_pool.3 b/docs/man/memcached_pool.3
deleted file mode 100644 (file)
index 0dfba99..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-.TH "MEMCACHED_POOL" "3" "May 23, 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(const char *option_string, size_t option_string_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_pool_st * memcached_pool_create(memcached_st* mmc, int initial, int max); DEPRECATED
-.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() 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\fPobjects. Please see \fIlibmemcached_configuration\fP for details on the format of the configuration string.
-.sp
-DEPRECATED 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\fPobjects. The mmc argument should be an
-initialised \fBmemcached_st\fPstructure, 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 when created with memcached_pool_create,
-otherwise NULL is returned..
-.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\%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_pool_behavior_get.3 b/docs/man/memcached_pool_behavior_get.3
deleted file mode 100644 (file)
index 1d735cb..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-.TH "MEMCACHED_POOL_BEHAVIOR_GET" "3" "May 23, 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(const char *option_string, size_t option_string_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_pool_st * memcached_pool_create(memcached_st* mmc, int initial, int max); DEPRECATED
-.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() 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\fPobjects. Please see \fIlibmemcached_configuration\fP for details on the format of the configuration string.
-.sp
-DEPRECATED 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\fPobjects. The mmc argument should be an
-initialised \fBmemcached_st\fPstructure, 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 when created with memcached_pool_create,
-otherwise NULL is returned..
-.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\%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_pool_behavior_set.3 b/docs/man/memcached_pool_behavior_set.3
deleted file mode 100644 (file)
index c0a96a3..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-.TH "MEMCACHED_POOL_BEHAVIOR_SET" "3" "May 23, 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(const char *option_string, size_t option_string_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_pool_st * memcached_pool_create(memcached_st* mmc, int initial, int max); DEPRECATED
-.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() 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\fPobjects. Please see \fIlibmemcached_configuration\fP for details on the format of the configuration string.
-.sp
-DEPRECATED 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\fPobjects. The mmc argument should be an
-initialised \fBmemcached_st\fPstructure, 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 when created with memcached_pool_create,
-otherwise NULL is returned..
-.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\%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_pool_create.3 b/docs/man/memcached_pool_create.3
deleted file mode 100644 (file)
index 1a09624..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-.TH "MEMCACHED_POOL_CREATE" "3" "May 23, 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(const char *option_string, size_t option_string_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_pool_st * memcached_pool_create(memcached_st* mmc, int initial, int max); DEPRECATED
-.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() 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\fPobjects. Please see \fIlibmemcached_configuration\fP for details on the format of the configuration string.
-.sp
-DEPRECATED 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\fPobjects. The mmc argument should be an
-initialised \fBmemcached_st\fPstructure, 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 when created with memcached_pool_create,
-otherwise NULL is returned..
-.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\%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_pool_destroy.3 b/docs/man/memcached_pool_destroy.3
deleted file mode 100644 (file)
index 73e6ae2..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-.TH "MEMCACHED_POOL_DESTROY" "3" "May 23, 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(const char *option_string, size_t option_string_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_pool_st * memcached_pool_create(memcached_st* mmc, int initial, int max); DEPRECATED
-.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() 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\fPobjects. Please see \fIlibmemcached_configuration\fP for details on the format of the configuration string.
-.sp
-DEPRECATED 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\fPobjects. The mmc argument should be an
-initialised \fBmemcached_st\fPstructure, 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 when created with memcached_pool_create,
-otherwise NULL is returned..
-.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\%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_pool_pop.3 b/docs/man/memcached_pool_pop.3
deleted file mode 100644 (file)
index 8d5707f..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-.TH "MEMCACHED_POOL_POP" "3" "May 23, 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(const char *option_string, size_t option_string_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_pool_st * memcached_pool_create(memcached_st* mmc, int initial, int max); DEPRECATED
-.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() 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\fPobjects. Please see \fIlibmemcached_configuration\fP for details on the format of the configuration string.
-.sp
-DEPRECATED 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\fPobjects. The mmc argument should be an
-initialised \fBmemcached_st\fPstructure, 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 when created with memcached_pool_create,
-otherwise NULL is returned..
-.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\%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_pool_push.3 b/docs/man/memcached_pool_push.3
deleted file mode 100644 (file)
index cfe2a11..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-.TH "MEMCACHED_POOL_PUSH" "3" "May 23, 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(const char *option_string, size_t option_string_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_pool_st * memcached_pool_create(memcached_st* mmc, int initial, int max); DEPRECATED
-.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() 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\fPobjects. Please see \fIlibmemcached_configuration\fP for details on the format of the configuration string.
-.sp
-DEPRECATED 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\fPobjects. The mmc argument should be an
-initialised \fBmemcached_st\fPstructure, 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 when created with memcached_pool_create,
-otherwise NULL is returned..
-.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\%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_pool_st.3 b/docs/man/memcached_pool_st.3
deleted file mode 100644 (file)
index 9479f5c..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-.TH "MEMCACHED_POOL_ST" "3" "May 23, 2011" "0.47" "libmemcached"
-.SH NAME
-memcached_pool_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.
-.
-.SH SYNOPSIS
-.sp
-#include <libmemcached/memcached_pool.h>
-.INDENT 0.0
-.TP
-.B memcached_pool_st *memcached_pool(const char *option_string, size_t option_string_length);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_pool_st * memcached_pool_create(memcached_st* mmc, int initial, int max); DEPRECATED
-.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() 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\fPobjects. Please see \fIlibmemcached_configuration\fP for details on the format of the configuration string.
-.sp
-DEPRECATED 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\fPobjects. The mmc argument should be an
-initialised \fBmemcached_st\fPstructure, 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 when created with memcached_pool_create,
-otherwise NULL is returned..
-.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\%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_prepend.3 b/docs/man/memcached_prepend.3
deleted file mode 100644 (file)
index 4793e35..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-.TH "MEMCACHED_PREPEND" "3" "May 23, 2011" "0.47" "libmemcached"
-.SH NAME
-memcached_prepend \- Appending to or Prepending to data on 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.
-.
-.sp
-Appending or Prepending to data on the server
-.SH SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.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_prepend_by_key(memcached_st *ptr, const char *group_key, size_t group_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 *group_key, size_t group_key_length, const char *key, size_t key_length, const char *value, size_t value_length, time_t expiration, uint32_t flags);
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.SH DESCRIPTION
-.sp
-memcached_prepend() and memcached_append are used to
-modify information on a server. All methods take a key, and its length to
-store the object. Keys are currently limited to 250 characters when using either a version of memcached(1) which is 1.4 or below, or when using the text protocol.
-You must supply both a value and a length. Optionally you
-may test an expiration time for the object and a 16 byte value (it is
-meant to be used as a bitmap). "flags" is a 4byte space that is stored alongside of the main value. Many sub libraries make use of this field, so in most cases users should avoid making use of it.
-.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_prepend_by_key() and memcached_append_by_key_by_key(,
-methods both behave in a similar method as the non key
-methods. The difference is that they use their group_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. However, 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 Memcached 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.
-.SH HOME
-.sp
-To find out more information please check:
-\fI\%http://libmemcached.org/\fP
-.SH SEE ALSO
-.sp
-memcached(1) libmemached(3) memcached_strerror(3) memcached_set(3) memcached_add(3) memcached_cas(3) memcached_replace(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
deleted file mode 100644 (file)
index 88b1211..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-.TH "MEMCACHED_PREPEND_BY_KEY" "3" "May 23, 2011" "0.47" "libmemcached"
-.SH NAME
-memcached_prepend_by_key \- Appending to or Prepending to data on 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.
-.
-.sp
-Appending or Prepending to data on the server
-.SH SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.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_prepend_by_key(memcached_st *ptr, const char *group_key, size_t group_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 *group_key, size_t group_key_length, const char *key, size_t key_length, const char *value, size_t value_length, time_t expiration, uint32_t flags);
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.SH DESCRIPTION
-.sp
-memcached_prepend() and memcached_append are used to
-modify information on a server. All methods take a key, and its length to
-store the object. Keys are currently limited to 250 characters when using either a version of memcached(1) which is 1.4 or below, or when using the text protocol.
-You must supply both a value and a length. Optionally you
-may test an expiration time for the object and a 16 byte value (it is
-meant to be used as a bitmap). "flags" is a 4byte space that is stored alongside of the main value. Many sub libraries make use of this field, so in most cases users should avoid making use of it.
-.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_prepend_by_key() and memcached_append_by_key_by_key(,
-methods both behave in a similar method as the non key
-methods. The difference is that they use their group_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. However, 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 Memcached 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.
-.SH HOME
-.sp
-To find out more information please check:
-\fI\%http://libmemcached.org/\fP
-.SH SEE ALSO
-.sp
-memcached(1) libmemached(3) memcached_strerror(3) memcached_set(3) memcached_add(3) memcached_cas(3) memcached_replace(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
deleted file mode 100644 (file)
index bc0cd76..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-.TH "MEMCACHED_QUIT" "3" "May 23, 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\%http://libmemcached.org/\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
deleted file mode 100644 (file)
index d5d85af..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-.TH "MEMCACHED_REPLACE" "3" "May 23, 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.
-.
-.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_set_by_key(memcached_st *ptr, const char *group_key, size_t group_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 *group_key, size_t group_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 *group_key, size_t group_key_length, const char *key, size_t key_length, const char *value, size_t value_length, time_t expiration, uint32_t flags);
-.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 when using either a version of memcached(1) which is 1.4 or below, or when using the text protocol.
-You must supply both a value and a length. Optionally you
-may test an expiration time for the object and a 16 byte value (it is
-meant to be used as a bitmap). "flags" is a 4byte space that is stored alongside of the main value. Many sub libraries make use of this field, so in most cases users should avoid making use of it.
-.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_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(), and memcached_replace_by_key()
-methods all behave in a similar method as the non key
-methods. The difference is that they use their group_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. However, 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 Memcached 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\%http://libmemcached.org/\fP
-.SH SEE ALSO
-.sp
-memcached(1) libmemached(3) memcached_strerror(3) memcached_prepend(3) memcached_cas(3) memcached_append(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
deleted file mode 100644 (file)
index a98deb7..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-.TH "MEMCACHED_REPLACE_BY_KEY" "3" "May 23, 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.
-.
-.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_set_by_key(memcached_st *ptr, const char *group_key, size_t group_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 *group_key, size_t group_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 *group_key, size_t group_key_length, const char *key, size_t key_length, const char *value, size_t value_length, time_t expiration, uint32_t flags);
-.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 when using either a version of memcached(1) which is 1.4 or below, or when using the text protocol.
-You must supply both a value and a length. Optionally you
-may test an expiration time for the object and a 16 byte value (it is
-meant to be used as a bitmap). "flags" is a 4byte space that is stored alongside of the main value. Many sub libraries make use of this field, so in most cases users should avoid making use of it.
-.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_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(), and memcached_replace_by_key()
-methods all behave in a similar method as the non key
-methods. The difference is that they use their group_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. However, 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 Memcached 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\%http://libmemcached.org/\fP
-.SH SEE ALSO
-.sp
-memcached(1) libmemached(3) memcached_strerror(3) memcached_prepend(3) memcached_cas(3) memcached_append(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
deleted file mode 100644 (file)
index 2d2d586..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-.TH "MEMCACHED_RESULT_CAS" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libmemcached/memcached_pool.h>
-.INDENT 0.0
-.TP
-.B memcached_result_st * memcached_result_create (memcached_st *ptr, memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_result_free (memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B const char * memcached_result_key_value (memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B size_t memcached_result_key_length (const memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B const char *memcached_result_value (memcached_result_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B size_t memcached_result_length (const memcached_result_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t memcached_result_flags(const memcached_result_st\fI\ *result\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint64_t memcached_result_cas (const memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_result_set_value(memcached_result_st\fI\ *ptr\fP, const char\fI\ *value\fP, size_t\fI\ length\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_result_set_flags(memcached_result_st\fI\ *ptr\fP, uint32_t\fI\ flags\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_result_set_expiration(memcached_result_st\fI\ *ptr\fP, time_t)
-.UNINDENT
-.sp
-Compile and link with \-lmemcachedutil \-lmemcached
-.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 allocated, 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
-tests 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\%http://libmemcached.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_result_create.3 b/docs/man/memcached_result_create.3
deleted file mode 100644 (file)
index 637f254..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-.TH "MEMCACHED_RESULT_CREATE" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libmemcached/memcached_pool.h>
-.INDENT 0.0
-.TP
-.B memcached_result_st * memcached_result_create (memcached_st *ptr, memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_result_free (memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B const char * memcached_result_key_value (memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B size_t memcached_result_key_length (const memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B const char *memcached_result_value (memcached_result_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B size_t memcached_result_length (const memcached_result_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t memcached_result_flags(const memcached_result_st\fI\ *result\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint64_t memcached_result_cas (const memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_result_set_value(memcached_result_st\fI\ *ptr\fP, const char\fI\ *value\fP, size_t\fI\ length\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_result_set_flags(memcached_result_st\fI\ *ptr\fP, uint32_t\fI\ flags\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_result_set_expiration(memcached_result_st\fI\ *ptr\fP, time_t)
-.UNINDENT
-.sp
-Compile and link with \-lmemcachedutil \-lmemcached
-.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 allocated, 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
-tests 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\%http://libmemcached.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_result_flags.3 b/docs/man/memcached_result_flags.3
deleted file mode 100644 (file)
index c3cc27f..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-.TH "MEMCACHED_RESULT_FLAGS" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libmemcached/memcached_pool.h>
-.INDENT 0.0
-.TP
-.B memcached_result_st * memcached_result_create (memcached_st *ptr, memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_result_free (memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B const char * memcached_result_key_value (memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B size_t memcached_result_key_length (const memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B const char *memcached_result_value (memcached_result_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B size_t memcached_result_length (const memcached_result_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t memcached_result_flags(const memcached_result_st\fI\ *result\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint64_t memcached_result_cas (const memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_result_set_value(memcached_result_st\fI\ *ptr\fP, const char\fI\ *value\fP, size_t\fI\ length\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_result_set_flags(memcached_result_st\fI\ *ptr\fP, uint32_t\fI\ flags\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_result_set_expiration(memcached_result_st\fI\ *ptr\fP, time_t)
-.UNINDENT
-.sp
-Compile and link with \-lmemcachedutil \-lmemcached
-.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 allocated, 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
-tests 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\%http://libmemcached.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_result_free.3 b/docs/man/memcached_result_free.3
deleted file mode 100644 (file)
index 010f607..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-.TH "MEMCACHED_RESULT_FREE" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libmemcached/memcached_pool.h>
-.INDENT 0.0
-.TP
-.B memcached_result_st * memcached_result_create (memcached_st *ptr, memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_result_free (memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B const char * memcached_result_key_value (memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B size_t memcached_result_key_length (const memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B const char *memcached_result_value (memcached_result_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B size_t memcached_result_length (const memcached_result_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t memcached_result_flags(const memcached_result_st\fI\ *result\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint64_t memcached_result_cas (const memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_result_set_value(memcached_result_st\fI\ *ptr\fP, const char\fI\ *value\fP, size_t\fI\ length\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_result_set_flags(memcached_result_st\fI\ *ptr\fP, uint32_t\fI\ flags\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_result_set_expiration(memcached_result_st\fI\ *ptr\fP, time_t)
-.UNINDENT
-.sp
-Compile and link with \-lmemcachedutil \-lmemcached
-.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 allocated, 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
-tests 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\%http://libmemcached.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_result_key_length.3 b/docs/man/memcached_result_key_length.3
deleted file mode 100644 (file)
index 7539410..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-.TH "MEMCACHED_RESULT_KEY_LENGTH" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libmemcached/memcached_pool.h>
-.INDENT 0.0
-.TP
-.B memcached_result_st * memcached_result_create (memcached_st *ptr, memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_result_free (memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B const char * memcached_result_key_value (memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B size_t memcached_result_key_length (const memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B const char *memcached_result_value (memcached_result_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B size_t memcached_result_length (const memcached_result_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t memcached_result_flags(const memcached_result_st\fI\ *result\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint64_t memcached_result_cas (const memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_result_set_value(memcached_result_st\fI\ *ptr\fP, const char\fI\ *value\fP, size_t\fI\ length\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_result_set_flags(memcached_result_st\fI\ *ptr\fP, uint32_t\fI\ flags\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_result_set_expiration(memcached_result_st\fI\ *ptr\fP, time_t)
-.UNINDENT
-.sp
-Compile and link with \-lmemcachedutil \-lmemcached
-.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 allocated, 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
-tests 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\%http://libmemcached.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_result_key_value.3 b/docs/man/memcached_result_key_value.3
deleted file mode 100644 (file)
index 12551df..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-.TH "MEMCACHED_RESULT_KEY_VALUE" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libmemcached/memcached_pool.h>
-.INDENT 0.0
-.TP
-.B memcached_result_st * memcached_result_create (memcached_st *ptr, memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_result_free (memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B const char * memcached_result_key_value (memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B size_t memcached_result_key_length (const memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B const char *memcached_result_value (memcached_result_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B size_t memcached_result_length (const memcached_result_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t memcached_result_flags(const memcached_result_st\fI\ *result\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint64_t memcached_result_cas (const memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_result_set_value(memcached_result_st\fI\ *ptr\fP, const char\fI\ *value\fP, size_t\fI\ length\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_result_set_flags(memcached_result_st\fI\ *ptr\fP, uint32_t\fI\ flags\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_result_set_expiration(memcached_result_st\fI\ *ptr\fP, time_t)
-.UNINDENT
-.sp
-Compile and link with \-lmemcachedutil \-lmemcached
-.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 allocated, 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
-tests 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\%http://libmemcached.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_result_length.3 b/docs/man/memcached_result_length.3
deleted file mode 100644 (file)
index cafac90..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-.TH "MEMCACHED_RESULT_LENGTH" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libmemcached/memcached_pool.h>
-.INDENT 0.0
-.TP
-.B memcached_result_st * memcached_result_create (memcached_st *ptr, memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_result_free (memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B const char * memcached_result_key_value (memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B size_t memcached_result_key_length (const memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B const char *memcached_result_value (memcached_result_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B size_t memcached_result_length (const memcached_result_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t memcached_result_flags(const memcached_result_st\fI\ *result\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint64_t memcached_result_cas (const memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_result_set_value(memcached_result_st\fI\ *ptr\fP, const char\fI\ *value\fP, size_t\fI\ length\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_result_set_flags(memcached_result_st\fI\ *ptr\fP, uint32_t\fI\ flags\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_result_set_expiration(memcached_result_st\fI\ *ptr\fP, time_t)
-.UNINDENT
-.sp
-Compile and link with \-lmemcachedutil \-lmemcached
-.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 allocated, 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
-tests 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\%http://libmemcached.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_result_st.3 b/docs/man/memcached_result_st.3
deleted file mode 100644 (file)
index f6a554d..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-.TH "MEMCACHED_RESULT_ST" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libmemcached/memcached_pool.h>
-.INDENT 0.0
-.TP
-.B memcached_result_st * memcached_result_create (memcached_st *ptr, memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_result_free (memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B const char * memcached_result_key_value (memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B size_t memcached_result_key_length (const memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B const char *memcached_result_value (memcached_result_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B size_t memcached_result_length (const memcached_result_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t memcached_result_flags(const memcached_result_st\fI\ *result\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint64_t memcached_result_cas (const memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_result_set_value(memcached_result_st\fI\ *ptr\fP, const char\fI\ *value\fP, size_t\fI\ length\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_result_set_flags(memcached_result_st\fI\ *ptr\fP, uint32_t\fI\ flags\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_result_set_expiration(memcached_result_st\fI\ *ptr\fP, time_t)
-.UNINDENT
-.sp
-Compile and link with \-lmemcachedutil \-lmemcached
-.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 allocated, 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
-tests 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\%http://libmemcached.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_result_value.3 b/docs/man/memcached_result_value.3
deleted file mode 100644 (file)
index 5dcd58a..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-.TH "MEMCACHED_RESULT_VALUE" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libmemcached/memcached_pool.h>
-.INDENT 0.0
-.TP
-.B memcached_result_st * memcached_result_create (memcached_st *ptr, memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_result_free (memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B const char * memcached_result_key_value (memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B size_t memcached_result_key_length (const memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B const char *memcached_result_value (memcached_result_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B size_t memcached_result_length (const memcached_result_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t memcached_result_flags(const memcached_result_st\fI\ *result\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint64_t memcached_result_cas (const memcached_result_st *result);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_result_set_value(memcached_result_st\fI\ *ptr\fP, const char\fI\ *value\fP, size_t\fI\ length\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_result_set_flags(memcached_result_st\fI\ *ptr\fP, uint32_t\fI\ flags\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_result_set_expiration(memcached_result_st\fI\ *ptr\fP, time_t)
-.UNINDENT
-.sp
-Compile and link with \-lmemcachedutil \-lmemcached
-.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 allocated, 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
-tests 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\%http://libmemcached.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_sasl.3 b/docs/man/memcached_sasl.3
deleted file mode 100644 (file)
index d969b9d..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-.TH "MEMCACHED_SASL" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libmemcached/memcached_pool.h>
-.INDENT 0.0
-.TP
-.B void memcached_set_sasl_callbacks(memcached_st\fI\ *ptr\fP, const sasl_callback_t\fI\ *callbacks\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st\fI\ *ptr\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return memcached_set_sasl_auth_data(memcached_st\fI\ *ptr\fP, const char\fI\ *username\fP, const char\fI\ *password\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return memcached_destroy_sasl_auth_data(memcached_st\fI\ *ptr\fP)
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.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 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
deleted file mode 100644 (file)
index 024eb07..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-.TH "MEMCACHED_SASL_SET_AUTH_DATA" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libmemcached/memcached_pool.h>
-.INDENT 0.0
-.TP
-.B void memcached_set_sasl_callbacks(memcached_st\fI\ *ptr\fP, const sasl_callback_t\fI\ *callbacks\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st\fI\ *ptr\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return memcached_set_sasl_auth_data(memcached_st\fI\ *ptr\fP, const char\fI\ *username\fP, const char\fI\ *password\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return memcached_destroy_sasl_auth_data(memcached_st\fI\ *ptr\fP)
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.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 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
deleted file mode 100644 (file)
index 63cdeee..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-.TH "MEMCACHED_SERVER_ADD" "3" "May 23, 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.
-.
-.SH SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B uint32_t memcached_server_count (memcached_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_add (memcached_st *ptr, const char *hostname, in_port_t port);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_add_udp (memcached_st *ptr, const char *hostname, in_port_t port);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_add_unix_socket (memcached_st *ptr, const char *socket);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_push (memcached_st *ptr, const memcached_server_st *list);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_server_instance_st memcached_server_by_key (const memcached_st *ptr, const char *key, size_t key_length, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_server_instance_st memcached_server_get_last_disconnect(const memcached_st\fI\ *ptr\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_cursor(const memcached_st *ptr, const memcached_server_fn *callback, void *context, uint32_t number_of_callbacks);
-.UNINDENT
-.sp
-compile and link with \-lmemcached
-.SH DESCRIPTION
-.sp
-libmemcached(3) performs operations on a list of hosts. The order of these
-hosts determine routing to keys. Functions are provided to add keys to
-memcached_st structures. To manipulate lists of servers see
-memcached_server_st(3).
-.sp
-memcached_server_count() provides you a count of the current number of
-servers being used by a \fBmemcached_st\fP structure.
-.sp
-memcached_server_add() pushes a single TCP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
-allowed, so duplication is not checked. Executing this function with the
-\fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set will result in a
-\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
-.sp
-memcached_server_add_udp() pushes a single UDP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
-allowed, so duplication is not checked. Executing this function with out
-setting the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior will result in a
-\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
-.sp
-memcached_server_add_unix_socket() pushes a single UNIX socket into the
-\fBmemcached_st\fP structure. This UNIX socket will be placed at the end.
-Duplicate servers are allowed, so duplication is not checked. The length
-of the filename must be one character less then MEMCACHED_MAX_HOST_LENGTH.
-.sp
-memcached_server_push() pushes an array of \fBmemcached_server_st\fP into
-the \fBmemcached_st\fP structure. These servers will be placed at the
-end. Duplicate servers are allowed, so duplication is not checked. A
-copy is made of structure so the list provided (and any operations on
-the list) are not saved.
-.sp
-memcached_server_by_key() allows you to provide a key and retrieve the
-server which would be used for assignment. This structure is cloned
-from its original structure and must be freed. If NULL is returned you
-should consult *error. The returning structure should be freed with
-memcached_server_free().
-.sp
-memcached_server_get_last_disconnect() returns a pointer to the last server
-for which there was a connection problem. It does not mean this particular
-server is currently dead but if the library is reporting a server is,
-the returned server is a very good candidate.
-.sp
-memcached_server_cursor() takes a memcached_st and loops through the
-list of hosts currently in the cursor calling the list of callback
-functions provided. You can optionally pass in a value via
-context which will be provided to each callback function. An error
-return from any callback will terminate the loop. memcached_server_cursor()
-is passed the original caller memcached_st in its current state.
-.SH RETURN
-.sp
-Varies, see particular functions.
-.SH HOME
-.sp
-To find out more information please check:
-\fI\%http://libmemcached.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_server_add_unix_socket.3 b/docs/man/memcached_server_add_unix_socket.3
deleted file mode 100644 (file)
index c6976d7..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-.TH "MEMCACHED_SERVER_ADD_UNIX_SOCKET" "3" "May 23, 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.
-.
-.SH SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B uint32_t memcached_server_count (memcached_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_add (memcached_st *ptr, const char *hostname, in_port_t port);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_add_udp (memcached_st *ptr, const char *hostname, in_port_t port);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_add_unix_socket (memcached_st *ptr, const char *socket);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_push (memcached_st *ptr, const memcached_server_st *list);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_server_instance_st memcached_server_by_key (const memcached_st *ptr, const char *key, size_t key_length, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_server_instance_st memcached_server_get_last_disconnect(const memcached_st\fI\ *ptr\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_cursor(const memcached_st *ptr, const memcached_server_fn *callback, void *context, uint32_t number_of_callbacks);
-.UNINDENT
-.sp
-compile and link with \-lmemcached
-.SH DESCRIPTION
-.sp
-libmemcached(3) performs operations on a list of hosts. The order of these
-hosts determine routing to keys. Functions are provided to add keys to
-memcached_st structures. To manipulate lists of servers see
-memcached_server_st(3).
-.sp
-memcached_server_count() provides you a count of the current number of
-servers being used by a \fBmemcached_st\fP structure.
-.sp
-memcached_server_add() pushes a single TCP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
-allowed, so duplication is not checked. Executing this function with the
-\fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set will result in a
-\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
-.sp
-memcached_server_add_udp() pushes a single UDP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
-allowed, so duplication is not checked. Executing this function with out
-setting the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior will result in a
-\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
-.sp
-memcached_server_add_unix_socket() pushes a single UNIX socket into the
-\fBmemcached_st\fP structure. This UNIX socket will be placed at the end.
-Duplicate servers are allowed, so duplication is not checked. The length
-of the filename must be one character less then MEMCACHED_MAX_HOST_LENGTH.
-.sp
-memcached_server_push() pushes an array of \fBmemcached_server_st\fP into
-the \fBmemcached_st\fP structure. These servers will be placed at the
-end. Duplicate servers are allowed, so duplication is not checked. A
-copy is made of structure so the list provided (and any operations on
-the list) are not saved.
-.sp
-memcached_server_by_key() allows you to provide a key and retrieve the
-server which would be used for assignment. This structure is cloned
-from its original structure and must be freed. If NULL is returned you
-should consult *error. The returning structure should be freed with
-memcached_server_free().
-.sp
-memcached_server_get_last_disconnect() returns a pointer to the last server
-for which there was a connection problem. It does not mean this particular
-server is currently dead but if the library is reporting a server is,
-the returned server is a very good candidate.
-.sp
-memcached_server_cursor() takes a memcached_st and loops through the
-list of hosts currently in the cursor calling the list of callback
-functions provided. You can optionally pass in a value via
-context which will be provided to each callback function. An error
-return from any callback will terminate the loop. memcached_server_cursor()
-is passed the original caller memcached_st in its current state.
-.SH RETURN
-.sp
-Varies, see particular functions.
-.SH HOME
-.sp
-To find out more information please check:
-\fI\%http://libmemcached.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_server_count.3 b/docs/man/memcached_server_count.3
deleted file mode 100644 (file)
index c2c42c7..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-.TH "MEMCACHED_SERVER_COUNT" "3" "May 23, 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.
-.
-.SH SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B uint32_t memcached_server_count (memcached_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_add (memcached_st *ptr, const char *hostname, in_port_t port);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_add_udp (memcached_st *ptr, const char *hostname, in_port_t port);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_add_unix_socket (memcached_st *ptr, const char *socket);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_push (memcached_st *ptr, const memcached_server_st *list);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_server_instance_st memcached_server_by_key (const memcached_st *ptr, const char *key, size_t key_length, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_server_instance_st memcached_server_get_last_disconnect(const memcached_st\fI\ *ptr\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_cursor(const memcached_st *ptr, const memcached_server_fn *callback, void *context, uint32_t number_of_callbacks);
-.UNINDENT
-.sp
-compile and link with \-lmemcached
-.SH DESCRIPTION
-.sp
-libmemcached(3) performs operations on a list of hosts. The order of these
-hosts determine routing to keys. Functions are provided to add keys to
-memcached_st structures. To manipulate lists of servers see
-memcached_server_st(3).
-.sp
-memcached_server_count() provides you a count of the current number of
-servers being used by a \fBmemcached_st\fP structure.
-.sp
-memcached_server_add() pushes a single TCP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
-allowed, so duplication is not checked. Executing this function with the
-\fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set will result in a
-\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
-.sp
-memcached_server_add_udp() pushes a single UDP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
-allowed, so duplication is not checked. Executing this function with out
-setting the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior will result in a
-\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
-.sp
-memcached_server_add_unix_socket() pushes a single UNIX socket into the
-\fBmemcached_st\fP structure. This UNIX socket will be placed at the end.
-Duplicate servers are allowed, so duplication is not checked. The length
-of the filename must be one character less then MEMCACHED_MAX_HOST_LENGTH.
-.sp
-memcached_server_push() pushes an array of \fBmemcached_server_st\fP into
-the \fBmemcached_st\fP structure. These servers will be placed at the
-end. Duplicate servers are allowed, so duplication is not checked. A
-copy is made of structure so the list provided (and any operations on
-the list) are not saved.
-.sp
-memcached_server_by_key() allows you to provide a key and retrieve the
-server which would be used for assignment. This structure is cloned
-from its original structure and must be freed. If NULL is returned you
-should consult *error. The returning structure should be freed with
-memcached_server_free().
-.sp
-memcached_server_get_last_disconnect() returns a pointer to the last server
-for which there was a connection problem. It does not mean this particular
-server is currently dead but if the library is reporting a server is,
-the returned server is a very good candidate.
-.sp
-memcached_server_cursor() takes a memcached_st and loops through the
-list of hosts currently in the cursor calling the list of callback
-functions provided. You can optionally pass in a value via
-context which will be provided to each callback function. An error
-return from any callback will terminate the loop. memcached_server_cursor()
-is passed the original caller memcached_st in its current state.
-.SH RETURN
-.sp
-Varies, see particular functions.
-.SH HOME
-.sp
-To find out more information please check:
-\fI\%http://libmemcached.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_server_cursor.3 b/docs/man/memcached_server_cursor.3
deleted file mode 100644 (file)
index 773ea94..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-.TH "MEMCACHED_SERVER_CURSOR" "3" "May 23, 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.
-.
-.SH SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B uint32_t memcached_server_count (memcached_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_add (memcached_st *ptr, const char *hostname, in_port_t port);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_add_udp (memcached_st *ptr, const char *hostname, in_port_t port);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_add_unix_socket (memcached_st *ptr, const char *socket);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_push (memcached_st *ptr, const memcached_server_st *list);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_server_instance_st memcached_server_by_key (const memcached_st *ptr, const char *key, size_t key_length, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_server_instance_st memcached_server_get_last_disconnect(const memcached_st\fI\ *ptr\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_cursor(const memcached_st *ptr, const memcached_server_fn *callback, void *context, uint32_t number_of_callbacks);
-.UNINDENT
-.sp
-compile and link with \-lmemcached
-.SH DESCRIPTION
-.sp
-libmemcached(3) performs operations on a list of hosts. The order of these
-hosts determine routing to keys. Functions are provided to add keys to
-memcached_st structures. To manipulate lists of servers see
-memcached_server_st(3).
-.sp
-memcached_server_count() provides you a count of the current number of
-servers being used by a \fBmemcached_st\fP structure.
-.sp
-memcached_server_add() pushes a single TCP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
-allowed, so duplication is not checked. Executing this function with the
-\fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set will result in a
-\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
-.sp
-memcached_server_add_udp() pushes a single UDP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
-allowed, so duplication is not checked. Executing this function with out
-setting the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior will result in a
-\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
-.sp
-memcached_server_add_unix_socket() pushes a single UNIX socket into the
-\fBmemcached_st\fP structure. This UNIX socket will be placed at the end.
-Duplicate servers are allowed, so duplication is not checked. The length
-of the filename must be one character less then MEMCACHED_MAX_HOST_LENGTH.
-.sp
-memcached_server_push() pushes an array of \fBmemcached_server_st\fP into
-the \fBmemcached_st\fP structure. These servers will be placed at the
-end. Duplicate servers are allowed, so duplication is not checked. A
-copy is made of structure so the list provided (and any operations on
-the list) are not saved.
-.sp
-memcached_server_by_key() allows you to provide a key and retrieve the
-server which would be used for assignment. This structure is cloned
-from its original structure and must be freed. If NULL is returned you
-should consult *error. The returning structure should be freed with
-memcached_server_free().
-.sp
-memcached_server_get_last_disconnect() returns a pointer to the last server
-for which there was a connection problem. It does not mean this particular
-server is currently dead but if the library is reporting a server is,
-the returned server is a very good candidate.
-.sp
-memcached_server_cursor() takes a memcached_st and loops through the
-list of hosts currently in the cursor calling the list of callback
-functions provided. You can optionally pass in a value via
-context which will be provided to each callback function. An error
-return from any callback will terminate the loop. memcached_server_cursor()
-is passed the original caller memcached_st in its current state.
-.SH RETURN
-.sp
-Varies, see particular functions.
-.SH HOME
-.sp
-To find out more information please check:
-\fI\%http://libmemcached.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_server_list.3 b/docs/man/memcached_server_list.3
deleted file mode 100644 (file)
index 3666223..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-.TH "MEMCACHED_SERVER_LIST" "3" "May 23, 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.
-.
-.SH SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B uint32_t memcached_server_count (memcached_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_add (memcached_st *ptr, const char *hostname, in_port_t port);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_add_udp (memcached_st *ptr, const char *hostname, in_port_t port);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_add_unix_socket (memcached_st *ptr, const char *socket);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_push (memcached_st *ptr, const memcached_server_st *list);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_server_instance_st memcached_server_by_key (const memcached_st *ptr, const char *key, size_t key_length, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_server_instance_st memcached_server_get_last_disconnect(const memcached_st\fI\ *ptr\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_cursor(const memcached_st *ptr, const memcached_server_fn *callback, void *context, uint32_t number_of_callbacks);
-.UNINDENT
-.sp
-compile and link with \-lmemcached
-.SH DESCRIPTION
-.sp
-libmemcached(3) performs operations on a list of hosts. The order of these
-hosts determine routing to keys. Functions are provided to add keys to
-memcached_st structures. To manipulate lists of servers see
-memcached_server_st(3).
-.sp
-memcached_server_count() provides you a count of the current number of
-servers being used by a \fBmemcached_st\fP structure.
-.sp
-memcached_server_add() pushes a single TCP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
-allowed, so duplication is not checked. Executing this function with the
-\fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set will result in a
-\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
-.sp
-memcached_server_add_udp() pushes a single UDP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
-allowed, so duplication is not checked. Executing this function with out
-setting the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior will result in a
-\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
-.sp
-memcached_server_add_unix_socket() pushes a single UNIX socket into the
-\fBmemcached_st\fP structure. This UNIX socket will be placed at the end.
-Duplicate servers are allowed, so duplication is not checked. The length
-of the filename must be one character less then MEMCACHED_MAX_HOST_LENGTH.
-.sp
-memcached_server_push() pushes an array of \fBmemcached_server_st\fP into
-the \fBmemcached_st\fP structure. These servers will be placed at the
-end. Duplicate servers are allowed, so duplication is not checked. A
-copy is made of structure so the list provided (and any operations on
-the list) are not saved.
-.sp
-memcached_server_by_key() allows you to provide a key and retrieve the
-server which would be used for assignment. This structure is cloned
-from its original structure and must be freed. If NULL is returned you
-should consult *error. The returning structure should be freed with
-memcached_server_free().
-.sp
-memcached_server_get_last_disconnect() returns a pointer to the last server
-for which there was a connection problem. It does not mean this particular
-server is currently dead but if the library is reporting a server is,
-the returned server is a very good candidate.
-.sp
-memcached_server_cursor() takes a memcached_st and loops through the
-list of hosts currently in the cursor calling the list of callback
-functions provided. You can optionally pass in a value via
-context which will be provided to each callback function. An error
-return from any callback will terminate the loop. memcached_server_cursor()
-is passed the original caller memcached_st in its current state.
-.SH RETURN
-.sp
-Varies, see particular functions.
-.SH HOME
-.sp
-To find out more information please check:
-\fI\%http://libmemcached.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_server_list_append.3 b/docs/man/memcached_server_list_append.3
deleted file mode 100644 (file)
index c2a0c13..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-.TH "MEMCACHED_SERVER_LIST_APPEND" "3" "May 23, 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.
-.
-.SH SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B const memcached_server_instance_st memcached_server_list (memcached_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_server_list_free (memcached_server_list_st list);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_server_list_st memcached_server_list_append (memcached_server_list_st list, const char *hostname, unsigned int port, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t memcached_server_list_count (memcached_server_list_st list);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B const char *memcached_server_error (memcached_server_instance_st instance);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_server_error_reset (memcached_server_instance_st list); DEPRECATED
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.SH DESCRIPTION
-.sp
-libmemcached(3) operates on a list of hosts which are stored in
-memcached_server_st structures. You should not modify these structures
-directly. Functions are provided to modify these structures (and more can be
-added, just ask!).
-.sp
-memcached_server_list() is used to provide an array of all defined hosts.
-This was incorrectly documented as "requiring free()" up till version 0.39.
-.sp
-memcached_server_list_free() deallocates all memory associated with the array
-of memcached_server_st that you passed to it.
-.sp
-memcached_server_list_append() adds a server to the end of a
-memcached_server_st array. On error null will be returned and the
-memcached_return_t pointer you passed into the function will be set with the
-appropriate error. If the value of port is zero, it is set to the default
-port of a memcached server.
-.sp
-DEPRECATED memcached_servers_parse(), please see \fImemcached(3)\fP
-.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\%http://libmemcached.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_server_list_count.3 b/docs/man/memcached_server_list_count.3
deleted file mode 100644 (file)
index f67b1a0..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-.TH "MEMCACHED_SERVER_LIST_COUNT" "3" "May 23, 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.
-.
-.SH SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B const memcached_server_instance_st memcached_server_list (memcached_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_server_list_free (memcached_server_list_st list);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_server_list_st memcached_server_list_append (memcached_server_list_st list, const char *hostname, unsigned int port, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t memcached_server_list_count (memcached_server_list_st list);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B const char *memcached_server_error (memcached_server_instance_st instance);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_server_error_reset (memcached_server_instance_st list); DEPRECATED
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.SH DESCRIPTION
-.sp
-libmemcached(3) operates on a list of hosts which are stored in
-memcached_server_st structures. You should not modify these structures
-directly. Functions are provided to modify these structures (and more can be
-added, just ask!).
-.sp
-memcached_server_list() is used to provide an array of all defined hosts.
-This was incorrectly documented as "requiring free()" up till version 0.39.
-.sp
-memcached_server_list_free() deallocates all memory associated with the array
-of memcached_server_st that you passed to it.
-.sp
-memcached_server_list_append() adds a server to the end of a
-memcached_server_st array. On error null will be returned and the
-memcached_return_t pointer you passed into the function will be set with the
-appropriate error. If the value of port is zero, it is set to the default
-port of a memcached server.
-.sp
-DEPRECATED memcached_servers_parse(), please see \fImemcached(3)\fP
-.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\%http://libmemcached.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_server_list_free.3 b/docs/man/memcached_server_list_free.3
deleted file mode 100644 (file)
index fdbd78b..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-.TH "MEMCACHED_SERVER_LIST_FREE" "3" "May 23, 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.
-.
-.SH SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B const memcached_server_instance_st memcached_server_list (memcached_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_server_list_free (memcached_server_list_st list);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_server_list_st memcached_server_list_append (memcached_server_list_st list, const char *hostname, unsigned int port, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t memcached_server_list_count (memcached_server_list_st list);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B const char *memcached_server_error (memcached_server_instance_st instance);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_server_error_reset (memcached_server_instance_st list); DEPRECATED
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.SH DESCRIPTION
-.sp
-libmemcached(3) operates on a list of hosts which are stored in
-memcached_server_st structures. You should not modify these structures
-directly. Functions are provided to modify these structures (and more can be
-added, just ask!).
-.sp
-memcached_server_list() is used to provide an array of all defined hosts.
-This was incorrectly documented as "requiring free()" up till version 0.39.
-.sp
-memcached_server_list_free() deallocates all memory associated with the array
-of memcached_server_st that you passed to it.
-.sp
-memcached_server_list_append() adds a server to the end of a
-memcached_server_st array. On error null will be returned and the
-memcached_return_t pointer you passed into the function will be set with the
-appropriate error. If the value of port is zero, it is set to the default
-port of a memcached server.
-.sp
-DEPRECATED memcached_servers_parse(), please see \fImemcached(3)\fP
-.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\%http://libmemcached.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_server_push.3 b/docs/man/memcached_server_push.3
deleted file mode 100644 (file)
index 9c66815..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-.TH "MEMCACHED_SERVER_PUSH" "3" "May 23, 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.
-.
-.SH SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B uint32_t memcached_server_count (memcached_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_add (memcached_st *ptr, const char *hostname, in_port_t port);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_add_udp (memcached_st *ptr, const char *hostname, in_port_t port);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_add_unix_socket (memcached_st *ptr, const char *socket);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_push (memcached_st *ptr, const memcached_server_st *list);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_server_instance_st memcached_server_by_key (const memcached_st *ptr, const char *key, size_t key_length, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_server_instance_st memcached_server_get_last_disconnect(const memcached_st\fI\ *ptr\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_cursor(const memcached_st *ptr, const memcached_server_fn *callback, void *context, uint32_t number_of_callbacks);
-.UNINDENT
-.sp
-compile and link with \-lmemcached
-.SH DESCRIPTION
-.sp
-libmemcached(3) performs operations on a list of hosts. The order of these
-hosts determine routing to keys. Functions are provided to add keys to
-memcached_st structures. To manipulate lists of servers see
-memcached_server_st(3).
-.sp
-memcached_server_count() provides you a count of the current number of
-servers being used by a \fBmemcached_st\fP structure.
-.sp
-memcached_server_add() pushes a single TCP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
-allowed, so duplication is not checked. Executing this function with the
-\fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set will result in a
-\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
-.sp
-memcached_server_add_udp() pushes a single UDP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
-allowed, so duplication is not checked. Executing this function with out
-setting the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior will result in a
-\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
-.sp
-memcached_server_add_unix_socket() pushes a single UNIX socket into the
-\fBmemcached_st\fP structure. This UNIX socket will be placed at the end.
-Duplicate servers are allowed, so duplication is not checked. The length
-of the filename must be one character less then MEMCACHED_MAX_HOST_LENGTH.
-.sp
-memcached_server_push() pushes an array of \fBmemcached_server_st\fP into
-the \fBmemcached_st\fP structure. These servers will be placed at the
-end. Duplicate servers are allowed, so duplication is not checked. A
-copy is made of structure so the list provided (and any operations on
-the list) are not saved.
-.sp
-memcached_server_by_key() allows you to provide a key and retrieve the
-server which would be used for assignment. This structure is cloned
-from its original structure and must be freed. If NULL is returned you
-should consult *error. The returning structure should be freed with
-memcached_server_free().
-.sp
-memcached_server_get_last_disconnect() returns a pointer to the last server
-for which there was a connection problem. It does not mean this particular
-server is currently dead but if the library is reporting a server is,
-the returned server is a very good candidate.
-.sp
-memcached_server_cursor() takes a memcached_st and loops through the
-list of hosts currently in the cursor calling the list of callback
-functions provided. You can optionally pass in a value via
-context which will be provided to each callback function. An error
-return from any callback will terminate the loop. memcached_server_cursor()
-is passed the original caller memcached_st in its current state.
-.SH RETURN
-.sp
-Varies, see particular functions.
-.SH HOME
-.sp
-To find out more information please check:
-\fI\%http://libmemcached.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_server_st.3 b/docs/man/memcached_server_st.3
deleted file mode 100644 (file)
index 4a4ee67..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-.TH "MEMCACHED_SERVER_ST" "3" "May 23, 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.
-.
-.SH SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B uint32_t memcached_server_count (memcached_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_add (memcached_st *ptr, const char *hostname, in_port_t port);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_add_udp (memcached_st *ptr, const char *hostname, in_port_t port);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_add_unix_socket (memcached_st *ptr, const char *socket);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_push (memcached_st *ptr, const memcached_server_st *list);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_server_instance_st memcached_server_by_key (const memcached_st *ptr, const char *key, size_t key_length, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_server_instance_st memcached_server_get_last_disconnect(const memcached_st\fI\ *ptr\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_cursor(const memcached_st *ptr, const memcached_server_fn *callback, void *context, uint32_t number_of_callbacks);
-.UNINDENT
-.sp
-compile and link with \-lmemcached
-.SH DESCRIPTION
-.sp
-libmemcached(3) performs operations on a list of hosts. The order of these
-hosts determine routing to keys. Functions are provided to add keys to
-memcached_st structures. To manipulate lists of servers see
-memcached_server_st(3).
-.sp
-memcached_server_count() provides you a count of the current number of
-servers being used by a \fBmemcached_st\fP structure.
-.sp
-memcached_server_add() pushes a single TCP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
-allowed, so duplication is not checked. Executing this function with the
-\fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set will result in a
-\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
-.sp
-memcached_server_add_udp() pushes a single UDP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
-allowed, so duplication is not checked. Executing this function with out
-setting the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior will result in a
-\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
-.sp
-memcached_server_add_unix_socket() pushes a single UNIX socket into the
-\fBmemcached_st\fP structure. This UNIX socket will be placed at the end.
-Duplicate servers are allowed, so duplication is not checked. The length
-of the filename must be one character less then MEMCACHED_MAX_HOST_LENGTH.
-.sp
-memcached_server_push() pushes an array of \fBmemcached_server_st\fP into
-the \fBmemcached_st\fP structure. These servers will be placed at the
-end. Duplicate servers are allowed, so duplication is not checked. A
-copy is made of structure so the list provided (and any operations on
-the list) are not saved.
-.sp
-memcached_server_by_key() allows you to provide a key and retrieve the
-server which would be used for assignment. This structure is cloned
-from its original structure and must be freed. If NULL is returned you
-should consult *error. The returning structure should be freed with
-memcached_server_free().
-.sp
-memcached_server_get_last_disconnect() returns a pointer to the last server
-for which there was a connection problem. It does not mean this particular
-server is currently dead but if the library is reporting a server is,
-the returned server is a very good candidate.
-.sp
-memcached_server_cursor() takes a memcached_st and loops through the
-list of hosts currently in the cursor calling the list of callback
-functions provided. You can optionally pass in a value via
-context which will be provided to each callback function. An error
-return from any callback will terminate the loop. memcached_server_cursor()
-is passed the original caller memcached_st in its current state.
-.SH RETURN
-.sp
-Varies, see particular functions.
-.SH HOME
-.sp
-To find out more information please check:
-\fI\%http://libmemcached.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_servers.3 b/docs/man/memcached_servers.3
deleted file mode 100644 (file)
index b73e4bf..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-.TH "MEMCACHED_SERVERS" "3" "May 23, 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.
-.
-.SH SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B uint32_t memcached_server_count (memcached_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_add (memcached_st *ptr, const char *hostname, in_port_t port);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_add_udp (memcached_st *ptr, const char *hostname, in_port_t port);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_add_unix_socket (memcached_st *ptr, const char *socket);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_push (memcached_st *ptr, const memcached_server_st *list);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_server_instance_st memcached_server_by_key (const memcached_st *ptr, const char *key, size_t key_length, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_server_instance_st memcached_server_get_last_disconnect(const memcached_st\fI\ *ptr\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_server_cursor(const memcached_st *ptr, const memcached_server_fn *callback, void *context, uint32_t number_of_callbacks);
-.UNINDENT
-.sp
-compile and link with \-lmemcached
-.SH DESCRIPTION
-.sp
-libmemcached(3) performs operations on a list of hosts. The order of these
-hosts determine routing to keys. Functions are provided to add keys to
-memcached_st structures. To manipulate lists of servers see
-memcached_server_st(3).
-.sp
-memcached_server_count() provides you a count of the current number of
-servers being used by a \fBmemcached_st\fP structure.
-.sp
-memcached_server_add() pushes a single TCP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
-allowed, so duplication is not checked. Executing this function with the
-\fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set will result in a
-\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
-.sp
-memcached_server_add_udp() pushes a single UDP server into the \fBmemcached_st\fPstructure. This server will be placed at the end. Duplicate servers are
-allowed, so duplication is not checked. Executing this function with out
-setting the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior will result in a
-\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP.
-.sp
-memcached_server_add_unix_socket() pushes a single UNIX socket into the
-\fBmemcached_st\fP structure. This UNIX socket will be placed at the end.
-Duplicate servers are allowed, so duplication is not checked. The length
-of the filename must be one character less then MEMCACHED_MAX_HOST_LENGTH.
-.sp
-memcached_server_push() pushes an array of \fBmemcached_server_st\fP into
-the \fBmemcached_st\fP structure. These servers will be placed at the
-end. Duplicate servers are allowed, so duplication is not checked. A
-copy is made of structure so the list provided (and any operations on
-the list) are not saved.
-.sp
-memcached_server_by_key() allows you to provide a key and retrieve the
-server which would be used for assignment. This structure is cloned
-from its original structure and must be freed. If NULL is returned you
-should consult *error. The returning structure should be freed with
-memcached_server_free().
-.sp
-memcached_server_get_last_disconnect() returns a pointer to the last server
-for which there was a connection problem. It does not mean this particular
-server is currently dead but if the library is reporting a server is,
-the returned server is a very good candidate.
-.sp
-memcached_server_cursor() takes a memcached_st and loops through the
-list of hosts currently in the cursor calling the list of callback
-functions provided. You can optionally pass in a value via
-context which will be provided to each callback function. An error
-return from any callback will terminate the loop. memcached_server_cursor()
-is passed the original caller memcached_st in its current state.
-.SH RETURN
-.sp
-Varies, see particular functions.
-.SH HOME
-.sp
-To find out more information please check:
-\fI\%http://libmemcached.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_servers_parse.3 b/docs/man/memcached_servers_parse.3
deleted file mode 100644 (file)
index f9d90c7..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-.TH "MEMCACHED_SERVERS_PARSE" "3" "May 23, 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.
-.
-.SH SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B const memcached_server_instance_st memcached_server_list (memcached_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_server_list_free (memcached_server_list_st list);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_server_list_st memcached_server_list_append (memcached_server_list_st list, const char *hostname, unsigned int port, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B uint32_t memcached_server_list_count (memcached_server_list_st list);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B const char *memcached_server_error (memcached_server_instance_st instance);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void memcached_server_error_reset (memcached_server_instance_st list); DEPRECATED
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.SH DESCRIPTION
-.sp
-libmemcached(3) operates on a list of hosts which are stored in
-memcached_server_st structures. You should not modify these structures
-directly. Functions are provided to modify these structures (and more can be
-added, just ask!).
-.sp
-memcached_server_list() is used to provide an array of all defined hosts.
-This was incorrectly documented as "requiring free()" up till version 0.39.
-.sp
-memcached_server_list_free() deallocates all memory associated with the array
-of memcached_server_st that you passed to it.
-.sp
-memcached_server_list_append() adds a server to the end of a
-memcached_server_st array. On error null will be returned and the
-memcached_return_t pointer you passed into the function will be set with the
-appropriate error. If the value of port is zero, it is set to the default
-port of a memcached server.
-.sp
-DEPRECATED memcached_servers_parse(), please see \fImemcached(3)\fP
-.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\%http://libmemcached.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_servers_reset.3 b/docs/man/memcached_servers_reset.3
deleted file mode 100644 (file)
index 8b7f487..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-.TH "MEMCACHED_SERVERS_RESET" "3" "May 23, 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.
-.
-.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\%http://libmemcached.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_set.3 b/docs/man/memcached_set.3
deleted file mode 100644 (file)
index 9a1666c..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-.TH "MEMCACHED_SET" "3" "May 23, 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.
-.
-.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_set_by_key(memcached_st *ptr, const char *group_key, size_t group_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 *group_key, size_t group_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 *group_key, size_t group_key_length, const char *key, size_t key_length, const char *value, size_t value_length, time_t expiration, uint32_t flags);
-.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 when using either a version of memcached(1) which is 1.4 or below, or when using the text protocol.
-You must supply both a value and a length. Optionally you
-may test an expiration time for the object and a 16 byte value (it is
-meant to be used as a bitmap). "flags" is a 4byte space that is stored alongside of the main value. Many sub libraries make use of this field, so in most cases users should avoid making use of it.
-.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_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(), and memcached_replace_by_key()
-methods all behave in a similar method as the non key
-methods. The difference is that they use their group_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. However, 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 Memcached 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\%http://libmemcached.org/\fP
-.SH SEE ALSO
-.sp
-memcached(1) libmemached(3) memcached_strerror(3) memcached_prepend(3) memcached_cas(3) memcached_append(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
deleted file mode 100644 (file)
index 26dfd44..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-.TH "MEMCACHED_SET_BY_KEY" "3" "May 23, 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.
-.
-.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_set_by_key(memcached_st *ptr, const char *group_key, size_t group_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 *group_key, size_t group_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 *group_key, size_t group_key_length, const char *key, size_t key_length, const char *value, size_t value_length, time_t expiration, uint32_t flags);
-.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 when using either a version of memcached(1) which is 1.4 or below, or when using the text protocol.
-You must supply both a value and a length. Optionally you
-may test an expiration time for the object and a 16 byte value (it is
-meant to be used as a bitmap). "flags" is a 4byte space that is stored alongside of the main value. Many sub libraries make use of this field, so in most cases users should avoid making use of it.
-.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_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(), and memcached_replace_by_key()
-methods all behave in a similar method as the non key
-methods. The difference is that they use their group_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. However, 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 Memcached 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\%http://libmemcached.org/\fP
-.SH SEE ALSO
-.sp
-memcached(1) libmemached(3) memcached_strerror(3) memcached_prepend(3) memcached_cas(3) memcached_append(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
deleted file mode 100644 (file)
index 92a0967..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-.TH "MEMCACHED_SET_MEMORY_ALLOCATORS" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B 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);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B 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);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void * memcached_get_memory_allocators_context(const memcached_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void * (*memcached_malloc_fn) (memcached_st *ptr, const size_t size, void *context);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void * (*memcached_realloc_fn) (memcached_st *ptr, void *mem, const size_t size, void *context);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void (*memcached_free_fn) (memcached_st *ptr, void *mem, void *context);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void * (*memcached_calloc_fn) (memcached_st *ptr, size_t nelem, const size_t elsize, void *context);
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.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\%http://libmemcached.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_set_memory_allocators_context.3 b/docs/man/memcached_set_memory_allocators_context.3
deleted file mode 100644 (file)
index 7208433..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-.TH "MEMCACHED_SET_MEMORY_ALLOCATORS_CONTEXT" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B 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);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B 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);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void * memcached_get_memory_allocators_context(const memcached_st *ptr);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void * (*memcached_malloc_fn) (memcached_st *ptr, const size_t size, void *context);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void * (*memcached_realloc_fn) (memcached_st *ptr, void *mem, const size_t size, void *context);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void (*memcached_free_fn) (memcached_st *ptr, void *mem, void *context);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B void * (*memcached_calloc_fn) (memcached_st *ptr, size_t nelem, const size_t elsize, void *context);
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.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\%http://libmemcached.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_set_sasl_callbacks.3 b/docs/man/memcached_set_sasl_callbacks.3
deleted file mode 100644 (file)
index 42f83e1..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-.TH "MEMCACHED_SET_SASL_CALLBACKS" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libmemcached/memcached_pool.h>
-.INDENT 0.0
-.TP
-.B void memcached_set_sasl_callbacks(memcached_st\fI\ *ptr\fP, const sasl_callback_t\fI\ *callbacks\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st\fI\ *ptr\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return memcached_set_sasl_auth_data(memcached_st\fI\ *ptr\fP, const char\fI\ *username\fP, const char\fI\ *password\fP)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return memcached_destroy_sasl_auth_data(memcached_st\fI\ *ptr\fP)
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.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 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
deleted file mode 100644 (file)
index 833e006..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-.TH "MEMCACHED_SET_USER_DATA" "3" "May 23, 2011" "0.47" "libmemcached"
-.SH NAME
-memcached_set_user_data \- libmemcached Documentation
-.
-.nr rst2man-indent-level 0
-.
-.de1 rstReportMargin
-\\$1 \\n[an-margin]
-level \\n[rst2man-indent-level]
-level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
--
-\\n[rst2man-indent0]
-\\n[rst2man-indent1]
-\\n[rst2man-indent2]
-..
-.de1 INDENT
-.\" .rstReportMargin pre:
-. RS \\$1
-. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
-. nr rst2man-indent-level +1
-.\" .rstReportMargin post:
-..
-.de UNINDENT
-. RE
-.\" indent \\n[an-margin]
-.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
-.nr rst2man-indent-level -1
-.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
-.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
-..
-.\" Man page generated from reStructeredText.
-.
-.sp
-Manage user specific data
-.SH LIBRARY
-.sp
-C Client Library for memcached (libmemcached, \-lmemcached)
-.SH SYNOPSIS
-.sp
-.nf
-.ft C
-#include <libmemcached/memcached.h>
-
-void *memcached_get_user_data (memcached_st *ptr);
-
-void *memcached_set_user_data (memcached_st *ptr, void *data);
-.ft P
-.fi
-.SH DESCRIPTION
-.sp
-libmemcached(3) allows you to store a pointer to a user specific data inside
-the memcached_st structure.
-.sp
-memcached_set_user_data() is used to set the user specific data in the
-memcached_st structure.
-.sp
-memcached_get_user_data() is used to retrieve the user specific data in
-the memcached_st structure.
-.SH RETURN
-.sp
-memcached_set_user_data() returns the previous value of the user specific
-data.
-.sp
-memcached_get_user_data() returns the current value uf the user specific
-data.
-.SH HOME
-.sp
-To find out more information please check:
-\fI\%http://libmemcached.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/memcached_stat.3 b/docs/man/memcached_stat.3
deleted file mode 100644 (file)
index bb5f74f..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-.TH "MEMCACHED_STAT" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B memcached_stat_st *memcached_stat (memcached_st *ptr, char *args, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_stat_servername (memcached_stat_st *stat, char *args, const char *hostname, unsigned int port);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B char * memcached_stat_get_value (memcached_st *ptr, memcached_stat_st *stat, const char *key, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B char ** memcached_stat_get_keys (memcached_st *ptr, memcached_stat_st *stat, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_stat_execute (memcached_st *memc, const char *args, memcached_stat_fn func, void *context);
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.SH DESCRIPTION
-.sp
-libmemcached(3) has the ability to query a memcached server (or collection
-of servers) for their current state. Queries to find state return a
-\fBmemcached_stat_st\fP structure. You are responsible for freeing this structure.
-While it is possible to access the structure directly it is not advisable.
-<memcached_stat_get_value() has been provided to query the structure.
-.sp
-memcached_stat_execute() uses the servers found in \fBmemcached_stat_st\fP and
-executes a "stat" command on each server. args is an optional argument that
-can be passed in to modify the behavior of "stats". You will need to supply
-a callback function that will be supplied each pair of values returned by
-the memcached server.
-.sp
-memcached_stat() fetches an array of \fBmemcached_stat_st\fP structures containing
-the state of all available memcached servers. The return value must be freed
-by the calling application. If called with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPbehavior set, a NULL value is returned and the error parameter is set to
-\fBMEMCACHED_NOT_SUPPORTED\fP.
-.sp
-memcached_stat_servername() can be used standalone without a \fBmemcached_st\fP to
-obtain the state of a particular server.  "args" is used to define a
-particular state object (a list of these are not provided for by either
-the memcached_stat_get_keys() call nor are they defined in the memcached
-protocol). You must specify the hostname and port of the server you want to
-obtain information on.
-.sp
-memcached_stat_get_value() returns the value of a particular state key. You
-specify the key you wish to obtain.  The key must be null terminated.
-.sp
-memcached_stat_get_keys() returns a list of keys that the server has state
-objects on. You are responsible for freeing this list.
-.sp
-A command line tool, memstat(1), is provided so that you do not have to write
-an application to do this.
-.SH RETURN
-.sp
-Varies, see particular functions.
-.sp
-Any method returning a \fBmemcached_stat_st\fP expects you to free the
-memory allocated for it.
-.SH HOME
-.sp
-To find out more information please check:
-\fI\%http://libmemcached.org/\fP
-.SH AUTHOR
-.sp
-Brian Aker, <\fI\%brian@tangent.org\fP>
-.SH SEE ALSO
-.sp
-memcached(1) libmemcached(3) memcached_strerror(3)
-.SH AUTHOR
-Brian Aker
-.SH COPYRIGHT
-2011, Brian Aker 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
deleted file mode 100644 (file)
index efd6ea2..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-.TH "MEMCACHED_STAT_EXECUTE" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B memcached_stat_st *memcached_stat (memcached_st *ptr, char *args, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_stat_servername (memcached_stat_st *stat, char *args, const char *hostname, unsigned int port);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B char * memcached_stat_get_value (memcached_st *ptr, memcached_stat_st *stat, const char *key, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B char ** memcached_stat_get_keys (memcached_st *ptr, memcached_stat_st *stat, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_stat_execute (memcached_st *memc, const char *args, memcached_stat_fn func, void *context);
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.SH DESCRIPTION
-.sp
-libmemcached(3) has the ability to query a memcached server (or collection
-of servers) for their current state. Queries to find state return a
-\fBmemcached_stat_st\fP structure. You are responsible for freeing this structure.
-While it is possible to access the structure directly it is not advisable.
-<memcached_stat_get_value() has been provided to query the structure.
-.sp
-memcached_stat_execute() uses the servers found in \fBmemcached_stat_st\fP and
-executes a "stat" command on each server. args is an optional argument that
-can be passed in to modify the behavior of "stats". You will need to supply
-a callback function that will be supplied each pair of values returned by
-the memcached server.
-.sp
-memcached_stat() fetches an array of \fBmemcached_stat_st\fP structures containing
-the state of all available memcached servers. The return value must be freed
-by the calling application. If called with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPbehavior set, a NULL value is returned and the error parameter is set to
-\fBMEMCACHED_NOT_SUPPORTED\fP.
-.sp
-memcached_stat_servername() can be used standalone without a \fBmemcached_st\fP to
-obtain the state of a particular server.  "args" is used to define a
-particular state object (a list of these are not provided for by either
-the memcached_stat_get_keys() call nor are they defined in the memcached
-protocol). You must specify the hostname and port of the server you want to
-obtain information on.
-.sp
-memcached_stat_get_value() returns the value of a particular state key. You
-specify the key you wish to obtain.  The key must be null terminated.
-.sp
-memcached_stat_get_keys() returns a list of keys that the server has state
-objects on. You are responsible for freeing this list.
-.sp
-A command line tool, memstat(1), is provided so that you do not have to write
-an application to do this.
-.SH RETURN
-.sp
-Varies, see particular functions.
-.sp
-Any method returning a \fBmemcached_stat_st\fP expects you to free the
-memory allocated for it.
-.SH HOME
-.sp
-To find out more information please check:
-\fI\%http://libmemcached.org/\fP
-.SH AUTHOR
-.sp
-Brian Aker, <\fI\%brian@tangent.org\fP>
-.SH SEE ALSO
-.sp
-memcached(1) libmemcached(3) memcached_strerror(3)
-.SH AUTHOR
-Brian Aker
-.SH COPYRIGHT
-2011, Brian Aker 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
deleted file mode 100644 (file)
index 2c940cf..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-.TH "MEMCACHED_STAT_GET_KEYS" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B memcached_stat_st *memcached_stat (memcached_st *ptr, char *args, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_stat_servername (memcached_stat_st *stat, char *args, const char *hostname, unsigned int port);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B char * memcached_stat_get_value (memcached_st *ptr, memcached_stat_st *stat, const char *key, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B char ** memcached_stat_get_keys (memcached_st *ptr, memcached_stat_st *stat, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_stat_execute (memcached_st *memc, const char *args, memcached_stat_fn func, void *context);
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.SH DESCRIPTION
-.sp
-libmemcached(3) has the ability to query a memcached server (or collection
-of servers) for their current state. Queries to find state return a
-\fBmemcached_stat_st\fP structure. You are responsible for freeing this structure.
-While it is possible to access the structure directly it is not advisable.
-<memcached_stat_get_value() has been provided to query the structure.
-.sp
-memcached_stat_execute() uses the servers found in \fBmemcached_stat_st\fP and
-executes a "stat" command on each server. args is an optional argument that
-can be passed in to modify the behavior of "stats". You will need to supply
-a callback function that will be supplied each pair of values returned by
-the memcached server.
-.sp
-memcached_stat() fetches an array of \fBmemcached_stat_st\fP structures containing
-the state of all available memcached servers. The return value must be freed
-by the calling application. If called with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPbehavior set, a NULL value is returned and the error parameter is set to
-\fBMEMCACHED_NOT_SUPPORTED\fP.
-.sp
-memcached_stat_servername() can be used standalone without a \fBmemcached_st\fP to
-obtain the state of a particular server.  "args" is used to define a
-particular state object (a list of these are not provided for by either
-the memcached_stat_get_keys() call nor are they defined in the memcached
-protocol). You must specify the hostname and port of the server you want to
-obtain information on.
-.sp
-memcached_stat_get_value() returns the value of a particular state key. You
-specify the key you wish to obtain.  The key must be null terminated.
-.sp
-memcached_stat_get_keys() returns a list of keys that the server has state
-objects on. You are responsible for freeing this list.
-.sp
-A command line tool, memstat(1), is provided so that you do not have to write
-an application to do this.
-.SH RETURN
-.sp
-Varies, see particular functions.
-.sp
-Any method returning a \fBmemcached_stat_st\fP expects you to free the
-memory allocated for it.
-.SH HOME
-.sp
-To find out more information please check:
-\fI\%http://libmemcached.org/\fP
-.SH AUTHOR
-.sp
-Brian Aker, <\fI\%brian@tangent.org\fP>
-.SH SEE ALSO
-.sp
-memcached(1) libmemcached(3) memcached_strerror(3)
-.SH AUTHOR
-Brian Aker
-.SH COPYRIGHT
-2011, Brian Aker 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
deleted file mode 100644 (file)
index 9833d4b..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-.TH "MEMCACHED_STAT_GET_VALUE" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B memcached_stat_st *memcached_stat (memcached_st *ptr, char *args, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_stat_servername (memcached_stat_st *stat, char *args, const char *hostname, unsigned int port);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B char * memcached_stat_get_value (memcached_st *ptr, memcached_stat_st *stat, const char *key, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B char ** memcached_stat_get_keys (memcached_st *ptr, memcached_stat_st *stat, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_stat_execute (memcached_st *memc, const char *args, memcached_stat_fn func, void *context);
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.SH DESCRIPTION
-.sp
-libmemcached(3) has the ability to query a memcached server (or collection
-of servers) for their current state. Queries to find state return a
-\fBmemcached_stat_st\fP structure. You are responsible for freeing this structure.
-While it is possible to access the structure directly it is not advisable.
-<memcached_stat_get_value() has been provided to query the structure.
-.sp
-memcached_stat_execute() uses the servers found in \fBmemcached_stat_st\fP and
-executes a "stat" command on each server. args is an optional argument that
-can be passed in to modify the behavior of "stats". You will need to supply
-a callback function that will be supplied each pair of values returned by
-the memcached server.
-.sp
-memcached_stat() fetches an array of \fBmemcached_stat_st\fP structures containing
-the state of all available memcached servers. The return value must be freed
-by the calling application. If called with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPbehavior set, a NULL value is returned and the error parameter is set to
-\fBMEMCACHED_NOT_SUPPORTED\fP.
-.sp
-memcached_stat_servername() can be used standalone without a \fBmemcached_st\fP to
-obtain the state of a particular server.  "args" is used to define a
-particular state object (a list of these are not provided for by either
-the memcached_stat_get_keys() call nor are they defined in the memcached
-protocol). You must specify the hostname and port of the server you want to
-obtain information on.
-.sp
-memcached_stat_get_value() returns the value of a particular state key. You
-specify the key you wish to obtain.  The key must be null terminated.
-.sp
-memcached_stat_get_keys() returns a list of keys that the server has state
-objects on. You are responsible for freeing this list.
-.sp
-A command line tool, memstat(1), is provided so that you do not have to write
-an application to do this.
-.SH RETURN
-.sp
-Varies, see particular functions.
-.sp
-Any method returning a \fBmemcached_stat_st\fP expects you to free the
-memory allocated for it.
-.SH HOME
-.sp
-To find out more information please check:
-\fI\%http://libmemcached.org/\fP
-.SH AUTHOR
-.sp
-Brian Aker, <\fI\%brian@tangent.org\fP>
-.SH SEE ALSO
-.sp
-memcached(1) libmemcached(3) memcached_strerror(3)
-.SH AUTHOR
-Brian Aker
-.SH COPYRIGHT
-2011, Brian Aker 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
deleted file mode 100644 (file)
index f3285d0..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-.TH "MEMCACHED_STAT_SERVERNAME" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B memcached_stat_st *memcached_stat (memcached_st *ptr, char *args, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_stat_servername (memcached_stat_st *stat, char *args, const char *hostname, unsigned int port);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B char * memcached_stat_get_value (memcached_st *ptr, memcached_stat_st *stat, const char *key, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B char ** memcached_stat_get_keys (memcached_st *ptr, memcached_stat_st *stat, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_stat_execute (memcached_st *memc, const char *args, memcached_stat_fn func, void *context);
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.SH DESCRIPTION
-.sp
-libmemcached(3) has the ability to query a memcached server (or collection
-of servers) for their current state. Queries to find state return a
-\fBmemcached_stat_st\fP structure. You are responsible for freeing this structure.
-While it is possible to access the structure directly it is not advisable.
-<memcached_stat_get_value() has been provided to query the structure.
-.sp
-memcached_stat_execute() uses the servers found in \fBmemcached_stat_st\fP and
-executes a "stat" command on each server. args is an optional argument that
-can be passed in to modify the behavior of "stats". You will need to supply
-a callback function that will be supplied each pair of values returned by
-the memcached server.
-.sp
-memcached_stat() fetches an array of \fBmemcached_stat_st\fP structures containing
-the state of all available memcached servers. The return value must be freed
-by the calling application. If called with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPbehavior set, a NULL value is returned and the error parameter is set to
-\fBMEMCACHED_NOT_SUPPORTED\fP.
-.sp
-memcached_stat_servername() can be used standalone without a \fBmemcached_st\fP to
-obtain the state of a particular server.  "args" is used to define a
-particular state object (a list of these are not provided for by either
-the memcached_stat_get_keys() call nor are they defined in the memcached
-protocol). You must specify the hostname and port of the server you want to
-obtain information on.
-.sp
-memcached_stat_get_value() returns the value of a particular state key. You
-specify the key you wish to obtain.  The key must be null terminated.
-.sp
-memcached_stat_get_keys() returns a list of keys that the server has state
-objects on. You are responsible for freeing this list.
-.sp
-A command line tool, memstat(1), is provided so that you do not have to write
-an application to do this.
-.SH RETURN
-.sp
-Varies, see particular functions.
-.sp
-Any method returning a \fBmemcached_stat_st\fP expects you to free the
-memory allocated for it.
-.SH HOME
-.sp
-To find out more information please check:
-\fI\%http://libmemcached.org/\fP
-.SH AUTHOR
-.sp
-Brian Aker, <\fI\%brian@tangent.org\fP>
-.SH SEE ALSO
-.sp
-memcached(1) libmemcached(3) memcached_strerror(3)
-.SH AUTHOR
-Brian Aker
-.SH COPYRIGHT
-2011, Brian Aker DataDifferential, http://datadifferential.com/
-.\" Generated by docutils manpage writer.
-.\" 
-.
diff --git a/docs/man/memcached_stats.3 b/docs/man/memcached_stats.3
deleted file mode 100644 (file)
index 947d3e9..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-.TH "MEMCACHED_STATS" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B memcached_stat_st *memcached_stat (memcached_st *ptr, char *args, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_stat_servername (memcached_stat_st *stat, char *args, const char *hostname, unsigned int port);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B char * memcached_stat_get_value (memcached_st *ptr, memcached_stat_st *stat, const char *key, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B char ** memcached_stat_get_keys (memcached_st *ptr, memcached_stat_st *stat, memcached_return_t *error);
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_stat_execute (memcached_st *memc, const char *args, memcached_stat_fn func, void *context);
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.SH DESCRIPTION
-.sp
-libmemcached(3) has the ability to query a memcached server (or collection
-of servers) for their current state. Queries to find state return a
-\fBmemcached_stat_st\fP structure. You are responsible for freeing this structure.
-While it is possible to access the structure directly it is not advisable.
-<memcached_stat_get_value() has been provided to query the structure.
-.sp
-memcached_stat_execute() uses the servers found in \fBmemcached_stat_st\fP and
-executes a "stat" command on each server. args is an optional argument that
-can be passed in to modify the behavior of "stats". You will need to supply
-a callback function that will be supplied each pair of values returned by
-the memcached server.
-.sp
-memcached_stat() fetches an array of \fBmemcached_stat_st\fP structures containing
-the state of all available memcached servers. The return value must be freed
-by the calling application. If called with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fPbehavior set, a NULL value is returned and the error parameter is set to
-\fBMEMCACHED_NOT_SUPPORTED\fP.
-.sp
-memcached_stat_servername() can be used standalone without a \fBmemcached_st\fP to
-obtain the state of a particular server.  "args" is used to define a
-particular state object (a list of these are not provided for by either
-the memcached_stat_get_keys() call nor are they defined in the memcached
-protocol). You must specify the hostname and port of the server you want to
-obtain information on.
-.sp
-memcached_stat_get_value() returns the value of a particular state key. You
-specify the key you wish to obtain.  The key must be null terminated.
-.sp
-memcached_stat_get_keys() returns a list of keys that the server has state
-objects on. You are responsible for freeing this list.
-.sp
-A command line tool, memstat(1), is provided so that you do not have to write
-an application to do this.
-.SH RETURN
-.sp
-Varies, see particular functions.
-.sp
-Any method returning a \fBmemcached_stat_st\fP expects you to free the
-memory allocated for it.
-.SH HOME
-.sp
-To find out more information please check:
-\fI\%http://libmemcached.org/\fP
-.SH AUTHOR
-.sp
-Brian Aker, <\fI\%brian@tangent.org\fP>
-.SH SEE ALSO
-.sp
-memcached(1) libmemcached(3) memcached_strerror(3)
-.SH AUTHOR
-Brian Aker
-.SH COPYRIGHT
-2011, Brian Aker DataDifferential, http://datadifferential.com/
-.\" Generated by docutils manpage writer.
-.\" 
-.
diff --git a/docs/man/memcached_strerror.3 b/docs/man/memcached_strerror.3
deleted file mode 100644 (file)
index a3ee41b..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-.TH "MEMCACHED_STRERROR" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B const char * memcached_strerror (memcached_st *ptr, memcached_return_t rc);
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.SH DESCRIPTION
-.sp
-memcached_strerror() takes a \fBmemcached_return_t\fP value and returns a string
-describing the error.
-.sp
-This string must not be modified by the application.
-.sp
-\fBmemcached_return_t\fP values are returned from nearly all libmemcached(3) functions.
-.sp
-\fBmemcached_return_t\fP values are of an enum type so that you can set up responses
-with switch/case and know that you are capturing all possible return values.
-.SH RETURN
-.sp
-memcached_strerror() returns a string describing a \fBmemcached_return_t\fP value.
-.SH HOME
-.sp
-To find out more information please check:
-\fI\%http://libmemcached.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/memcached_user_data.3 b/docs/man/memcached_user_data.3
deleted file mode 100644 (file)
index f2e3475..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-.TH "MEMCACHED_USER_DATA" "3" "May 23, 2011" "0.47" "libmemcached"
-.SH NAME
-memcached_user_data \- libmemcached Documentation
-.
-.nr rst2man-indent-level 0
-.
-.de1 rstReportMargin
-\\$1 \\n[an-margin]
-level \\n[rst2man-indent-level]
-level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
--
-\\n[rst2man-indent0]
-\\n[rst2man-indent1]
-\\n[rst2man-indent2]
-..
-.de1 INDENT
-.\" .rstReportMargin pre:
-. RS \\$1
-. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
-. nr rst2man-indent-level +1
-.\" .rstReportMargin post:
-..
-.de UNINDENT
-. RE
-.\" indent \\n[an-margin]
-.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
-.nr rst2man-indent-level -1
-.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
-.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
-..
-.\" Man page generated from reStructeredText.
-.
-.sp
-Manage user specific data
-.SH LIBRARY
-.sp
-C Client Library for memcached (libmemcached, \-lmemcached)
-.SH SYNOPSIS
-.sp
-.nf
-.ft C
-#include <libmemcached/memcached.h>
-
-void *memcached_get_user_data (memcached_st *ptr);
-
-void *memcached_set_user_data (memcached_st *ptr, void *data);
-.ft P
-.fi
-.SH DESCRIPTION
-.sp
-libmemcached(3) allows you to store a pointer to a user specific data inside
-the memcached_st structure.
-.sp
-memcached_set_user_data() is used to set the user specific data in the
-memcached_st structure.
-.sp
-memcached_get_user_data() is used to retrieve the user specific data in
-the memcached_st structure.
-.SH RETURN
-.sp
-memcached_set_user_data() returns the previous value of the user specific
-data.
-.sp
-memcached_get_user_data() returns the current value uf the user specific
-data.
-.SH HOME
-.sp
-To find out more information please check:
-\fI\%http://libmemcached.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/memcached_verbosity.3 b/docs/man/memcached_verbosity.3
deleted file mode 100644 (file)
index 45a857a..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-.TH "MEMCACHED_VERBOSITY" "3" "May 23, 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 SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_verbosity (memcached_st *ptr, unsigned int verbosity);
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.SH DESCRIPTION
-.sp
-memcached_verbosity() modifies the "verbosity" of the
-memcached(1) servers referenced in the \fBmemcached_st\fP parameter.
-.SH RETURN
-.sp
-A value of type \fBmemcached_return_t\fP is returned
-On success that value will be \fBMEMCACHED_SUCCESS\fP.
-Use memcached_strerror() to translate this value to a printable string.
-.SH HOME
-.sp
-To find out more information please check:
-\fI\%http://libmemcached.org/\fP
-.SH 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
deleted file mode 100644 (file)
index b0e218d..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-.TH "MEMCACHED_VERSION" "3" "May 23, 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.
-.
-.SH SYNOPSIS
-.sp
-#include <libmemcached/memcached.h>
-.INDENT 0.0
-.TP
-.B const char * memcached_lib_version(void)
-.UNINDENT
-.INDENT 0.0
-.TP
-.B memcached_return_t memcached_version(memcached_st\fI\ *ptr\fP)
-.UNINDENT
-.sp
-Compile and link with \-lmemcached
-.SH DESCRIPTION
-.sp
-memcached_lib_version() is used to return a simple version string representing
-the libmemcached version (client library version, not server version)
-.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\%http://libmemcached.org/\fP
-.SH 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
deleted file mode 100644 (file)
index d613ae5..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-.TH "MEMCAPABLE" "1" "May 23, 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
-.sp
-\fBmemcapable\fP
-.INDENT 0.0
-.TP
-.B \-h hostname
-.UNINDENT
-.sp
-Specify the hostname to connect to. The default is \fIlocalhost\fP
-.INDENT 0.0
-.TP
-.B \-p port
-.UNINDENT
-.sp
-Specify the port number to connect to. The default is \fI11211\fP
-.INDENT 0.0
-.TP
-.B \-c
-.UNINDENT
-.sp
-Generate a coredump when it detects an error from the server.
-.INDENT 0.0
-.TP
-.B \-v
-.UNINDENT
-.sp
-Print out the comparison when it detects an error from the server.
-.INDENT 0.0
-.TP
-.B \-t n
-.UNINDENT
-.sp
-Set the timeout from an IO operation to/from the server to \fIn\fP seconds.
-.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\%http://libmemcached.org/\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
deleted file mode 100644 (file)
index ff516f6..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-.TH "MEMCAT" "1" "May 23, 2011" "0.47" "libmemcached"
-.SH NAME
-memcat \- libmemcached Documentation
-.
-.nr rst2man-indent-level 0
-.
-.de1 rstReportMargin
-\\$1 \\n[an-margin]
-level \\n[rst2man-indent-level]
-level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
--
-\\n[rst2man-indent0]
-\\n[rst2man-indent1]
-\\n[rst2man-indent2]
-..
-.de1 INDENT
-.\" .rstReportMargin pre:
-. RS \\$1
-. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
-. nr rst2man-indent-level +1
-.\" .rstReportMargin post:
-..
-.de UNINDENT
-. RE
-.\" indent \\n[an-margin]
-.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
-.nr rst2man-indent-level -1
-.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
-.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
-..
-.\" Man page generated from reStructeredText.
-.
-.sp
-Copy a set of keys to stdout
-.SH SYNOPSIS
-.sp
-\fBmemcat\fP
-.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\%http://libmemcached.org/\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
deleted file mode 100644 (file)
index f2f10bf..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-.TH "MEMCP" "1" "May 23, 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 program
-.
-\fImemcp\fP
-.UNINDENT
-.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.
-.sp
-You can specify servers via the \fB\-\-servers\fP option or via the
-environment variable \fBMEMCACHED_SERVERS\fP. If you do not specify either 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\%http://libmemcached.org/\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
deleted file mode 100644 (file)
index 72eedbf..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-.TH "MEMDUMP" "1" "May 23, 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 program
-.
-\fImemdump\fP
-.UNINDENT
-.INDENT 0.0
-.TP
-.B \-\-help
-.UNINDENT
-.SH DESCRIPTION
-.sp
-\fBmemdump\fP 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\%http://libmemcached.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/memerror.1 b/docs/man/memerror.1
deleted file mode 100644 (file)
index 0a36718..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-.TH "MEMERROR" "1" "May 23, 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
-Translates a memcached error code into a string
-.SH SYNOPSIS
-.INDENT 0.0
-.TP
-.B program
-.
-\fImemerror\fP
-.UNINDENT
-.INDENT 0.0
-.TP
-.B \-\-help
-.UNINDENT
-.SH DESCRIPTION
-.sp
-\fBmemerror\fP translate an error code from libmemcached(3) into a human
-readable string.
-.sp
-For a full list of operations run the tool with the \fB\-\-help\fP option.
-.SH HOME
-.sp
-To find out more infoerroration please check:
-\fI\%http://libmemcached.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
deleted file mode 100644 (file)
index 0f6ae5e..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-.TH "MEMFLUSH" "1" "May 23, 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 program
-.
-\fImemflush\fP
-.UNINDENT
-.INDENT 0.0
-.TP
-.B \-\-help
-.UNINDENT
-.SH DESCRIPTION
-.sp
-\fBmemflush\fP resets the contents of memcached(1) servers.
-This means that all data in the specified 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\%http://libmemcached.org/\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
deleted file mode 100644 (file)
index 830cb9a..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-.TH "MEMRM" "1" "May 23, 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 program
-.
-\fImemrm\fP
-.UNINDENT
-.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\%http://libmemcached.org/\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
deleted file mode 100644 (file)
index 891b266..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-.TH "MEMSLAP" "1" "May 23, 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
-.INDENT 0.0
-.TP
-.B program
-.
-\fImemslap\fP
-.UNINDENT
-.INDENT 0.0
-.TP
-.B \-\-help
-.UNINDENT
-.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
deleted file mode 100644 (file)
index 2d77f18..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-.TH "MEMSTAT" "1" "May 23, 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 program
-.
-\fImemstat\fP
-.UNINDENT
-.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://libmemcached.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.
-.\" 
-.
index 845d613fa147eaf7e2004c7d593c9a0743573157..3f9e62dd09536237a9c2b78bbd176086e394b299 100644 (file)
@@ -18,9 +18,7 @@ DESCRIPTION
 -----------
 
 
-.. c:func:: memaslap
-
-is a load generation and benchmark tool for memcached(1)
+memaslap is a load generation and benchmark tool for :program:`memcached()`
 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.
index 7ba334116db167e36997700400ed6af57a197184..c2138bc8979d18263acd91a46321bbfa6a17a2f5 100644 (file)
@@ -23,7 +23,7 @@ Compile and link with -lmemcached
 DESCRIPTION
 -----------
 
-:cfunc:`memcached_cas()` overwrites data in the server as long as the "cas" 
+:c:func:`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 :c:func:`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 
index fe251b4a0af5352c196a099ad684714cd0093bd6..a5c273de8730dfa9e1f2e45292f26252a12d7d02 100644 (file)
@@ -24,8 +24,8 @@ DESCRIPTION
 -----------
 
 
-:c:func:`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
+:c:func::`memcached_flush()` is used to wipe clean the contents of :program:`memcached` 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
@@ -39,9 +39,7 @@ RETURN
 
 A value of type :c:type:`memcached_return_t` is returned 
 On success that value will be :c:type:`MEMCACHED_SUCCESS`.
-Use :c:func:`memcached_strerror()` to translate this value to a printable 
-string.
-
+Use :c:type:`memcached_strerror()` to translate this value to a printable string.
 
 ----
 HOME
index 0c8e88194c2bf064800d1337ef03eadcc64011c0..d3f5806ff1e6fef62889e13a98009269040f39a8 100644 (file)
@@ -110,9 +110,17 @@ All objects returned must be freed by the calling application.
 error. You must look at the value of error to determine what the actual error 
 was.
 
-:c:type:`MEMCACHED_KEY_TOO_BIG` is set to error whenever 
-:c:func:`memcached_fetch()` was used and the key was set larger then 
-:c:type:`MEMCACHED_MAX_KEY`, which was the largest key allowed for the original memcached ascii server.
+:c:func:`memcached_fetch_execute()` return :c:type:`MEMCACHED_SUCCESS` if
+all keys were successful. :c:type:`MEMCACHED_NOTFOUND` will be return if no
+keys at all were found.
+
+:c:func:`memcached_fetch()` and :c:func:`memcached_fetch_result()` set error
+to :c:type:`MEMCACHED_END` upon successful conclusion.
+:c:type:`MEMCACHED_NOTFOUND` will be return if no keys at all were found.
+
+:c:type:`MEMCACHED_KEY_TOO_BIG` is set to error whenever :c::func:`memcached_fetch()` was used
+and the key was set larger then :c:type:`MEMCACHED_MAX_KEY`, which was the largest
+key allowed for the original memcached ascii server.
 
 
 ----
index 8bc43e26032c0803ad0e20b0949dca4b0d2dccf2..295b2229ebb669a2ede77e227de2a8d7723e50da 100644 (file)
@@ -2,17 +2,14 @@
 Working with result sets
 ========================
 
-.. index:: object: memcached_result_st
-
-Work with memcached_result_st
-
-
 --------
 SYNOPSIS
 --------
 
 #include <libmemcached/memcached_pool.h>
 
+.. c:type:: memcached_result_st
+
 .. c:function:: memcached_result_st * memcached_result_create (memcached_st *ptr, memcached_result_st *result);
 
 .. c:function:: void memcached_result_free (memcached_result_st *result);
@@ -76,7 +73,7 @@ the current result object.
 :c:func:`memcached_result_flags()` returns the flags associated with the
 current result object.
 
-:c:cune:`memcached_result_cas()` returns the cas associated with the
+:c:func:`memcached_result_cas()` returns the cas associated with the
 current result object. This value will only be available if the server
 tests it.
 
diff --git a/docs/memcached_return_t.rst b/docs/memcached_return_t.rst
deleted file mode 100644 (file)
index 3663c6d..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-================================
-Error Codes (memcached_return_t)
-================================
-
---------
-SYNOPSIS
---------
-
-#include <libmemcached/memcached.h>
-
-.. c:type:: memcached_return_t
-
-.. c:function:: const char *libmemcached_strerror(libmemcached_return_t rc)
-
-.. c:function:: bool libmemcached_success(libmemcached_return_t rc)
-
-.. c:function:: bool libmemcached_failure(libmemcached_return_t rc)
-
-.. c:function:: bool libmemcache_continue(libmemcached_return_t rc)
-
-
-
-:c:func:`memcached_success()` return true if :c:type:`MEMCACHED_SUCCESS` tested true.
-
-:c:func:`memcached_failure()` return true if any value other then :c:type:`MEMCACHED_SUCCESS` was provided.
-
-
-
-
-.. c:type:: MEMCACHED_SUCCESS,
-
-Success
-
-.. c:type:: MEMCACHED_FAILURE,
-
-.. c:type:: MEMCACHED_HOST_LOOKUP_FAILURE, // getaddrinfo() only
-
-.. c:type:: MEMCACHED_CONNECTION_FAILURE,  // DEPRECATED
-
-.. c:type:: MEMCACHED_CONNECTION_BIND_FAILURE,  // DEPRECATED
-
-.. c:type:: MEMCACHED_WRITE_FAILURE,
-
-.. c:type:: MEMCACHED_READ_FAILURE,
-
-.. c:type:: MEMCACHED_UNKNOWN_READ_FAILURE,
-
-.. c:type:: MEMCACHED_PROTOCOL_ERROR,
-
-.. c:type:: MEMCACHED_CLIENT_ERROR,
-
-.. c:type:: MEMCACHED_SERVER_ERROR,
-
-.. c:type:: MEMCACHED_CONNECTION_SOCKET_CREATE_FAILURE, // DEPRECATED
-
-.. c:type:: MEMCACHED_DATA_EXISTS,
-
-.. c:type:: MEMCACHED_DATA_DOES_NOT_EXIST,
-
-.. c:type:: MEMCACHED_NOTSTORED,
-
-.. c:type:: MEMCACHED_STORED,
-
-.. c:type:: MEMCACHED_NOTFOUND,
-
-.. c:type:: MEMCACHED_MEMORY_ALLOCATION_FAILURE,
-
-.. c:type:: MEMCACHED_PARTIAL_READ,
-
-.. c:type:: MEMCACHED_SOME_ERRORS,
-
-.. c:type:: MEMCACHED_NO_SERVERS,
-
-.. c:type:: MEMCACHED_END,
-
-.. c:type:: MEMCACHED_DELETED,
-
-.. c:type:: MEMCACHED_VALUE,
-
-.. c:type:: MEMCACHED_STAT,
-
-.. c:type:: MEMCACHED_ITEM,
-
-.. c:type:: MEMCACHED_ERRNO,
-
-.. c:type:: MEMCACHED_FAIL_UNIX_SOCKET, // DEPRECATED
-
-.. c:type:: MEMCACHED_NOT_SUPPORTED,
-
-.. c:type:: MEMCACHED_NO_KEY_PROVIDED, /* Deprecated. Use MEMCACHED_BAD_KEY_PROVIDED! */
-
-.. c:type:: MEMCACHED_FETCH_NOTFINISHED,
-
-.. c:type:: MEMCACHED_TIMEOUT,
-
-Connection to server timed out.
-
-.. c:type:: MEMCACHED_BUFFERED,
-
-.. c:type:: MEMCACHED_BAD_KEY_PROVIDED,
-
-.. c:type:: MEMCACHED_INVALID_HOST_PROTOCOL,
-
-.. c:type:: MEMCACHED_SERVER_MARKED_DEAD,
-
-.. c:type:: MEMCACHED_UNKNOWN_STAT_KEY,
-
-.. c:type:: MEMCACHED_E2BIG,
-
-.. c:type:: MEMCACHED_INVALID_ARGUMENTS,
-
-.. c:type:: MEMCACHED_KEY_TOO_BIG,
-
-.. c:type:: MEMCACHED_AUTH_PROBLEM,
-
-.. c:type:: MEMCACHED_AUTH_FAILURE,
-
-.. c:type:: MEMCACHED_AUTH_CONTINUE,
-
-.. c:type:: MEMCACHED_PARSE_ERROR,
-
-.. c:type:: MEMCACHED_PARSE_USER_ERROR,
-
-.. c:type:: MEMCACHED_DEPRECATED,
-
-.. c:type:: MEMCACHED_MAXIMUM_RETURN /* Always add new error code before */
-   
---------
-SEE ALSO
---------
-
-:manpage:`memcached(8)` :manpage:`libmemcached(3)` :manpage:`memcached_client_error()` or :manpage:`memcached_worker_error()`
-
index f39c478b720ea47be93cb32322f431715a1bdadf..9a8c8fc2d1d1a27bc2f9f62c41586e5473779fc2 100644 (file)
@@ -3,8 +3,6 @@ Managing lists of servers
 =========================
 
 
-.. index:: object: memcached_server_instance_st
-
 --------
 SYNOPSIS
 --------
@@ -12,18 +10,21 @@ SYNOPSIS
 
 
 #include <libmemcached/memcached.h>
-.. c:function:: const memcached_server_instance_st memcached_server_list (memcached_st *ptr);
 
-.. c:function:: void memcached_server_list_free (memcached_server_list_st list);
+.. c:type:: memcached_server_instance_st
+
+.. c:function:: const memcached_server_instance_st memcached_server_list (memcached_st *ptr)
+
+.. c:function:: void memcached_server_list_free (memcached_server_list_st list)
  
-.. c:function:: memcached_server_list_st memcached_server_list_append (memcached_server_list_st list, const char *hostname, unsigned int port, memcached_return_t *error);
+.. c:function:: memcached_server_list_st memcached_server_list_append (memcached_server_list_st list, const char *hostname, unsigned int port, memcached_return_t *error)
  
-.. c:function:: uint32_t memcached_server_list_count (memcached_server_list_st list);
+.. c:function:: uint32_t memcached_server_list_count (memcached_server_list_st list)
  
-.. c:function:: const char *memcached_server_error (memcached_server_instance_st instance);
+.. c:function:: const char *memcached_server_error (memcached_server_instance_st instance)
  
-.. c:function:: void memcached_server_error_reset (memcached_server_instance_st list); DEPRECATED 
+.. c:function:: void memcached_server_error_reset (memcached_server_instance_st list)
+.. deprecated:: 0.39
    
 
 Compile and link with -lmemcached
@@ -48,7 +49,7 @@ added, just ask!).
 :c:type:`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.
 
-DEPRECATED :c:func:`memcached_servers_parse()`, please see :manpage:`memcached(3)`
+DEPRECATED :c:func:`memcached_servers_parse()`, please see :c:func:`memcached()`
 
 :c:func:`memcached_server_error()` can be used to look at the text of the last error message sent by the server to to the client.
 
index 7331dbdddb21cf796b13a5c66780f17246b5552d..72da276496b5db9be99e7b3500d11066e27c4c95 100644 (file)
@@ -2,29 +2,29 @@
 Manipulate the server information stored in memcached_st
 ========================================================
 
-.. index:: object: memcached_st
-
---------
-SYNOPSIS
+-------- 
+SYNOPSIS 
 --------
 
 #include <libmemcached/memcached.h>
  
-.. c:function:: uint32_t memcached_server_count (memcached_st *ptr);
+.. c:type:: memcached_server_fn
 
-.. c:function:: memcached_return_t memcached_server_add (memcached_st *ptr, const char *hostname, in_port_t port);
+.. c:function:: uint32_t memcached_server_count (memcached_st *ptr)
 
-.. c:function:: memcached_return_t memcached_server_add_udp (memcached_st *ptr, const char *hostname, in_port_t port);
+.. c:function:: memcached_return_t memcached_server_add (memcached_st *ptr, const char *hostname, in_port_t port)
 
-.. c:function:: memcached_return_t memcached_server_add_unix_socket (memcached_st *ptr, const char *socket);
+.. c:function:: memcached_return_t memcached_server_add_udp (memcached_st *ptr, const char *hostname, in_port_t port)
 
-.. c:function:: memcached_return_t memcached_server_push (memcached_st *ptr, const memcached_server_st *list); 
+.. c:function:: memcached_return_t memcached_server_add_unix_socket (memcached_st *ptr, const char *socket)
 
-.. c:function:: memcached_server_instance_st memcached_server_by_key (const memcached_st *ptr, const char *key, size_t key_length, memcached_return_t *error);
+.. c:function:: memcached_return_t memcached_server_push (memcached_st *ptr, const memcached_server_st *list) 
+
+.. c:function:: memcached_server_instance_st memcached_server_by_key (const memcached_st *ptr, const char *key, size_t key_length, memcached_return_t *error)
 
 .. c:function:: memcached_server_instance_st memcached_server_get_last_disconnect (const memcached_st *ptr)
 
-.. c:function:: memcached_return_t memcached_server_cursor(const memcached_st *ptr, const memcached_server_fn *callback, void *context, uint32_t number_of_callbacks);
+.. c:function:: memcached_return_t memcached_server_cursor(const memcached_st *ptr, const memcached_server_fn *callback, void *context, uint32_t number_of_callbacks)
 
 compile and link with -lmemcached
 
@@ -35,8 +35,8 @@ 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
+:doc:`libmemcached` 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).
 
@@ -44,9 +44,7 @@ memcached_server_st(3).
 servers being used by a :c:type:`memcached_st` structure.
 
 :c:func:`memcached_server_add()` pushes a single TCP server into the :c:type:`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:type:`MEMCACHED_BEHAVIOR_USE_UDP` behavior set will result in a
-:c:type:`MEMCACHED_INVALID_HOST_PROTOCOL`.
+ are allowed, so duplication is not checked. Executing this function with the :c:type:`MEMCACHED_BEHAVIOR_USE_UDP` behavior set will result in a :c:type:`MEMCACHED_INVALID_HOST_PROTOCOL`.
 
 :c:func:`memcached_server_add_udp()` pushes a single UDP server into the :c:type:`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:type:`MEMCACHED_BEHAVIOR_USE_UDP` behavior will result in a
index 51a5a26fc1369a54fc3ade81d785134b8a5916b8..6d81f5ea16158e10c40b0fe980fd1b9c45c9d654 100644 (file)
@@ -33,7 +33,7 @@ RETURN
 ------
 
 
-:c:function:`memcached_lib_version()` returns a string with the version of the libmemcached driver.
+:c:func:`memcached_lib_version()` returns a string with the version of the libmemcached driver.
 
 A value of :c:type:`memcached_return_t` is returned from :c:func:'memcached_version()'
 
index 74a98eaf896867d9aa73edba673ea5bdabae5855..a5462734fb45ab3d60af9d17046f348f00d687f8 100644 (file)
@@ -78,7 +78,7 @@ static protocol_binary_response_status get_command_handler(const void *cookie,
     msg.response.message.body.flags= htonl(item->flags);
     char *ptr= (char*)(msg.response.bytes + sizeof(*header) + 4);
     uint32_t bodysize= 4;
-    msg.response.message.header.response.cas= htonll(item->cas);
+    msg.response.message.header.response.cas= memcached_htonll(item->cas);
     if (opcode == PROTOCOL_BINARY_CMD_GETK || opcode == PROTOCOL_BINARY_CMD_GETKQ)
     {
       memcpy(ptr, item->key, item->nkey);
@@ -172,8 +172,8 @@ static protocol_binary_response_status arithmetic_command_handler(const void *co
   };
 
   uint16_t keylen= ntohs(header->request.keylen);
-  uint64_t initial= ntohll(req->message.body.initial);
-  uint64_t delta= ntohll(req->message.body.delta);
+  uint64_t initial= memcached_ntohll(req->message.body.initial);
+  uint64_t delta= memcached_ntohll(req->message.body.delta);
   uint32_t expiration= ntohl(req->message.body.expiration);
   uint32_t flags= 0;
   void *key= req->bytes + sizeof(req->bytes);
@@ -222,8 +222,8 @@ static protocol_binary_response_status arithmetic_command_handler(const void *co
   if (rval == PROTOCOL_BINARY_RESPONSE_SUCCESS)
   {
     response.message.header.response.bodylen= ntohl(8);
-    response.message.body.value= ntohll((*(uint64_t*)item->data));
-    response.message.header.response.cas= ntohll(item->cas);
+    response.message.body.value= memcached_ntohll((*(uint64_t*)item->data));
+    response.message.header.response.cas= memcached_ntohll(item->cas);
 
     release_item(item);
     if (header->request.opcode == PROTOCOL_BINARY_CMD_INCREMENTQ ||
@@ -250,6 +250,7 @@ static protocol_binary_response_status version_command_handler(const void *cooki
       .opcode= PROTOCOL_BINARY_CMD_VERSION,
       .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS),
       .opaque= header->request.opaque,
+      .cas= 0,
       .bodylen= htonl((uint32_t)strlen(versionstring))
     }
   };
@@ -265,7 +266,7 @@ static protocol_binary_response_status concat_command_handler(const void *cookie
 {
   protocol_binary_response_status rval= PROTOCOL_BINARY_RESPONSE_SUCCESS;
   uint16_t keylen= ntohs(header->request.keylen);
-  uint64_t cas= ntohll(header->request.cas);
+  uint64_t cas= memcached_ntohll(header->request.cas);
   void *key= header + 1;
   uint32_t vallen= ntohl(header->request.bodylen) - keylen;
   void *val= (char*)key + keylen;
@@ -316,7 +317,7 @@ static protocol_binary_response_status concat_command_handler(const void *cookie
             .opcode= header->request.opcode,
             .status= htons(rval),
             .opaque= header->request.opaque,
-            .cas= htonll(cas),
+            .cas= memcached_htonll(cas),
           }
         }
       };
@@ -356,7 +357,7 @@ static protocol_binary_response_status set_command_handler(const void *cookie,
     struct item* item= get_item(key, keylen);
     if (item != NULL)
     {
-      if (item->cas != ntohll(header->request.cas))
+      if (item->cas != memcached_ntohll(header->request.cas))
       {
         release_item(item);
         response.message.header.response.status= htons(PROTOCOL_BINARY_RESPONSE_KEY_EEXISTS);
@@ -378,7 +379,7 @@ static protocol_binary_response_status set_command_handler(const void *cookie,
     /* SETQ shouldn't return a message */
     if (header->request.opcode == PROTOCOL_BINARY_CMD_SET)
     {
-      response.message.header.response.cas= htonll(item->cas);
+      response.message.header.response.cas= memcached_htonll(item->cas);
       release_item(item);
       return response_handler(cookie, header, (void*)&response);
     }
@@ -425,7 +426,7 @@ static protocol_binary_response_status add_command_handler(const void *cookie,
       /* ADDQ shouldn't return a message */
       if (header->request.opcode == PROTOCOL_BINARY_CMD_ADD)
       {
-        response.message.header.response.cas= htonll(item->cas);
+        response.message.header.response.cas= memcached_htonll(item->cas);
         release_item(item);
         return response_handler(cookie, header, (void*)&response);
       }
@@ -467,21 +468,26 @@ static protocol_binary_response_status replace_command_handler(const void *cooki
 
   struct item* item= get_item(key, keylen);
   if (item == NULL)
+  {
     response.message.header.response.status= htons(PROTOCOL_BINARY_RESPONSE_KEY_ENOENT);
-  else if (header->request.cas == 0 || ntohll(header->request.cas) == item->cas)
+  }
+  else if (header->request.cas == 0 || memcached_ntohll(header->request.cas) == item->cas)
   {
     release_item(item);
     delete_item(key, keylen);
     item= create_item(key, keylen, data, datalen, flags, timeout);
+
     if (item == NULL)
+    {
       response.message.header.response.status= htons(PROTOCOL_BINARY_RESPONSE_ENOMEM);
+    }
     else
     {
       put_item(item);
       /* REPLACEQ shouldn't return a message */
       if (header->request.opcode == PROTOCOL_BINARY_CMD_REPLACE)
       {
-        response.message.header.response.cas= htonll(item->cas);
+        response.message.header.response.cas= memcached_htonll(item->cas);
         release_item(item);
         return response_handler(cookie, header, (void*)&response);
       }
index 7dcbf8cb3bcc255b601a3bfbfbdb021b1c1809d8..ec534a3b4c9f67467e5ed568f257a6a3d5c2bf6f 100644 (file)
@@ -55,7 +55,7 @@ static void calc_hit_ratio(memcached_analysis_st *result,
     return;
   }
 
-  double temp= (double) (total_get_hits/total_get_cmds);
+  double temp= double(total_get_hits) / total_get_cmds;
   result->pool_hit_ratio= temp * 100;
 }
 
@@ -68,12 +68,15 @@ memcached_analysis_st *memcached_analyze(memcached_st *memc,
   uint32_t server_count, x;
   memcached_analysis_st *result;
 
+  if (not memc or not memc_stat)
+    return NULL;
+
   *error= MEMCACHED_SUCCESS;
   server_count= memcached_server_count(memc);
   result= (memcached_analysis_st*)calloc(memcached_server_count(memc),
                                          sizeof(memcached_analysis_st));
 
-  if (!result)
+  if (not result)
   {
     *error= MEMCACHED_MEMORY_ALLOCATION_FAILURE;
     return NULL;
index d7289f066a91bf225a6f14822237906d56dcbe03..2bfc5bbad711106cebf87a62999d0c0f4a203495 100644 (file)
@@ -137,8 +137,8 @@ static memcached_return_t binary_incr_decr(memcached_st *ptr, uint8_t cmd,
   request.message.header.request.extlen= 20;
   request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES;
   request.message.header.request.bodylen= htonl((uint32_t)(key_length + memcached_array_size(ptr->prefix_key) +request.message.header.request.extlen));
-  request.message.body.delta= htonll(offset);
-  request.message.body.initial= htonll(initial);
+  request.message.body.delta= memcached_htonll(offset);
+  request.message.body.initial= memcached_htonll(initial);
   request.message.body.expiration= htonl((uint32_t) expiration);
 
   struct libmemcached_io_vector_st vector[]=
index ab35a9efef70e4200e39d55098c758f17124e194..80ea0210b9857dcab26a327bd815626829394404 100644 (file)
  *
  */
 
-#include <libmemcached/common.h>
+#include <config.h>
+
+#include <sys/types.h>
+
+#include <libmemcached/visibility.h>
+#include <libmemcached/byteorder.h>
 
 /* Byte swap a 64-bit number. */
 #ifndef swap64
@@ -58,6 +63,20 @@ static inline uint64_t swap64(uint64_t in)
 }
 #endif
 
+#ifdef HAVE_HTONLL
+
+uint64_t memcached_ntohll(uint64_t value)
+{
+  return ntohll(value);
+}
+
+uint64_t memcached_htonll(uint64_t value)
+{
+  return htonll(value);
+}
+
+#else // HAVE_HTONLL
+
 uint64_t memcached_ntohll(uint64_t value)
 {
   return swap64(value);
@@ -67,3 +86,5 @@ uint64_t memcached_htonll(uint64_t value)
 {
   return swap64(value);
 }
+
+#endif // HAVE_HTONLL
index f78790a83dce1822b196d4bd9f4c596d7955b5ed..92687c1d7b6430223250938c9480b9d52f7dc159 100644 (file)
 
 #pragma once
 
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#ifndef HAVE_HTONLL
-#define ntohll(a) memcached_ntohll(a)
-#define htonll(a) memcached_htonll(a)
-
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 LIBMEMCACHED_LOCAL
 uint64_t memcached_ntohll(uint64_t);
+
 LIBMEMCACHED_LOCAL
 uint64_t memcached_htonll(uint64_t);
+
 #ifdef __cplusplus
 }
 #endif
-
-#endif
-
-#ifdef linux
-/* /usr/include/netinet/in.h defines macros from ntohs() to _bswap_nn to
- * optimize the conversion functions, but the prototypes generate warnings
- * from gcc. The conversion methods isn't the bottleneck for my app, so
- * just remove the warnings by undef'ing the optimization ..
- */
-#undef ntohs
-#undef ntohl
-#undef htons
-#undef htonl
-#endif
index 90d3facb06728f24edc3ac7effa8004c1684c2ff..77cfb3bd2e7c4b809537bb45f0bf871a80925f79 100644 (file)
@@ -47,12 +47,19 @@ static memcached_return_t connect_poll(memcached_server_st *ptr)
   fds[0].fd = ptr->fd;
   fds[0].events = POLLOUT;
 
-  int error;
   size_t loop_max= 5;
 
   while (--loop_max) // Should only loop on cases of ERESTART or EINTR
   {
-    error= poll(fds, 1, ptr->root->connect_timeout);
+    int error;
+    if (ptr->root->poll_timeout)
+    {
+      error= poll(fds, 1, ptr->root->connect_timeout);
+    }
+    else
+    {
+      error= 0;
+    }
 
     switch (error)
     {
@@ -67,15 +74,14 @@ static memcached_return_t connect_poll(memcached_server_st *ptr)
         {
           return MEMCACHED_SUCCESS;
         }
-        else
-        {
-          ptr->cached_errno= errno;
 
-          return MEMCACHED_ERRNO;
-        }
+        return memcached_set_errno(*ptr, err, MEMCACHED_AT);
       }
     case 0:
-      return MEMCACHED_TIMEOUT;
+      {
+        return memcached_set_error(*ptr, MEMCACHED_TIMEOUT, MEMCACHED_AT);
+      }
+
     default: // A real error occurred and we need to completely bail
       WATCHPOINT_ERRNO(get_socket_errno());
       switch (get_socket_errno())
@@ -85,7 +91,15 @@ static memcached_return_t connect_poll(memcached_server_st *ptr)
 #endif
       case EINTR:
         continue;
-      default:
+
+      case EFAULT:
+      case ENOMEM:
+        return memcached_set_error(*ptr, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT);
+
+      case EINVAL:
+        return memcached_set_error(*ptr, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT, memcached_literal_param("RLIMIT_NOFILE exceeded, or if OSX the timeout value was invalid"));
+
+      default: // This should not happen
         if (fds[0].revents & POLLERR)
         {
           int err;
@@ -98,25 +112,23 @@ static memcached_return_t connect_poll(memcached_server_st *ptr)
           ptr->cached_errno= get_socket_errno();
         }
 
+        WATCHPOINT_ASSERT(ptr->fd != INVALID_SOCKET);
         (void)closesocket(ptr->fd);
         ptr->fd= INVALID_SOCKET;
+        ptr->state= MEMCACHED_SERVER_STATE_NEW;
 
-        return MEMCACHED_ERRNO;
+        return memcached_set_errno(*ptr, get_socket_errno(), MEMCACHED_AT);
       }
     }
   }
 
   // This should only be possible from ERESTART or EINTR;
-  ptr->cached_errno= get_socket_errno();
-
-  return MEMCACHED_ERRNO;
+  return memcached_set_errno(*ptr, get_socket_errno(), MEMCACHED_AT);
 }
 
 static memcached_return_t set_hostinfo(memcached_server_st *server)
 {
-  char str_port[NI_MAXSERV];
-
-  assert(! server->address_info); // We cover the case where a programming mistake has been made.
+  WATCHPOINT_ASSERT(not server->address_info); // We cover the case where a programming mistake has been made.
   if (server->address_info)
   {
     freeaddrinfo(server->address_info);
@@ -124,6 +136,7 @@ static memcached_return_t set_hostinfo(memcached_server_st *server)
     server->address_info_next= NULL;
   }
 
+  char str_port[NI_MAXSERV];
   int length= snprintf(str_port, NI_MAXSERV, "%u", (uint32_t)server->port);
   if (length >= NI_MAXSERV || length < 0)
     return MEMCACHED_FAILURE;
@@ -161,27 +174,28 @@ static memcached_return_t set_hostinfo(memcached_server_st *server)
     return memcached_set_error(*server, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, memcached_literal_param("getaddrinfo(EAI_BADFLAGS)"));
 
   case EAI_MEMORY:
-    return memcached_set_error(*server, MEMCACHED_ERRNO, MEMCACHED_AT, memcached_literal_param("getaddrinfo(EAI_MEMORY)"));
+    return memcached_set_error(*server, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT, memcached_literal_param("getaddrinfo(EAI_MEMORY)"));
 
   default:
     {
       WATCHPOINT_STRING(server->hostname);
-      WATCHPOINT_STRING(gai_strerror(e));
+      WATCHPOINT_STRING(gai_strerror(errcode));
       return memcached_set_error(*server, MEMCACHED_HOST_LOOKUP_FAILURE, MEMCACHED_AT, memcached_string_make_from_cstr(gai_strerror(errcode)));
     }
   }
   server->address_info_next= server->address_info;
+  server->state= MEMCACHED_SERVER_STATE_ADDRINFO;
 
   return MEMCACHED_SUCCESS;
 }
 
-static inline memcached_return_t set_socket_nonblocking(memcached_server_st *ptr)
+static inline void set_socket_nonblocking(memcached_server_st *ptr)
 {
 #ifdef WIN32
   u_long arg = 1;
   if (ioctlsocket(ptr->fd, FIONBIO, &arg) == SOCKET_ERROR)
   {
-    return memcached_set_errno(*ptr, get_socket_errno(), NULL);
+    memcached_set_errno(*ptr, get_socket_errno(), NULL);
   }
 #else
   int flags;
@@ -189,12 +203,11 @@ static inline memcached_return_t set_socket_nonblocking(memcached_server_st *ptr
   do
   {
     flags= fcntl(ptr->fd, F_GETFL, 0);
-  }
-  while (flags == -1 && (errno == EINTR || errno == EAGAIN));
+  } while (flags == -1 && (errno == EINTR || errno == EAGAIN));
 
-  unlikely (flags == -1)
+  if (flags == -1)
   {
-    return memcached_set_errno(*ptr, errno, NULL);
+    memcached_set_errno(*ptr, errno, NULL);
   }
   else if ((flags & O_NONBLOCK) == 0)
   {
@@ -203,24 +216,22 @@ static inline memcached_return_t set_socket_nonblocking(memcached_server_st *ptr
     do
     {
       rval= fcntl(ptr->fd, F_SETFL, flags | O_NONBLOCK);
-    }
-    while (rval == -1 && (errno == EINTR || errno == EAGAIN));
+    } while (rval == -1 && (errno == EINTR || errno == EAGAIN));
 
     unlikely (rval == -1)
     {
-      return memcached_set_errno(*ptr, errno, NULL);
+      memcached_set_errno(*ptr, errno, NULL);
     }
   }
 #endif
-  return MEMCACHED_SUCCESS;
 }
 
-static memcached_return_t set_socket_options(memcached_server_st *ptr)
+static void set_socket_options(memcached_server_st *ptr)
 {
   WATCHPOINT_ASSERT(ptr->fd != -1);
 
   if (ptr->type == MEMCACHED_CONNECTION_UDP)
-    return MEMCACHED_SUCCESS;
+    return;
 
 #ifdef HAVE_SNDTIMEO
   if (ptr->root->snd_timeout)
@@ -234,8 +245,6 @@ static memcached_return_t set_socket_options(memcached_server_st *ptr)
     error= setsockopt(ptr->fd, SOL_SOCKET, SO_SNDTIMEO,
                       &waittime, (socklen_t)sizeof(struct timeval));
     WATCHPOINT_ASSERT(error == 0);
-    if (error)
-      return MEMCACHED_FAILURE;
   }
 #endif
 
@@ -251,15 +260,13 @@ static memcached_return_t set_socket_options(memcached_server_st *ptr)
     error= setsockopt(ptr->fd, SOL_SOCKET, SO_RCVTIMEO,
                       &waittime, (socklen_t)sizeof(struct timeval));
     WATCHPOINT_ASSERT(error == 0);
-    if (error)
-      return MEMCACHED_FAILURE;
   }
 #endif
 
 
 #if defined(__MACH__) && defined(__APPLE__) || defined(__FreeBSD__)
   {
-    int set = 1;
+    int set= 1;
     int error= setsockopt(ptr->fd, SOL_SOCKET, SO_NOSIGPIPE, (void *)&set, sizeof(int));
 
     // This is not considered a fatal error
@@ -281,8 +288,6 @@ static memcached_return_t set_socket_options(memcached_server_st *ptr)
     error= setsockopt(ptr->fd, SOL_SOCKET, SO_LINGER,
                       &linger, (socklen_t)sizeof(struct linger));
     WATCHPOINT_ASSERT(error == 0);
-    if (error)
-      return MEMCACHED_FAILURE;
   }
 
   if (ptr->root->flags.tcp_nodelay)
@@ -293,8 +298,6 @@ static memcached_return_t set_socket_options(memcached_server_st *ptr)
     error= setsockopt(ptr->fd, IPPROTO_TCP, TCP_NODELAY,
                       &flag, (socklen_t)sizeof(int));
     WATCHPOINT_ASSERT(error == 0);
-    if (error)
-      return MEMCACHED_FAILURE;
   }
 
   if (ptr->root->flags.tcp_keepalive)
@@ -305,8 +308,6 @@ static memcached_return_t set_socket_options(memcached_server_st *ptr)
     error= setsockopt(ptr->fd, SOL_SOCKET, SO_KEEPALIVE,
                       &flag, (socklen_t)sizeof(int));
     WATCHPOINT_ASSERT(error == 0);
-    if (error)
-      return MEMCACHED_FAILURE;
   }
 
 #ifdef TCP_KEEPIDLE
@@ -317,8 +318,6 @@ static memcached_return_t set_socket_options(memcached_server_st *ptr)
     error= setsockopt(ptr->fd, IPPROTO_TCP, TCP_KEEPIDLE,
                       &ptr->root->tcp_keepidle, (socklen_t)sizeof(int));
     WATCHPOINT_ASSERT(error == 0);
-    if (error)
-      return MEMCACHED_FAILURE;
   }
 #endif
 
@@ -329,8 +328,6 @@ static memcached_return_t set_socket_options(memcached_server_st *ptr)
     error= setsockopt(ptr->fd, SOL_SOCKET, SO_SNDBUF,
                       &ptr->root->send_size, (socklen_t)sizeof(int));
     WATCHPOINT_ASSERT(error == 0);
-    if (error)
-      return MEMCACHED_FAILURE;
   }
 
   if (ptr->root->recv_size > 0)
@@ -340,13 +337,11 @@ static memcached_return_t set_socket_options(memcached_server_st *ptr)
     error= setsockopt(ptr->fd, SOL_SOCKET, SO_RCVBUF,
                       &ptr->root->recv_size, (socklen_t)sizeof(int));
     WATCHPOINT_ASSERT(error == 0);
-    if (error)
-      return MEMCACHED_FAILURE;
   }
 
 
   /* libmemcached will always use nonblocking IO to avoid write deadlocks */
-  return set_socket_nonblocking(ptr);
+  set_socket_nonblocking(ptr);
 }
 
 static memcached_return_t unix_socket_connect(memcached_server_st *ptr)
@@ -365,25 +360,29 @@ static memcached_return_t unix_socket_connect(memcached_server_st *ptr)
   servAddr.sun_family= AF_UNIX;
   strncpy(servAddr.sun_path, ptr->hostname, sizeof(servAddr.sun_path)); /* Copy filename */
 
-test_connect:
-  if (connect(ptr->fd,
-              (struct sockaddr *)&servAddr,
-              sizeof(servAddr)) < 0)
-  {
-    switch (errno)
+  do {
+    if (connect(ptr->fd, (struct sockaddr *)&servAddr, sizeof(servAddr)) < 0)
     {
-    case EINPROGRESS:
-    case EALREADY:
-    case EINTR:
-      goto test_connect;
-    case EISCONN: /* We were spinning waiting on connect */
-      break;
-    default:
-      WATCHPOINT_ERRNO(errno);
-      ptr->cached_errno= errno;
-      return MEMCACHED_ERRNO;
+      switch (errno)
+      {
+      case EINPROGRESS:
+      case EALREADY:
+      case EINTR:
+        continue;
+
+      case EISCONN: /* We were spinning waiting on connect */
+        {
+          WATCHPOINT_ASSERT(0); // Programmer error
+          break;
+        }
+
+      default:
+        WATCHPOINT_ERRNO(errno);
+        return memcached_set_errno(*ptr, errno, MEMCACHED_AT);
+      }
     }
-  }
+  } while (0);
+  ptr->state= MEMCACHED_SERVER_STATE_CONNECTED;
 
   WATCHPOINT_ASSERT(ptr->fd != INVALID_SOCKET);
 
@@ -403,6 +402,7 @@ static memcached_return_t network_connect(memcached_server_st *ptr)
 
   if (not ptr->address_info)
   {
+    WATCHPOINT_ASSERT(ptr->state == MEMCACHED_SERVER_STATE_NEW);
     memcached_return_t rc;
     uint32_t counter= 5;
     while (--counter)
@@ -441,68 +441,88 @@ static memcached_return_t network_connect(memcached_server_st *ptr)
       return memcached_set_errno(*ptr, get_socket_errno(), NULL);
     }
 
-    (void)set_socket_options(ptr);
+    set_socket_options(ptr);
 
     /* connect to server */
     if ((connect(ptr->fd, ptr->address_info_next->ai_addr, ptr->address_info_next->ai_addrlen) != SOCKET_ERROR))
     {
+      ptr->state= MEMCACHED_SERVER_STATE_CONNECTED;
       break; // Success
     }
 
     /* An error occurred */
-    ptr->cached_errno= get_socket_errno();
-    switch (ptr->cached_errno) 
+    switch (get_socket_errno())
     {
+    case ETIMEDOUT:
+      timeout_error_occured= true;
+      break;
+
     case EWOULDBLOCK:
     case EINPROGRESS: // nonblocking mode - first return
     case EALREADY: // nonblocking mode - subsequent returns
       {
-        memcached_return_t rc;
-        rc= connect_poll(ptr);
+        ptr->state= MEMCACHED_SERVER_STATE_IN_PROGRESS;
+        memcached_return_t rc= connect_poll(ptr);
 
+        if (memcached_success(rc))
+        {
+          ptr->state= MEMCACHED_SERVER_STATE_CONNECTED;
+          return MEMCACHED_SUCCESS;
+        }
+
+        // A timeout here is treated as an error, we will not retry
         if (rc == MEMCACHED_TIMEOUT)
+        {
           timeout_error_occured= true;
-
-        if (rc == MEMCACHED_SUCCESS)
-          break;
+        }
       }
+      break;
 
     case EISCONN: // we are connected :-)
+      WATCHPOINT_ASSERT(0); // This is a programmer's error
       break;
 
     case EINTR: // Special case, we retry ai_addr
+      WATCHPOINT_ASSERT(ptr->fd != INVALID_SOCKET);
       (void)closesocket(ptr->fd);
       ptr->fd= INVALID_SOCKET;
       continue;
 
     default:
-      (void)closesocket(ptr->fd);
-      ptr->fd= INVALID_SOCKET;
-      ptr->address_info_next= ptr->address_info_next->ai_next;
       break;
     }
+
+    WATCHPOINT_ASSERT(ptr->fd != INVALID_SOCKET);
+    (void)closesocket(ptr->fd);
+    ptr->fd= INVALID_SOCKET;
+    ptr->address_info_next= ptr->address_info_next->ai_next;
   }
 
-  if (ptr->fd == INVALID_SOCKET)
-  {
-    WATCHPOINT_STRING("Never got a good file descriptor");
+  WATCHPOINT_ASSERT(ptr->fd == INVALID_SOCKET);
 
-    /* Failed to connect. schedule next retry */
-    if (ptr->root->retry_timeout)
+  if (timeout_error_occured)
+  {
+    if (ptr->fd != INVALID_SOCKET)
     {
-      struct timeval next_time;
-
-      if (gettimeofday(&next_time, NULL) == 0)
-        ptr->next_retry= next_time.tv_sec + ptr->root->retry_timeout;
+      (void)closesocket(ptr->fd);
+      ptr->fd= INVALID_SOCKET;
     }
+  }
 
-    if (timeout_error_occured)
-      return MEMCACHED_TIMEOUT;
+  WATCHPOINT_STRING("Never got a good file descriptor");
+  /* Failed to connect. schedule next retry */
+  if (ptr->root->retry_timeout)
+  {
+    struct timeval next_time;
 
-    return MEMCACHED_ERRNO; /* The last error should be from connect() */
+    if (gettimeofday(&next_time, NULL) == 0)
+      ptr->next_retry= next_time.tv_sec + ptr->root->retry_timeout;
   }
 
-  return MEMCACHED_SUCCESS; /* The last error should be from connect() */
+  if (timeout_error_occured)
+    return memcached_set_error(*ptr, MEMCACHED_TIMEOUT, MEMCACHED_AT);
+
+  return memcached_set_error(*ptr, MEMCACHED_CONNECTION_FAILURE, MEMCACHED_AT); /* The last error should be from connect() */
 }
 
 void set_last_disconnected_host(memcached_server_write_instance_st self)
@@ -542,7 +562,7 @@ memcached_return_t memcached_connect(memcached_server_write_instance_st ptr)
     {
       set_last_disconnected_host(ptr);
 
-      return MEMCACHED_SERVER_MARKED_DEAD;
+      return memcached_set_error(*ptr, MEMCACHED_SERVER_MARKED_DEAD, MEMCACHED_AT);
     }
   }
 
@@ -559,7 +579,7 @@ memcached_return_t memcached_connect(memcached_server_write_instance_st ptr)
       run_distribution((memcached_st *)ptr->root);
     }
 
-    return MEMCACHED_SERVER_MARKED_DEAD;
+    return memcached_set_error(*ptr, MEMCACHED_SERVER_MARKED_DEAD, MEMCACHED_AT);
   }
 
   /* We need to clean up the multi startup piece */
@@ -574,11 +594,12 @@ memcached_return_t memcached_connect(memcached_server_write_instance_st ptr)
   case MEMCACHED_CONNECTION_TCP:
     rc= network_connect(ptr);
 #ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
-    if (ptr->fd != INVALID_SOCKET && ptr->root->sasl.callbacks)
+    if (ptr->fd != INVALID_SOCKET and ptr->root->sasl.callbacks)
     {
       rc= memcached_sasl_authenticate_connection(ptr);
-      if (memcached_failed(rc))
+      if (memcached_failed(rc) and ptr->fd != INVALID_SOCKET)
       {
+        WATCHPOINT_ASSERT(ptr->fd != INVALID_SOCKET);
         (void)closesocket(ptr->fd);
         ptr->fd= INVALID_SOCKET;
       }
@@ -602,8 +623,8 @@ memcached_return_t memcached_connect(memcached_server_write_instance_st ptr)
   }
   else
   {
+    memcached_set_error(*ptr, rc, MEMCACHED_AT);
     ptr->server_failure_counter++;
-
     set_last_disconnected_host(ptr);
   }
 
index 976a31d8ada8b558a034f3f962b2288cd01d06aa..2cf2767190ef24e26996fc222c1930e586e7f9b9 100644 (file)
@@ -53,6 +53,7 @@
 #define MEMCACHED_PREFIX_KEY_MAX_SIZE 128
 #define MEMCACHED_EXPIRATION_NOT_ADD 0xffffffffU
 #define MEMCACHED_VERSION_STRING_LENGTH 24
+#define MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH 20
 
 
 enum memcached_server_distribution_t {
index 1005cb90987d46ab442cf3438e56c8c5b59df7ab..1ae891a7bea073a4b1dda5763de5b6126faf6011 100644 (file)
@@ -158,6 +158,7 @@ memcached_return_t memcached_delete_by_key(memcached_st *ptr,
     {
       if (send_length > MAX_UDP_DATAGRAM_LENGTH - UDP_DATAGRAM_HEADER_LENGTH)
         return MEMCACHED_WRITE_FAILURE;
+
       if (send_length + instance->write_buffer_offset > MAX_UDP_DATAGRAM_LENGTH)
         memcached_io_write(instance, NULL, 0, true);
     }
@@ -216,6 +217,7 @@ static inline memcached_return_t binary_delete(memcached_st *ptr,
     size_t cmd_size= sizeof(request.bytes) + key_length;
     if (cmd_size > MAX_UDP_DATAGRAM_LENGTH - UDP_DATAGRAM_HEADER_LENGTH)
       return MEMCACHED_WRITE_FAILURE;
+
     if (cmd_size + instance->write_buffer_offset > MAX_UDP_DATAGRAM_LENGTH)
       memcached_io_write(instance, NULL, 0, true);
   }
index 14824a641aec79c659c8fbdc8f94ae912894f176..854c611497c36b60a2286450cbb2b05f75861a54 100644 (file)
@@ -9,7 +9,7 @@
  *
  */
 
-#include "common.h"
+#include <libmemcached/common.h>
 
 memcached_return_t memcached_do(memcached_server_write_instance_st ptr, const void *command,
                                 size_t command_length, bool with_flush)
@@ -20,8 +20,9 @@ memcached_return_t memcached_do(memcached_server_write_instance_st ptr, const vo
   WATCHPOINT_ASSERT(command_length);
   WATCHPOINT_ASSERT(command);
 
-  if ((rc= memcached_connect(ptr)) != MEMCACHED_SUCCESS)
+  if (memcached_failed(rc= memcached_connect(ptr)))
   {
+    WATCHPOINT_ASSERT(rc == memcached_last_error(ptr->root));
     WATCHPOINT_ERROR(rc);
     return rc;
   }
index aaf0015dfdc2d7b1dd3b9da1f8c1e73e05924736..5cfb4be29f6f3c45e9699c472b8f2520b65f90cf 100644 (file)
@@ -36,6 +36,7 @@
  */
 
 #include <libmemcached/common.h>
+#include <cassert>
 
 #define MAX_ERROR_LENGTH 2048
 struct memcached_error_t
@@ -60,7 +61,6 @@ static void _set(memcached_st& memc, memcached_string_t *str, memcached_return_t
   // For memory allocation we use our error since it is a bit more specific
   if (local_errno == ENOMEM and rc == MEMCACHED_ERRNO)
   {
-    local_errno= ENOMEM;
     rc= MEMCACHED_MEMORY_ALLOCATION_FAILURE;
   }
 
@@ -75,6 +75,21 @@ static void _set(memcached_st& memc, memcached_string_t *str, memcached_return_t
     rc= MEMCACHED_ERRNO;
   }
 
+  if (rc == MEMCACHED_ERRNO and local_errno == ENOTCONN)
+  {
+    rc= MEMCACHED_CONNECTION_FAILURE;
+  }
+
+  if (local_errno == EINVAL)
+  {
+    rc= MEMCACHED_INVALID_ARGUMENTS;
+  }
+
+  if (local_errno == ECONNREFUSED)
+  {
+    rc= MEMCACHED_CONNECTION_FAILURE;
+  }
+
   memcached_error_t *error= (struct memcached_error_t *)libmemcached_malloc(&memc, sizeof(struct memcached_error_t));
   if (not error) // Bad business if this happens
     return;
@@ -84,16 +99,46 @@ static void _set(memcached_st& memc, memcached_string_t *str, memcached_return_t
   error->rc= rc;
   error->local_errno= local_errno;
 
-  if (str)
+  const char *errmsg_ptr;
+  char errmsg[MAX_ERROR_LENGTH];
+  errmsg[0]= 0;
+  errmsg_ptr= errmsg;
+
+  if (local_errno)
+  {
+#ifdef STRERROR_R_CHAR_P
+    errmsg_ptr= strerror_r(local_errno, errmsg, sizeof(errmsg));
+#else
+    strerror_r(local_errno, errmsg, sizeof(errmsg));
+    errmsg_ptr= errmsg;
+#endif
+  }
+
+
+  if (str and str->size and local_errno)
+  {
+    error->size= (int)snprintf(error->message, MAX_ERROR_LENGTH, "%s(%s), %.*s -> %s", 
+                               memcached_strerror(&memc, rc), 
+                               errmsg_ptr,
+                               memcached_string_printf(*str), at);
+  }
+  else if (local_errno)
   {
-    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;
+    error->size= (int)snprintf(error->message, MAX_ERROR_LENGTH, "%s(%s) -> %s", 
+                               memcached_strerror(&memc, rc), 
+                               errmsg_ptr,
+                               at);
+  }
+  else if (str and str->size)
+  {
+    error->size= (int)snprintf(error->message, MAX_ERROR_LENGTH, "%s, %.*s -> %s", 
+                               memcached_strerror(&memc, rc), 
+                               int(str->size), str->c_str, at);
   }
   else
   {
-    error->size= 0;
+    error->size= (int)snprintf(error->message, MAX_ERROR_LENGTH, "%s -> %s", 
+                               memcached_strerror(&memc, rc), at);
   }
 
   error->next= memc.error_messages;
@@ -102,18 +147,21 @@ static void _set(memcached_st& memc, memcached_string_t *str, memcached_return_t
 
 memcached_return_t memcached_set_error(memcached_st& memc, memcached_return_t rc, const char *at, const char *str, size_t length)
 {
+  assert(rc != MEMCACHED_ERRNO);
   memcached_string_t tmp= { str, length };
   return memcached_set_error(memc, rc, at, tmp);
 }
 
 memcached_return_t memcached_set_error(memcached_server_st& self, memcached_return_t rc, const char *at, const char *str, size_t length)
 {
+  assert(rc != MEMCACHED_ERRNO);
   memcached_string_t tmp= { str, length };
   return memcached_set_error(self, rc, at, tmp);
 }
 
 memcached_return_t memcached_set_error(memcached_st& memc, memcached_return_t rc, const char *at, memcached_string_t& str)
 {
+  assert(rc != MEMCACHED_ERRNO);
   if (memcached_success(rc))
     return MEMCACHED_SUCCESS;
 
@@ -124,6 +172,7 @@ memcached_return_t memcached_set_error(memcached_st& memc, memcached_return_t rc
 
 memcached_return_t memcached_set_error(memcached_server_st& self, memcached_return_t rc, const char *at, memcached_string_t& str)
 {
+  assert(rc != MEMCACHED_ERRNO);
   if (memcached_success(rc))
     return MEMCACHED_SUCCESS;
 
@@ -153,6 +202,7 @@ memcached_return_t memcached_set_error(memcached_server_st& self, memcached_retu
 
 memcached_return_t memcached_set_error(memcached_server_st& self, memcached_return_t rc, const char *at)
 {
+  assert(rc != MEMCACHED_ERRNO);
   if (memcached_success(rc))
     return MEMCACHED_SUCCESS;
 
@@ -171,6 +221,7 @@ memcached_return_t memcached_set_error(memcached_server_st& self, memcached_retu
 
 memcached_return_t memcached_set_error(memcached_st& self, memcached_return_t rc, const char *at)
 {
+  assert(rc != MEMCACHED_ERRNO);
   if (memcached_success(rc))
     return MEMCACHED_SUCCESS;
 
@@ -332,6 +383,19 @@ const char *memcached_last_error_message(memcached_st *memc)
   return memc->error_messages->message;
 }
 
+
+bool memcached_has_current_error(memcached_st &memc)
+{
+  if (memc.error_messages 
+      and memc.error_messages->query_id == memc.query_id
+      and memcached_failed(memc.error_messages->rc))
+  {
+    return true;
+  }
+
+  return false;
+}
+
 memcached_return_t memcached_last_error(memcached_st *memc)
 {
   if (not memc)
index c3c83fade2c3a16f9d7a54385e69b0e0d5522dbc..1c683fc5d7e5d2bf155af42a53fc0a2e75b23cba 100644 (file)
@@ -81,4 +81,7 @@ LIBMEMCACHED_LOCAL
 LIBMEMCACHED_LOCAL
   memcached_return_t memcached_set_errno(memcached_server_st&, int local_errno, const char *at);
 
+LIBMEMCACHED_LOCAL
+bool memcached_has_current_error(memcached_st &memc);
+
 #endif
index 71d5820b6c7bc6f72a95987ee665c4440dece2c9..dd0b036d8433cecc7177e54f9c40912f1a2a5b0c 100644 (file)
@@ -50,37 +50,72 @@ char *memcached_fetch(memcached_st *ptr, char *key, size_t *key_length,
 
   unlikely (ptr->flags.use_udp)
   {
+    if (value_length)
+      *value_length= 0;
+
+    if (key_length)
+      *key_length= 0;
+
+    if (flags)
+      *flags= 0;
+
+    if (key)
+      *key= 0;
+
     *error= MEMCACHED_NOT_SUPPORTED;
     return NULL;
   }
 
   result_buffer= memcached_fetch_result(ptr, result_buffer, error);
-
-  if (result_buffer == NULL || *error != MEMCACHED_SUCCESS)
+  if (result_buffer == NULL or memcached_failed(*error))
   {
     WATCHPOINT_ASSERT(result_buffer == NULL);
-    *value_length= 0;
+    if (value_length)
+      *value_length= 0;
+
+    if (key_length)
+      *key_length= 0;
+
+    if (flags)
+      *flags= 0;
+
+    if (key)
+      *key= 0;
+
     return NULL;
   }
 
-  *value_length= memcached_string_length(&result_buffer->value);
+  if (value_length)
+    *value_length= memcached_string_length(&result_buffer->value);
 
   if (key)
   {
     if (result_buffer->key_length > MEMCACHED_MAX_KEY)
     {
       *error= MEMCACHED_KEY_TOO_BIG;
-      *value_length= 0;
+      if (value_length)
+        *value_length= 0;
+
+    if (key_length)
+      *key_length= 0;
+
+    if (flags)
+      *flags= 0;
+
+    if (key)
+      *key= 0;
 
       return NULL;
     }
     strncpy(key, result_buffer->item_key, result_buffer->key_length); // For the binary protocol we will cut off the key :(
-    *key_length= result_buffer->key_length;
+    if (key_length)
+      *key_length= result_buffer->key_length;
   }
 
-  *flags= result_buffer->item_flags;
+  if (flags)
+    *flags= result_buffer->item_flags;
 
-  return memcached_string_c_copy(&result_buffer->value);
+  return memcached_string_take_value(&result_buffer->value);
 }
 
 memcached_result_st *memcached_fetch_result(memcached_st *ptr,
@@ -89,27 +124,80 @@ memcached_result_st *memcached_fetch_result(memcached_st *ptr,
 {
   memcached_server_st *server;
 
-  unlikely (ptr->flags.use_udp)
+  memcached_return_t unused;
+  if (not error)
+    error= &unused;
+
+  if (not ptr)
+  {
+    *error= MEMCACHED_INVALID_ARGUMENTS;
+    return NULL;
+  }
+
+  if (ptr->flags.use_udp)
   {
     *error= MEMCACHED_NOT_SUPPORTED;
     return NULL;
   }
 
-  if (result == NULL)
-    if ((result= memcached_result_create(ptr, NULL)) == NULL)
-      return NULL;
+  if (not result)
+  {
+    // If we have already initialized (ie it is in use) our internal, we
+    // create one.
+    if (memcached_is_initialized(&ptr->result))
+    {
+      if (not (result= memcached_result_create(ptr, NULL)))
+      {
+        *error= MEMCACHED_MEMORY_ALLOCATION_FAILURE;
+        return NULL;
+      }
+    }
+    else
+    {
+      result= memcached_result_create(ptr, &ptr->result);
+    }
+  }
 
-  while ((server= memcached_io_get_readable_server(ptr)) != NULL) 
+  *error= MEMCACHED_MAXIMUM_RETURN; // We use this to see if we ever go into the loop
+  while ((server= memcached_io_get_readable_server(ptr)))
   {
     char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
     *error= memcached_response(server, buffer, sizeof(buffer), result);
 
     if (*error == MEMCACHED_SUCCESS)
+    {
+      result->count++;
       return result;
+    }
     else if (*error == MEMCACHED_END)
+    {
       memcached_server_response_reset(server);
+    }
     else if (*error != MEMCACHED_NOTFOUND)
+    {
       break;
+    }
+  }
+
+  if (*error == MEMCACHED_NOTFOUND and result->count)
+  {
+    *error= MEMCACHED_END;
+  }
+  else if (*error == MEMCACHED_MAXIMUM_RETURN and result->count)
+  {
+    *error= MEMCACHED_END;
+  }
+  else if (*error == MEMCACHED_MAXIMUM_RETURN) // while() loop was never entered
+  {
+    *error= MEMCACHED_NOTFOUND;
+  }
+  else if (*error == MEMCACHED_SUCCESS)
+  {
+    *error= MEMCACHED_END;
+  }
+  else if (result->count == 0)
+  {
+    *error= MEMCACHED_NOTFOUND;
   }
 
   /* We have completed reading data */
@@ -119,6 +207,7 @@ memcached_result_st *memcached_fetch_result(memcached_st *ptr,
   }
   else
   {
+    result->count= 0;
     memcached_string_reset(&result->value);
   }
 
@@ -131,19 +220,45 @@ memcached_return_t memcached_fetch_execute(memcached_st *ptr,
                                            uint32_t number_of_callbacks)
 {
   memcached_result_st *result= &ptr->result;
-  memcached_return_t rc= MEMCACHED_FAILURE;
+  memcached_return_t rc;
+  bool some_errors= false;
 
-  while ((result= memcached_fetch_result(ptr, result, &rc)) != NULL) 
+  while ((result= memcached_fetch_result(ptr, result, &rc)))
   {
-    if (rc == MEMCACHED_SUCCESS)
+    if (memcached_failed(rc) and rc == MEMCACHED_NOTFOUND)
+    {
+      continue;
+    }
+    else if (memcached_failed(rc))
+    {
+      memcached_set_error(*ptr, rc, MEMCACHED_AT);
+      some_errors= true;
+      continue;
+    }
+
+    for (uint32_t x= 0; x < number_of_callbacks; x++)
     {
-      for (uint32_t x= 0; x < number_of_callbacks; x++)
+      memcached_return_t ret= (*callback[x])(ptr, result, context);
+      if (memcached_failed(ret))
       {
-        rc= (*callback[x])(ptr, result, context);
-        if (rc != MEMCACHED_SUCCESS)
-          break;
+        some_errors= true;
+        memcached_set_error(*ptr, ret, MEMCACHED_AT);
+        break;
       }
     }
   }
+
+  if (some_errors)
+  {
+    return MEMCACHED_SOME_ERRORS;
+  }
+
+  // If we were able to run all keys without issue we return
+  // MEMCACHED_SUCCESS
+  if (memcached_success(rc))
+  {
+    return MEMCACHED_SUCCESS;
+  }
+
   return rc;
 }
index 29d01bc8c293d6d2a844b541af67e871a7f4fafb..0cef87f5120021a1ce5be905d02699c894c4d0c2 100644 (file)
@@ -1,15 +1,42 @@
-/* LibMemcached
- * Copyright (C) 2006-2009 Brian Aker
- * All rights reserved.
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached library
  *
- * Use and distribution licensed under the BSD license.  See
- * the COPYING file in the parent directory for full text.
+ *  Copyright (C) 2011 Data Differential, http://datadifferential.com/
+ *  Copyright (C) 2006-2009 Brian Aker All rights reserved.
  *
- * Summary: Get functions for libmemcached
+ *  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 "common.h"
+#include <libmemcached/common.h>
+#include <cassert>
 
 /*
   What happens if no servers exist?
@@ -40,24 +67,42 @@ char *memcached_get_by_key(memcached_st *ptr,
                            uint32_t *flags,
                            memcached_return_t *error)
 {
-  char *value;
-  size_t dummy_length;
-  uint32_t dummy_flags;
-  memcached_return_t dummy_error;
-
   unlikely (ptr->flags.use_udp)
   {
-    *error= MEMCACHED_NOT_SUPPORTED;
+    if (value_length) 
+      *value_length= 0;
+
+    *error= memcached_set_error(*ptr, MEMCACHED_NOT_SUPPORTED, MEMCACHED_AT);
     return NULL;
   }
 
+  uint64_t query_id= ptr->query_id;
+  (void)query_id;
+
   /* Request the key */
   *error= memcached_mget_by_key_real(ptr, group_key, group_key_length,
                                      (const char * const *)&key,
                                      &key_length, 1, false);
+  assert(ptr->query_id == query_id +1);
+
+
+  if (memcached_failed(*error))
+  {
+    if (memcached_has_current_error(*ptr)) // Find the most accurate error
+    {
+      *error= memcached_last_error(ptr);
+    }
+
+    if (value_length) 
+      *value_length= 0;
+
+    return NULL;
+  }
+
+  char *value= memcached_fetch(ptr, NULL, NULL,
+                               value_length, flags, error);
+  assert(ptr->query_id == query_id +1);
 
-  value= memcached_fetch(ptr, NULL, NULL,
-                         value_length, flags, error);
   /* This is for historical reasons */
   if (*error == MEMCACHED_END)
     *error= MEMCACHED_NOTFOUND;
@@ -66,10 +111,8 @@ char *memcached_get_by_key(memcached_st *ptr,
   {
     if (ptr->get_key_failure && *error == MEMCACHED_NOTFOUND)
     {
-      memcached_return_t rc;
-
       memcached_result_reset(&ptr->result);
-      rc= ptr->get_key_failure(ptr, key, key_length, &ptr->result);
+      memcached_return_t rc= ptr->get_key_failure(ptr, key, key_length, &ptr->result);
 
       /* On all failure drop to returning NULL */
       if (rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED)
@@ -88,7 +131,9 @@ char *memcached_get_by_key(memcached_st *ptr,
                             (memcached_result_flags(&ptr->result)));
 
           if (rc == MEMCACHED_BUFFERED && latch == 0)
+          {
             memcached_behavior_set(ptr, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, 0);
+          }
         }
         else
         {
@@ -104,18 +149,25 @@ char *memcached_get_by_key(memcached_st *ptr,
           *error= rc;
           *value_length= memcached_result_length(&ptr->result);
           *flags= memcached_result_flags(&ptr->result);
-          return memcached_string_c_copy(&ptr->result.value);
+          return memcached_string_take_value(&ptr->result.value);
         }
       }
     }
+    assert(ptr->query_id == query_id +1);
 
     return NULL;
   }
 
-  (void)memcached_fetch(ptr, NULL, NULL,
-                        &dummy_length, &dummy_flags,
-                        &dummy_error);
+  size_t dummy_length;
+  uint32_t dummy_flags;
+  memcached_return_t dummy_error;
+
+  char *dummy_value= memcached_fetch(ptr, NULL, NULL,
+                                     &dummy_length, &dummy_flags,
+                                     &dummy_error);
   WATCHPOINT_ASSERT(dummy_length == 0);
+  WATCHPOINT_ASSERT(dummy_value == 0);
+  assert(ptr->query_id == query_id +1);
 
   return value;
 }
@@ -148,7 +200,6 @@ static memcached_return_t memcached_mget_by_key_real(memcached_st *ptr,
   const char *get_command= "get ";
   uint8_t get_command_length= 4;
   unsigned int master_server_key= (unsigned int)-1; /* 0 is a valid server id! */
-  bool is_group_key_set= false;
 
   memcached_return_t rc;
   if (memcached_failed(rc= initialize_query(ptr)))
@@ -157,22 +208,29 @@ static memcached_return_t memcached_mget_by_key_real(memcached_st *ptr,
   }
 
   unlikely (ptr->flags.use_udp)
-    return MEMCACHED_NOT_SUPPORTED;
+  {
+    return memcached_set_error(*ptr, MEMCACHED_NOT_SUPPORTED, MEMCACHED_AT);
+  }
 
   LIBMEMCACHED_MEMCACHED_MGET_START();
 
   if (number_of_keys == 0)
-    return MEMCACHED_NOTFOUND;
+  {
+    return memcached_set_error(*ptr, MEMCACHED_NOTFOUND, MEMCACHED_AT, memcached_literal_param("number_of_keys was zero"));
+  }
 
   if (ptr->flags.verify_key && (memcached_key_test(keys, key_length, number_of_keys) == MEMCACHED_BAD_KEY_PROVIDED))
   {
-    return MEMCACHED_BAD_KEY_PROVIDED;
+    return memcached_set_error(*ptr, MEMCACHED_BAD_KEY_PROVIDED, MEMCACHED_AT, memcached_literal_param("A bad key value was provided"));
   }
 
+  bool is_group_key_set= false;
   if (group_key && group_key_length)
   {
     if (ptr->flags.verify_key and (memcached_key_test((const char * const *)&group_key, &group_key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED))
-      return MEMCACHED_BAD_KEY_PROVIDED;
+    {
+      return memcached_set_error(*ptr, MEMCACHED_BAD_KEY_PROVIDED, MEMCACHED_AT, memcached_literal_param("A bad group key was provided."));
+    }
 
     master_server_key= memcached_generate_hash_with_redistribution(ptr, group_key, group_key_length);
     is_group_key_set= true;
@@ -248,8 +306,9 @@ static memcached_return_t memcached_mget_by_key_real(memcached_st *ptr,
     {
       rc= memcached_connect(instance);
 
-      if (rc != MEMCACHED_SUCCESS)
+      if (memcached_failed(rc))
       {
+        memcached_set_error(*instance, rc, MEMCACHED_AT);
         continue;
       }
       hosts_connected++;
@@ -278,10 +337,10 @@ static memcached_return_t memcached_mget_by_key_real(memcached_st *ptr,
   {
     LIBMEMCACHED_MEMCACHED_MGET_END();
 
-    if (rc != MEMCACHED_SUCCESS)
+    if (memcached_failed(rc))
       return rc;
 
-    return MEMCACHED_NO_SERVERS;
+    return memcached_set_error(*ptr, MEMCACHED_NO_SERVERS, MEMCACHED_AT);
   }
 
 
@@ -311,12 +370,14 @@ static memcached_return_t memcached_mget_by_key_real(memcached_st *ptr,
   LIBMEMCACHED_MEMCACHED_MGET_END();
 
   if (failures_occured_in_sending && success_happened)
+  {
     return MEMCACHED_SOME_ERRORS;
+  }
 
   if (success_happened)
     return MEMCACHED_SUCCESS;
 
-  return MEMCACHED_FAILURE;
+  return MEMCACHED_FAILURE; // Complete failure occurred
 }
 
 memcached_return_t memcached_mget_by_key(memcached_st *ptr,
@@ -389,7 +450,6 @@ static memcached_return_t simple_binary_mget(memcached_st *ptr,
   for (uint32_t x= 0; x < number_of_keys; ++x)
   {
     uint32_t server_key;
-    memcached_server_write_instance_st instance;
 
     if (is_group_key_set)
     {
@@ -400,12 +460,12 @@ static memcached_return_t simple_binary_mget(memcached_st *ptr,
       server_key= memcached_generate_hash_with_redistribution(ptr, keys[x], key_length[x]);
     }
 
-    instance= memcached_server_instance_fetch(ptr, server_key);
+    memcached_server_write_instance_st instance= memcached_server_instance_fetch(ptr, server_key);
 
     if (memcached_server_response_count(instance) == 0)
     {
       rc= memcached_connect(instance);
-      if (rc != MEMCACHED_SUCCESS)
+      if (memcached_failed(rc))
         continue;
     }
 
@@ -516,8 +576,6 @@ static memcached_return_t replication_binary_mget(memcached_st *ptr,
 
     for (uint32_t x= 0; x < number_of_keys; ++x)
     {
-      memcached_server_write_instance_st instance;
-
       if (hash[x] == memcached_server_count(ptr))
         continue; /* Already successfully sent */
 
@@ -533,12 +591,12 @@ static memcached_return_t replication_binary_mget(memcached_st *ptr,
       if (dead_servers[server])
         continue;
 
-      instance= memcached_server_instance_fetch(ptr, server);
+      memcached_server_write_instance_st instance= memcached_server_instance_fetch(ptr, server);
 
       if (memcached_server_response_count(instance) == 0)
       {
         rc= memcached_connect(instance);
-        if (rc != MEMCACHED_SUCCESS)
+        if (memcached_failed(rc))
         {
           memcached_io_reset(instance);
           dead_servers[server]= true;
@@ -598,51 +656,43 @@ static memcached_return_t binary_mget_by_key(memcached_st *ptr,
                                              size_t number_of_keys,
                                              bool mget_mode)
 {
-  memcached_return_t rc;
-
   if (ptr->number_of_replicas == 0)
   {
-    rc= simple_binary_mget(ptr, master_server_key, is_group_key_set,
-                           keys, key_length, number_of_keys, mget_mode);
+    return simple_binary_mget(ptr, master_server_key, is_group_key_set,
+                              keys, key_length, number_of_keys, mget_mode);
   }
-  else
-  {
-    uint32_t* hash;
-    bool* dead_servers;
 
-    hash= static_cast<uint32_t*>(libmemcached_malloc(ptr, sizeof(uint32_t) * number_of_keys));
-    dead_servers= static_cast<bool*>(libmemcached_calloc(ptr, memcached_server_count(ptr), sizeof(bool)));
+  uint32_t* hash= static_cast<uint32_t*>(libmemcached_malloc(ptr, sizeof(uint32_t) * number_of_keys));
+  bool* dead_servers= static_cast<bool*>(libmemcached_calloc(ptr, memcached_server_count(ptr), sizeof(bool)));
 
-    if (hash == NULL || dead_servers == NULL)
-    {
-      libmemcached_free(ptr, hash);
-      libmemcached_free(ptr, dead_servers);
-      return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
-    }
+  if (hash == NULL || dead_servers == NULL)
+  {
+    libmemcached_free(ptr, hash);
+    libmemcached_free(ptr, dead_servers);
+    return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
+  }
 
-    if (is_group_key_set)
+  if (is_group_key_set)
+  {
+    for (size_t x= 0; x < number_of_keys; x++)
     {
-      for (size_t x= 0; x < number_of_keys; x++)
-      {
-        hash[x]= master_server_key;
-      }
+      hash[x]= master_server_key;
     }
-    else
+  }
+  else
+  {
+    for (size_t x= 0; x < number_of_keys; x++)
     {
-      for (size_t x= 0; x < number_of_keys; x++)
-      {
-        hash[x]= memcached_generate_hash_with_redistribution(ptr, keys[x], key_length[x]);
-      }
+      hash[x]= memcached_generate_hash_with_redistribution(ptr, keys[x], key_length[x]);
     }
+  }
 
-    rc= replication_binary_mget(ptr, hash, dead_servers, keys,
-                                key_length, number_of_keys);
-
-    libmemcached_free(ptr, hash);
-    libmemcached_free(ptr, dead_servers);
+  memcached_return_t rc= replication_binary_mget(ptr, hash, dead_servers, keys,
+                                                 key_length, number_of_keys);
 
-    return MEMCACHED_SUCCESS;
-  }
+  WATCHPOINT_IFERROR(rc);
+  libmemcached_free(ptr, hash);
+  libmemcached_free(ptr, dead_servers);
 
-  return rc;
+  return MEMCACHED_SUCCESS;
 }
index 5eca0c6f9eb9f4fb6f0381c34c14951f752490a5..e239320d3b02f26451ae730843838245b1e4a015 100644 (file)
@@ -62,7 +62,7 @@ static uint32_t dispatch_host(const memcached_st *ptr, uint32_t hash)
   case MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY:
     {
       uint32_t num= ptr->ketama.continuum_points_counter;
-      WATCHPOINT_ASSERT(ptr->continuum);
+      WATCHPOINT_ASSERT(ptr->ketama.continuum);
 
       hash= hash;
       memcached_continuum_item_st *begin, *end, *left, *right, *middle;
index 10af05c8eb83e38f72887450cccf981bbf88e10d..32bf8ce37d9301bd6139feb77aecb041e1e3a07b 100644 (file)
@@ -186,7 +186,7 @@ static memcached_return_t update_continuum(memcached_st *ptr)
     memcached_continuum_item_st *new_ptr;
 
     new_ptr= static_cast<memcached_continuum_item_st*>(libmemcached_realloc(ptr, ptr->ketama.continuum,
-                                                                           sizeof(memcached_continuum_item_st) * (live_servers + MEMCACHED_CONTINUUM_ADDITION) * points_per_server));
+                                                                            sizeof(memcached_continuum_item_st) * (live_servers + MEMCACHED_CONTINUUM_ADDITION) * points_per_server));
 
     if (new_ptr == 0)
       return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
@@ -325,7 +325,7 @@ static memcached_return_t update_continuum(memcached_st *ptr)
   }
 
   WATCHPOINT_ASSERT(ptr);
-  WATCHPOINT_ASSERT(ptr->continuum);
+  WATCHPOINT_ASSERT(ptr->ketama.continuum);
   WATCHPOINT_ASSERT(memcached_server_count(ptr) * MEMCACHED_POINTS_PER_SERVER <= MEMCACHED_CONTINUUM_SIZE);
   ptr->ketama.continuum_points_counter= pointer_counter;
   qsort(ptr->ketama.continuum, ptr->ketama.continuum_points_counter, sizeof(memcached_continuum_item_st), continuum_item_cmp);
@@ -333,7 +333,7 @@ static memcached_return_t update_continuum(memcached_st *ptr)
 #ifdef DEBUG
   for (uint32_t pointer_index= 0; memcached_server_count(ptr) && pointer_index < ((live_servers * MEMCACHED_POINTS_PER_SERVER) - 1); pointer_index++)
   {
-    WATCHPOINT_ASSERT(ptr->continuum[pointer_index].value <= ptr->continuum[pointer_index + 1].value);
+    WATCHPOINT_ASSERT(ptr->ketama.continuum[pointer_index].value <= ptr->ketama.continuum[pointer_index + 1].value);
   }
 #endif
 
index 51032f0062879c631b25c47010fb44ca59f3a0de..6594aa75d13972e2a84d920c921ce4d0b225e326 100644 (file)
  */
 
 
-#include "libmemcached/common.h"
+#include <libmemcached/common.h>
+#include <cassert>
 
-typedef enum {
+enum memc_read_or_write {
   MEM_READ,
   MEM_WRITE
-} memc_read_or_write;
+};
 
 static ssize_t io_flush(memcached_server_write_instance_st ptr,
                         const bool with_flush,
@@ -80,13 +81,22 @@ static memcached_return_t io_wait(memcached_server_write_instance_st ptr,
   {
     memcached_return_t rc= memcached_purge(ptr);
     if (rc != MEMCACHED_SUCCESS && rc != MEMCACHED_STORED)
+    {
       return MEMCACHED_FAILURE;
+    }
   }
 
   size_t loop_max= 5;
   while (--loop_max) // While loop is for ERESTART or EINTR
   {
-    error= poll(&fds, 1, ptr->root->poll_timeout);
+    if (ptr->root->poll_timeout) // Mimic 0 causes timeout behavior (not all platforms do this)
+    {
+      error= poll(&fds, 1, ptr->root->poll_timeout);
+    }
+    else
+    {
+      error= 0;
+    }
 
     switch (error)
     {
@@ -95,8 +105,10 @@ static memcached_return_t io_wait(memcached_server_write_instance_st ptr,
       WATCHPOINT_IF_LABELED_NUMBER(!read_or_write && loop_max < 4, "write() times we had to loop, decremented down from 5", loop_max);
 
       return MEMCACHED_SUCCESS;
+
     case 0: // Timeout occured, we let the while() loop do its thing.
-      return MEMCACHED_TIMEOUT;
+      return memcached_set_error(*ptr, MEMCACHED_TIMEOUT, MEMCACHED_AT);
+
     default:
       WATCHPOINT_ERRNO(get_socket_errno());
       switch (get_socket_errno())
@@ -106,6 +118,14 @@ static memcached_return_t io_wait(memcached_server_write_instance_st ptr,
 #endif
       case EINTR:
         break;
+
+      case EFAULT:
+      case ENOMEM:
+        return memcached_set_error(*ptr, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT);
+
+      case EINVAL:
+        return memcached_set_error(*ptr, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT, memcached_literal_param("RLIMIT_NOFILE exceeded, or if OSX the timeout value was invalid"));
+
       default:
         if (fds.revents & POLLERR)
         {
@@ -120,7 +140,7 @@ static memcached_return_t io_wait(memcached_server_write_instance_st ptr,
         }
         memcached_quit_server(ptr, true);
 
-        return MEMCACHED_FAILURE;
+        return memcached_set_errno(*ptr, get_socket_errno(), MEMCACHED_AT);
       }
     }
   }
@@ -130,7 +150,7 @@ static memcached_return_t io_wait(memcached_server_write_instance_st ptr,
   ptr->cached_errno= get_socket_errno();
   memcached_quit_server(ptr, true);
 
-  return MEMCACHED_FAILURE;
+  return memcached_set_error(*ptr, MEMCACHED_FAILURE, MEMCACHED_AT);
 }
 
 memcached_return_t memcached_io_wait_for_write(memcached_server_write_instance_st ptr)
@@ -159,18 +179,52 @@ static bool repack_input_buffer(memcached_server_write_instance_st ptr)
   /* There is room in the buffer, try to fill it! */
   if (ptr->read_buffer_length != MEMCACHED_MAX_BUFFER)
   {
-    /* Just try a single read to grab what's available */
-    ssize_t nr= recv(ptr->fd,
-                     ptr->read_ptr + ptr->read_data_length,
-                     MEMCACHED_MAX_BUFFER - ptr->read_data_length,
-                     0);
+    do {
+      /* Just try a single read to grab what's available */
+      ssize_t nr= recv(ptr->fd,
+                       ptr->read_ptr + ptr->read_data_length,
+                       MEMCACHED_MAX_BUFFER - ptr->read_data_length,
+                       MSG_DONTWAIT);
+
+      switch (nr)
+      {
+      case SOCKET_ERROR:
+        {
+          switch (get_socket_errno())
+          {
+          case EINTR:
+            continue;
 
-    if (nr > 0)
-    {
-      ptr->read_data_length+= (size_t)nr;
-      ptr->read_buffer_length+= (size_t)nr;
-      return true;
-    }
+          case EWOULDBLOCK:
+#ifdef USE_EAGAIN
+          case EAGAIN:
+#endif
+#ifdef TARGET_OS_LINUX
+          case ERESTART:
+#endif
+            break; // No IO is fine, we can just move on
+
+          default:
+            memcached_set_errno(*ptr, get_socket_errno(), MEMCACHED_AT);
+          }
+        }
+        break;
+
+      case 0: // Shutdown on the socket has occurred
+        {
+          memcached_set_error(*ptr, MEMCACHED_CONNECTION_FAILURE, MEMCACHED_AT);
+        }
+        break;
+
+      default:
+        {
+          ptr->read_data_length+= size_t(nr);
+          ptr->read_buffer_length+= size_t(nr);
+          return true;
+        }
+        break;
+      }
+    } while (0);
   }
   return false;
 }
@@ -227,80 +281,67 @@ static bool process_input_buffer(memcached_server_write_instance_st ptr)
   return false;
 }
 
-#if 0 // Dead code, this should be removed.
-void memcached_io_preread(memcached_st *ptr)
-{
-  unsigned int x;
-
-  return;
-
-  for (x= 0; x < memcached_server_count(ptr); x++)
-  {
-    if (memcached_server_response_count(ptr, x) &&
-        ptr->hosts[x].read_data_length < MEMCACHED_MAX_BUFFER )
-    {
-      size_t data_read;
-
-      data_read= recv(ptr->hosts[x].fd,
-                      ptr->hosts[x].read_ptr + ptr->hosts[x].read_data_length,
-                      MEMCACHED_MAX_BUFFER - ptr->hosts[x].read_data_length, 0);
-      if (data_read == SOCKET_ERROR)
-        continue;
-
-      ptr->hosts[x].read_buffer_length+= data_read;
-      ptr->hosts[x].read_data_length+= data_read;
-    }
-  }
-}
-#endif
-
 memcached_return_t memcached_io_read(memcached_server_write_instance_st ptr,
                                      void *buffer, size_t length, ssize_t *nread)
 {
-  char *buffer_ptr;
+  assert(ptr); // Programmer error
+  char *buffer_ptr= static_cast<char *>(buffer);
 
-  buffer_ptr= static_cast<char *>(buffer);
+  if (ptr->fd == INVALID_SOCKET)
+  {
+    assert(int(ptr->state) <= int(MEMCACHED_SERVER_STATE_ADDRINFO));
+    return MEMCACHED_CONNECTION_FAILURE;
+  }
 
   while (length)
   {
     if (not ptr->read_buffer_length)
     {
       ssize_t data_read;
-
-      while (1)
+      do
       {
-        data_read= recv(ptr->fd, ptr->read_buffer, MEMCACHED_MAX_BUFFER, 0);
-        if (data_read > 0)
-        {
-          break;
-        }
-        else if (data_read == SOCKET_ERROR)
+        data_read= recv(ptr->fd, ptr->read_buffer, MEMCACHED_MAX_BUFFER, MSG_DONTWAIT);
+        if (data_read == SOCKET_ERROR)
         {
-          ptr->cached_errno= get_socket_errno();
-          memcached_return_t rc= MEMCACHED_ERRNO;
           switch (get_socket_errno())
           {
+          case EINTR: // We just retry
+            continue;
+
+          case ETIMEDOUT: // OSX
           case EWOULDBLOCK:
 #ifdef USE_EAGAIN
           case EAGAIN:
 #endif
-          case EINTR:
 #ifdef TARGET_OS_LINUX
           case ERESTART:
 #endif
-            if ((rc= io_wait(ptr, MEM_READ)) == MEMCACHED_SUCCESS)
+            if (memcached_success(io_wait(ptr, MEM_READ)))
+            {
               continue;
+            }
+            return MEMCACHED_IN_PROGRESS;
+
             /* fall through */
 
+          case ENOTCONN: // Programmer Error
+            WATCHPOINT_ASSERT(0);
+          case ENOTSOCK:
+            WATCHPOINT_ASSERT(0);
+          case EBADF:
+            assert(ptr->fd != INVALID_SOCKET);
+          case EINVAL:
+          case EFAULT:
+          case ECONNREFUSED:
           default:
             {
               memcached_quit_server(ptr, true);
               *nread= -1;
-              return memcached_set_error(*ptr, rc, MEMCACHED_AT);
+              return memcached_set_errno(*ptr, get_socket_errno(), MEMCACHED_AT);
             }
           }
         }
-        else
+        else if (data_read == 0)
         {
           /*
             EOF. Any data received so far is incomplete
@@ -312,11 +353,12 @@ memcached_return_t memcached_io_read(memcached_server_write_instance_st ptr,
             it will return EGAIN if data is not immediatly available.
           */
           WATCHPOINT_STRING("We had a zero length recv()");
+          assert(0);
           memcached_quit_server(ptr, true);
           *nread= -1;
           return memcached_set_error(*ptr, MEMCACHED_UNKNOWN_READ_FAILURE, MEMCACHED_AT);
         }
-      }
+      } while (data_read <= 0);
 
       ptr->io_bytes_sent = 0;
       ptr->read_data_length= (size_t) data_read;
@@ -351,6 +393,62 @@ memcached_return_t memcached_io_read(memcached_server_write_instance_st ptr,
   return MEMCACHED_SUCCESS;
 }
 
+memcached_return_t memcached_io_slurp(memcached_server_write_instance_st ptr)
+{
+  assert(ptr); // Programmer error
+
+  if (ptr->fd == INVALID_SOCKET)
+  {
+    assert(int(ptr->state) <= int(MEMCACHED_SERVER_STATE_ADDRINFO));
+    return MEMCACHED_CONNECTION_FAILURE;
+  }
+
+  ssize_t data_read;
+  char buffer[MEMCACHED_MAX_BUFFER];
+  do
+  {
+    data_read= recv(ptr->fd, ptr->read_buffer, sizeof(buffer), MSG_DONTWAIT);
+    if (data_read == SOCKET_ERROR)
+    {
+      switch (get_socket_errno())
+      {
+      case EINTR: // We just retry
+        continue;
+
+      case ETIMEDOUT: // OSX
+      case EWOULDBLOCK:
+#ifdef USE_EAGAIN
+      case EAGAIN:
+#endif
+#ifdef TARGET_OS_LINUX
+      case ERESTART:
+#endif
+        if (memcached_success(io_wait(ptr, MEM_READ)))
+        {
+          continue;
+        }
+        return MEMCACHED_IN_PROGRESS;
+
+        /* fall through */
+
+      case ENOTCONN: // Programmer Error
+        WATCHPOINT_ASSERT(0);
+      case ENOTSOCK:
+        WATCHPOINT_ASSERT(0);
+      case EBADF:
+        assert(ptr->fd != INVALID_SOCKET);
+      case EINVAL:
+      case EFAULT:
+      case ECONNREFUSED:
+      default:
+        return MEMCACHED_CONNECTION_FAILURE; // We want this!
+      }
+    }
+  } while (data_read > 0);
+
+  return MEMCACHED_CONNECTION_FAILURE;
+}
+
 static ssize_t _io_write(memcached_server_write_instance_st ptr,
                          const void *buffer, size_t length, bool with_flush)
 {
@@ -393,11 +491,10 @@ static ssize_t _io_write(memcached_server_write_instance_st ptr,
 
     if (ptr->write_buffer_offset == buffer_end && ptr->type != MEMCACHED_CONNECTION_UDP)
     {
-      memcached_return_t rc;
-      ssize_t sent_length;
-
       WATCHPOINT_ASSERT(ptr->fd != INVALID_SOCKET);
-      sent_length= io_flush(ptr, with_flush, &rc);
+
+      memcached_return_t rc;
+      ssize_t sent_length= io_flush(ptr, with_flush, &rc);
       if (sent_length == -1)
       {
         return -1;
@@ -459,11 +556,11 @@ ssize_t memcached_io_writev(memcached_server_write_instance_st ptr,
 }
 
 
-memcached_return_t memcached_io_close(memcached_server_write_instance_st ptr)
+void memcached_io_close(memcached_server_write_instance_st ptr)
 {
   if (ptr->fd == INVALID_SOCKET)
   {
-    return MEMCACHED_SUCCESS;
+    return;
   }
 
   /* in case of death shutdown to avoid blocking at close() */
@@ -478,8 +575,8 @@ memcached_return_t memcached_io_close(memcached_server_write_instance_st ptr)
   {
     WATCHPOINT_ERRNO(get_socket_errno());
   }
-
-  return MEMCACHED_SUCCESS;
+  ptr->state= MEMCACHED_SERVER_STATE_NEW;
+  ptr->fd= INVALID_SOCKET;
 }
 
 memcached_server_write_instance_st memcached_io_get_readable_server(memcached_st *memc)
@@ -488,9 +585,7 @@ memcached_server_write_instance_st memcached_io_get_readable_server(memcached_st
   struct pollfd fds[MAX_SERVERS_TO_POLL];
   unsigned int host_index= 0;
 
-  for (uint32_t x= 0;
-       x< memcached_server_count(memc) && host_index < MAX_SERVERS_TO_POLL;
-       ++x)
+  for (uint32_t x= 0; x < memcached_server_count(memc) && host_index < MAX_SERVERS_TO_POLL; ++x)
   {
     memcached_server_write_instance_st instance=
       memcached_server_instance_fetch(memc, x);
@@ -583,12 +678,15 @@ static ssize_t io_flush(memcached_server_write_instance_st ptr,
   // UDP Sanity check, make sure that we are not sending somthing too big
   if (ptr->type == MEMCACHED_CONNECTION_UDP && write_length > MAX_UDP_DATAGRAM_LENGTH)
   {
+    *error= MEMCACHED_WRITE_FAILURE;
     return -1;
   }
 
   if (ptr->write_buffer_offset == 0 || (ptr->type == MEMCACHED_CONNECTION_UDP
                                         && ptr->write_buffer_offset == UDP_DATAGRAM_HEADER_LENGTH))
+  {
     return 0;
+  }
 
   /* Looking for memory overflows */
 #if defined(DEBUG)
@@ -638,33 +736,42 @@ static ssize_t io_flush(memcached_server_write_instance_st ptr,
            * buffer for more data and retry the write before
            * waiting..
          */
-          if (repack_input_buffer(ptr) ||
+          if (repack_input_buffer(ptr) or
               process_input_buffer(ptr))
+          {
             continue;
+          }
 
-          memcached_return_t rc;
-          rc= io_wait(ptr, MEM_WRITE);
-
-          if (rc == MEMCACHED_SUCCESS || rc == MEMCACHED_TIMEOUT)
+          memcached_return_t rc= io_wait(ptr, MEM_WRITE);
+          if (memcached_success(rc))
+          {
             continue;
+          }
+          else if (rc == MEMCACHED_TIMEOUT)
+          {
+            *error= memcached_set_error(*ptr, MEMCACHED_TIMEOUT, MEMCACHED_AT);
+            return -1;
+          }
 
           memcached_quit_server(ptr, true);
+          *error= memcached_set_errno(*ptr, get_socket_errno(), MEMCACHED_AT);
           return -1;
         }
       case ENOTCONN:
       case EPIPE:
       default:
         memcached_quit_server(ptr, true);
-        *error= MEMCACHED_ERRNO;
+        *error= memcached_set_errno(*ptr, get_socket_errno(), MEMCACHED_AT);
         WATCHPOINT_ASSERT(ptr->fd == -1);
         return -1;
       }
     }
 
-    if (ptr->type == MEMCACHED_CONNECTION_UDP &&
+    if (ptr->type == MEMCACHED_CONNECTION_UDP and
         (size_t)sent_length != write_length)
     {
       memcached_quit_server(ptr, true);
+      *error= memcached_set_error(*ptr, MEMCACHED_WRITE_FAILURE, MEMCACHED_AT);
       return -1;
     }
 
@@ -711,10 +818,14 @@ memcached_return_t memcached_safe_read(memcached_server_write_instance_st ptr,
   while (offset < size)
   {
     ssize_t nread;
-    memcached_return_t rc= memcached_io_read(ptr, data + offset, size - offset,
-                                             &nread);
-    if (rc != MEMCACHED_SUCCESS)
+    memcached_return_t rc;
+
+    while (memcached_continue(rc= memcached_io_read(ptr, data + offset, size - offset, &nread))) { };
+
+    if (memcached_failed(rc))
+    {
       return rc;
+    }
 
     offset+= (size_t) nread;
   }
@@ -729,7 +840,7 @@ memcached_return_t memcached_io_readline(memcached_server_write_instance_st ptr,
   bool line_complete= false;
   size_t total_nr= 0;
 
-  while (!line_complete)
+  while (not line_complete)
   {
     if (ptr->read_buffer_length == 0)
     {
@@ -740,8 +851,15 @@ memcached_return_t memcached_io_readline(memcached_server_write_instance_st ptr,
      */
       ssize_t nread;
       memcached_return_t rc= memcached_io_read(ptr, buffer_ptr, 1, &nread);
-      if (rc != MEMCACHED_SUCCESS)
+      if (memcached_failed(rc) and rc == MEMCACHED_IN_PROGRESS)
+      {
+        memcached_quit_server(ptr, true);
+        return memcached_set_error(*ptr, rc, MEMCACHED_AT);
+      }
+      else if (memcached_failed(rc))
+      {
         return rc;
+      }
 
       if (*buffer_ptr == '\n')
         line_complete= true;
index a5d344748671e4f17519ca835d3b1618270355aa..0d1e6193c3839945b7a0c1a4981229698f28d920 100644 (file)
@@ -96,7 +96,7 @@ memcached_return_t memcached_io_readline(memcached_server_write_instance_st ptr,
                                          size_t size);
 
 LIBMEMCACHED_LOCAL
-memcached_return_t memcached_io_close(memcached_server_write_instance_st ptr);
+void memcached_io_close(memcached_server_write_instance_st ptr);
 
 /* Read n bytes of data from the server and store them in dta */
 LIBMEMCACHED_LOCAL
@@ -111,6 +111,9 @@ memcached_return_t memcached_io_init_udp_header(memcached_server_write_instance_
 LIBMEMCACHED_LOCAL
 memcached_server_write_instance_st memcached_io_get_readable_server(memcached_st *memc);
 
+LIBMEMCACHED_LOCAL
+memcached_return_t memcached_io_slurp(memcached_server_write_instance_st ptr);
+
 #ifdef __cplusplus
 }
 #endif
index f2e8993b5f57200b25372a416890eb34af35fd4b..ee95eaa165c2305ee0d1a31bca48f5bbcdaf53e2 100644 (file)
@@ -311,9 +311,8 @@ void memcached_free(memcached_st *ptr)
 memcached_st *memcached_clone(memcached_st *clone, const memcached_st *source)
 {
   memcached_return_t rc= MEMCACHED_SUCCESS;
-  memcached_st *new_clone;
 
-  if (source == NULL)
+  if (not source)
     return memcached_create(clone);
 
   if (clone && memcached_is_allocated(clone))
@@ -321,9 +320,9 @@ memcached_st *memcached_clone(memcached_st *clone, const memcached_st *source)
     return NULL;
   }
 
-  new_clone= memcached_create(clone);
+  memcached_st *new_clone= memcached_create(clone);
 
-  if (new_clone == NULL)
+  if (not new_clone)
     return NULL;
 
   new_clone->flags= source->flags;
index 3bc1d227f934650f63fbcf9c803fb3ba20e35148..0b27291b095ca3f76dd908759900fe2325baf1f4 100644 (file)
@@ -117,7 +117,7 @@ public:
    */
   bool configure(const std::string &configuration)
   {
-    return (memcached_success(memcached_parse_configuration(memc, configuration.c_str(), configuration.size())));
+    return memcached_success(memcached_parse_configuration(memc, configuration.c_str(), configuration.size()));
   }
 
   /**
@@ -129,11 +129,7 @@ public:
    */
   bool addServer(const std::string &server_name, in_port_t port)
   {
-    memcached_return_t rc;
-
-    rc= memcached_server_add(memc, server_name.c_str(), port);
-
-    return (rc == MEMCACHED_SUCCESS);
+    return memcached_success(memcached_server_add(memc, server_name.c_str(), port));
   }
 
   /**
@@ -167,30 +163,41 @@ public:
    * @return a memcached return structure
    */
   memcached_return_t fetch(std::string &key,
-                         std::vector<char> &ret_val)
+                           std::vector<char> &ret_val,
+                           uint32_t &flags,
+                           uint64_t &cas_value)
   {
-    char ret_key[MEMCACHED_MAX_KEY];
-    size_t value_length= 0;
-    size_t key_length= 0;
     memcached_return_t rc;
-    uint32_t flags= 0;
-    char *value= memcached_fetch(memc, ret_key, &key_length,
-                                 &value_length, &flags, &rc);
-    if (value && ret_val.empty())
-    {
-      ret_val.reserve(value_length);
-      ret_val.assign(value, value + value_length);
-      key.assign(ret_key, key_length);
-      free(value);
-    }
-    else if (value)
+
+    memcached_result_st *result;
+    if ((result= memcached_fetch_result(memc, NULL, &rc)))
     {
-      free(value);
+      // Key
+      key.assign(memcached_result_key_value(result), memcached_result_key_length(result));
+
+      // Actual value, null terminated
+      ret_val.reserve(memcached_result_length(result) +1);
+      ret_val.assign(memcached_result_value(result), 
+                     memcached_result_value(result) +memcached_result_length(result));
+
+      // Misc
+      flags= memcached_result_flags(result);
+      cas_value= memcached_result_cas(result);
     }
+    memcached_result_free(result);
 
     return rc;
   }
 
+  memcached_return_t fetch(std::string &key,
+                           std::vector<char> &ret_val)
+  {
+    uint32_t flags= 0;
+    uint64_t cas_value= 0;
+
+    return fetch(key, ret_val, flags, cas_value);
+  }
+
   /**
    * Fetches an individual value from the server.
    *
@@ -214,6 +221,7 @@ public:
       free(value);
       return true;
     }
+
     return false;
   }
 
@@ -284,10 +292,9 @@ public:
      * If the std::vector of keys is empty then we cannot
      * call memcached_mget as we will get undefined behavior.
      */
-    if (! real_keys.empty())
+    if (not real_keys.empty())
     {
-      memcached_return_t rc= memcached_mget(memc, &real_keys[0], &key_len[0], real_keys.size());
-      return (rc == MEMCACHED_SUCCESS);
+      return memcached_success(memcached_mget(memc, &real_keys[0], &key_len[0], real_keys.size()));
     }
 
     return false;
@@ -333,13 +340,12 @@ public:
                 time_t expiration,
                 uint32_t flags)
   {
-    memcached_return_t rc= memcached_set_by_key(memc, master_key.c_str(),
-                                                master_key.length(),
-                                                key.c_str(), key.length(),
-                                                &value[0], value.size(),
-                                                expiration,
-                                                flags);
-    return (rc == MEMCACHED_SUCCESS);
+    return memcached_success(memcached_set_by_key(memc, master_key.c_str(),
+                                                  master_key.length(),
+                                                  key.c_str(), key.length(),
+                                                  &value[0], value.size(),
+                                                  expiration,
+                                                  flags));
   }
 
   /**
@@ -414,9 +420,7 @@ public:
    */
   bool increment(const std::string &key, uint32_t offset, uint64_t *value)
   {
-    memcached_return_t rc= memcached_increment(memc, key.c_str(), key.length(),
-                                               offset, value);
-    return (rc == MEMCACHED_SUCCESS);
+    return memcached_success(memcached_increment(memc, key.c_str(), key.length(), offset, value));
   }
 
   /**
@@ -431,10 +435,9 @@ public:
    */
   bool decrement(const std::string &key, uint32_t offset, uint64_t *value)
   {
-    memcached_return_t rc= memcached_decrement(memc, key.c_str(),
-                                               key.length(),
-                                               offset, value);
-    return (rc == MEMCACHED_SUCCESS);
+    return memcached_success(memcached_decrement(memc, key.c_str(),
+                                                 key.length(),
+                                                 offset, value));
   }
 
 
@@ -448,9 +451,8 @@ public:
    */
   bool add(const std::string &key, const std::vector<char> &value)
   {
-    memcached_return_t rc= memcached_add(memc, key.c_str(), key.length(),
-                                         &value[0], value.size(), 0, 0);
-    return (rc == MEMCACHED_SUCCESS);
+    return memcached_success(memcached_add(memc, key.c_str(), key.length(),
+                                           &value[0], value.size(), 0, 0));
   }
 
   /**
@@ -467,15 +469,14 @@ public:
                 const std::string &key,
                 const std::vector<char> &value)
   {
-    memcached_return_t rc= memcached_add_by_key(memc,
-                                                master_key.c_str(),
-                                                master_key.length(),
-                                                key.c_str(),
-                                                key.length(),
-                                                &value[0],
-                                                value.size(),
-                                                0, 0);
-    return (rc == MEMCACHED_SUCCESS);
+    return memcached_success(memcached_add_by_key(memc,
+                                                  master_key.c_str(),
+                                                  master_key.length(),
+                                                  key.c_str(),
+                                                  key.length(),
+                                                  &value[0],
+                                                  value.size(),
+                                                  0, 0));
   }
 
   /**
@@ -488,10 +489,9 @@ public:
    */
   bool replace(const std::string &key, const std::vector<char> &value)
   {
-    memcached_return_t rc= memcached_replace(memc, key.c_str(), key.length(),
-                                             &value[0], value.size(),
-                                             0, 0);
-    return (rc == MEMCACHED_SUCCESS);
+    return memcached_success(memcached_replace(memc, key.c_str(), key.length(),
+                                               &value[0], value.size(),
+                                               0, 0));
   }
 
   /**
@@ -508,15 +508,14 @@ public:
                     const std::string &key,
                     const std::vector<char> &value)
   {
-    memcached_return_t rc= memcached_replace_by_key(memc,
-                                                    master_key.c_str(),
-                                                    master_key.length(),
-                                                    key.c_str(),
-                                                    key.length(),
-                                                    &value[0],
-                                                    value.size(),
-                                                    0, 0);
-    return (rc == MEMCACHED_SUCCESS);
+    return memcached_success(memcached_replace_by_key(memc,
+                                                      master_key.c_str(),
+                                                      master_key.length(),
+                                                      key.c_str(),
+                                                      key.length(),
+                                                      &value[0],
+                                                      value.size(),
+                                                      0, 0));
   }
 
   /**
@@ -528,9 +527,8 @@ public:
    */
   bool prepend(const std::string &key, const std::vector<char> &value)
   {
-    memcached_return_t rc= memcached_prepend(memc, key.c_str(), key.length(),
-                                             &value[0], value.size(), 0, 0);
-    return (rc == MEMCACHED_SUCCESS);
+    return memcached_success(memcached_prepend(memc, key.c_str(), key.length(),
+                                               &value[0], value.size(), 0, 0));
   }
 
   /**
@@ -547,16 +545,15 @@ public:
                     const std::string &key,
                     const std::vector<char> &value)
   {
-    memcached_return_t rc= memcached_prepend_by_key(memc,
-                                                    master_key.c_str(),
-                                                    master_key.length(),
-                                                    key.c_str(),
-                                                    key.length(),
-                                                    &value[0],
-                                                    value.size(),
-                                                    0,
-                                                    0);
-    return (rc == MEMCACHED_SUCCESS);
+    return memcached_success(memcached_prepend_by_key(memc,
+                                                      master_key.c_str(),
+                                                      master_key.length(),
+                                                      key.c_str(),
+                                                      key.length(),
+                                                      &value[0],
+                                                      value.size(),
+                                                      0,
+                                                      0));
   }
 
   /**
@@ -568,13 +565,12 @@ public:
    */
   bool append(const std::string &key, const std::vector<char> &value)
   {
-    memcached_return_t rc= memcached_append(memc,
-                                            key.c_str(),
-                                            key.length(),
-                                            &value[0],
-                                            value.size(),
-                                            0, 0);
-    return (rc == MEMCACHED_SUCCESS);
+    return memcached_success(memcached_append(memc,
+                                              key.c_str(),
+                                              key.length(),
+                                              &value[0],
+                                              value.size(),
+                                              0, 0));
   }
 
   /**
@@ -591,15 +587,14 @@ public:
                    const std::string &key,
                    const std::vector<char> &value)
   {
-    memcached_return_t rc= memcached_append_by_key(memc,
-                                                   master_key.c_str(),
-                                                   master_key.length(),
-                                                   key.c_str(),
-                                                   key.length(),
-                                                   &value[0],
-                                                   value.size(),
-                                                   0, 0);
-    return (rc == MEMCACHED_SUCCESS);
+    return memcached_success(memcached_append_by_key(memc,
+                                                     master_key.c_str(),
+                                                     master_key.length(),
+                                                     key.c_str(),
+                                                     key.length(),
+                                                     &value[0],
+                                                     value.size(),
+                                                     0, 0));
   }
 
   /**
@@ -614,10 +609,9 @@ public:
            const std::vector<char> &value,
            uint64_t cas_arg)
   {
-    memcached_return_t rc= memcached_cas(memc, key.c_str(), key.length(),
-                                         &value[0], value.size(),
-                                         0, 0, cas_arg);
-    return (rc == MEMCACHED_SUCCESS);
+    return memcached_success(memcached_cas(memc, key.c_str(), key.length(),
+                                           &value[0], value.size(),
+                                           0, 0, cas_arg));
   }
 
   /**
@@ -635,15 +629,14 @@ public:
                 const std::vector<char> &value,
                 uint64_t cas_arg)
   {
-    memcached_return_t rc= memcached_cas_by_key(memc,
-                                                master_key.c_str(),
-                                                master_key.length(),
-                                                key.c_str(),
-                                                key.length(),
-                                                &value[0],
-                                                value.size(),
-                                                0, 0, cas_arg);
-    return (rc == MEMCACHED_SUCCESS);
+    return memcached_success(memcached_cas_by_key(memc,
+                                                  master_key.c_str(),
+                                                  master_key.length(),
+                                                  key.c_str(),
+                                                  key.length(),
+                                                  &value[0],
+                                                  value.size(),
+                                                  0, 0, cas_arg));
   }
 
   /**
@@ -654,8 +647,7 @@ public:
    */
   bool remove(const std::string &key)
   {
-    memcached_return_t rc= memcached_delete(memc, key.c_str(), key.length(), 0);
-    return (rc == MEMCACHED_SUCCESS);
+    return memcached_success(memcached_delete(memc, key.c_str(), key.length(), 0));
   }
 
   /**
@@ -667,11 +659,10 @@ public:
    */
   bool remove(const std::string &key, time_t expiration)
   {
-    memcached_return_t rc= memcached_delete(memc,
-                                            key.c_str(),
-                                            key.length(),
-                                            expiration);
-    return (rc == MEMCACHED_SUCCESS);
+    return memcached_success(memcached_delete(memc,
+                                              key.c_str(),
+                                              key.length(),
+                                              expiration));
   }
 
   /**
@@ -684,13 +675,12 @@ public:
   bool removeByKey(const std::string &master_key,
                    const std::string &key)
   {
-    memcached_return_t rc= memcached_delete_by_key(memc,
-                                                   master_key.c_str(),
-                                                   master_key.length(),
-                                                   key.c_str(),
-                                                   key.length(),
-                                                   0);
-    return (rc == MEMCACHED_SUCCESS);
+    return memcached_success(memcached_delete_by_key(memc,
+                                                     master_key.c_str(),
+                                                     master_key.length(),
+                                                     key.c_str(),
+                                                     key.length(),
+                                                     0));
   }
 
   /**
@@ -705,13 +695,12 @@ public:
                    const std::string &key,
                    time_t expiration)
   {
-    memcached_return_t rc= memcached_delete_by_key(memc,
-                                                   master_key.c_str(),
-                                                   master_key.length(),
-                                                   key.c_str(),
-                                                   key.length(),
-                                                   expiration);
-    return (rc == MEMCACHED_SUCCESS);
+    return memcached_success(memcached_delete_by_key(memc,
+                                                     master_key.c_str(),
+                                                     master_key.length(),
+                                                     key.c_str(),
+                                                     key.length(),
+                                                     expiration));
   }
 
   /**
@@ -721,10 +710,9 @@ public:
    *                       memcached servers
    * @return true on success; false otherwise
    */
-  bool flush(time_t expiration)
+  bool flush(time_t expiration= 0)
   {
-    memcached_return_t rc= memcached_flush(memc, expiration);
-    return (rc == MEMCACHED_SUCCESS);
+    return memcached_success(memcached_flush(memc, expiration));
   }
 
   /**
index 5be5ac957a22bba00fe36fc61484c05a9f2d5462..3f1185d195dcbb5c77ade6887eaa1b41be87000d 100644 (file)
@@ -38,6 +38,7 @@
 #pragma once
 
 
+#include <libmemcached/util/flush.h>
 #include <libmemcached/util/ping.h>
 #include <libmemcached/util/pool.h>
 #include <libmemcached/util/version.h>
index d8b44ff7a1bac77aaaae0cecb70eb96bca2fb81b..16f378e87393dc3a83f7924ea4b7ffec50aecb86 100644 (file)
@@ -89,9 +89,10 @@ memcached_return_t libmemcached_check_configuration(const char *option_string, s
     return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
 
   memcached_return_t rc= memcached_parse_configuration(memc_ptr, option_string, length);
-  if (memcached_failed(rc) && error_buffer && error_buffer_size)
+  if (memcached_failed(rc) and error_buffer and error_buffer_size)
   {
     strncpy(error_buffer, memcached_last_error_message(memc_ptr), error_buffer_size);
+    error_buffer[length -1]= 0;
   }
 
   bool has_filename= memcached_behavior_get(memc_ptr, MEMCACHED_BEHAVIOR_LOAD_FROM_FILE);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..7bfd21c7518430ea8be29c8d8d9caf9ef9b5a0db 100644 (file)
@@ -0,0 +1,29 @@
+#  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+#
+#  Libmemcached Scanner and Parser
+#
+#  Copyright (C) 2011 DataDifferental, http://datadifferential.com
+#  
+#  This program is free software: you can redistribute it and/or modify
+#  it under the terms of the GNU Affero General Public License as
+#  published by the Free Software Foundation, either version 3 of the
+#  License, or (at your option) any later version.
+#  
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU Affero General Public License for more details.
+#  
+#  You should have received a copy of the GNU Affero General Public License
+#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+libmemcached/options/parser.h: libmemcached/options/parser.cc
+
+libmemcached/options/parser.cc: libmemcached/options/parser.yy libmemcached/options/scanner.l libmemcached/options/scanner.h
+       $(AM_V_YACC)$(am__skipyacc) $(YACC) $(YLFLAGS) $(AM_YFLAGS) -o $@ $<
+
+libmemcached/options/scanner.h: libmemcached/options/scanner.cc
+
+libmemcached/options/scanner.cc: libmemcached/options/scanner.l libmemcached/options/parser.yy
+       $(AM_V_GEN)$(LEX) $<
diff --git a/libmemcached/options/parser.yy b/libmemcached/options/parser.yy
new file mode 100644 (file)
index 0000000..6a7bd9b
--- /dev/null
@@ -0,0 +1,466 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ *
+ *  Libmemcached Scanner and Parser
+ *
+ *  Copyright (C) 2011 DataDifferental, http://datadifferential.com
+ *  
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU Affero General Public License as
+ *  published by the Free Software Foundation, either version 3 of the
+ *  License, or (at your option) any later version.
+ *  
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Affero General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU Affero General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+%error-verbose
+%debug
+%defines
+%expect 0
+%output "libmemcached/options/parser.cc"
+%defines "libmemcached/options/parser.h"
+%lex-param { yyscan_t *scanner }
+%name-prefix="config_"
+%parse-param { Context *context }
+%parse-param { yyscan_t *scanner }
+%pure-parser
+%require "2.2"
+%start begin
+%verbose
+
+%{
+
+#include <config.h>
+
+#include <stdint.h>
+
+#include <libmemcached/common.h>
+#include <libmemcached/options/context.h>
+#include <libmemcached/options/symbol.h>
+#include <libmemcached/options/scanner.h>
+
+#pragma GCC diagnostic ignored "-Wold-style-cast"
+
+int conf_lex(YYSTYPE* lvalp, void* scanner);
+
+#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())
+    context->abort(error);
+}
+
+%}
+
+%token COMMENT
+%token END
+%token ERROR
+%token RESET
+%token PARSER_DEBUG
+%token INCLUDE
+%token CONFIGURE_FILE
+%token EMPTY_LINE
+%token SERVER
+%token SERVERS
+%token SERVERS_OPTION
+%token UNKNOWN_OPTION
+%token UNKNOWN
+
+/* All behavior options */
+%token BINARY_PROTOCOL
+%token BUFFER_REQUESTS
+%token CONNECT_TIMEOUT
+%token DISTRIBUTION
+%token HASH
+%token HASH_WITH_NAMESPACE
+%token IO_BYTES_WATERMARK
+%token IO_KEY_PREFETCH
+%token IO_MSG_WATERMARK
+%token KETAMA_HASH
+%token KETAMA_WEIGHTED
+%token NOREPLY
+%token NUMBER_OF_REPLICAS
+%token POLL_TIMEOUT
+%token RANDOMIZE_REPLICA_READ
+%token RCV_TIMEOUT
+%token REMOVE_FAILED_SERVERS
+%token RETRY_TIMEOUT
+%token SND_TIMEOUT
+%token SOCKET_RECV_SIZE
+%token SOCKET_SEND_SIZE
+%token SORT_HOSTS
+%token SUPPORT_CAS
+%token USER_DATA
+%token USE_UDP
+%token VERIFY_KEY
+%token _TCP_KEEPALIVE
+%token _TCP_KEEPIDLE
+%token _TCP_NODELAY
+
+/* Callbacks */
+%token NAMESPACE
+
+/* Pool */
+%token POOL_MIN
+%token POOL_MAX
+
+/* Hash types */
+%token MD5
+%token CRC
+%token FNV1_64
+%token FNV1A_64
+%token FNV1_32
+%token FNV1A_32
+%token HSIEH
+%token MURMUR
+%token JENKINS
+
+/* Distributions */
+%token CONSISTENT
+%token MODULA
+%token RANDOM
+
+/* Boolean values */
+%token <boolean> TRUE
+%token <boolean> FALSE
+
+%nonassoc ','
+%nonassoc '='
+
+%token <number> FLOAT
+%token <number> NUMBER
+%token <number> PORT
+%token <number> WEIGHT_START
+%token <server> IPADDRESS
+%token <server> HOSTNAME
+%token <string> STRING
+%token <string> QUOTED_STRING
+%token <string> FILE_PATH
+
+%type <behavior> behavior_boolean
+%type <behavior> behavior_number
+%type <distribution> distribution
+%type <hash> hash
+%type <number> optional_port
+%type <number> optional_weight
+%type <string> string
+
+%%
+
+begin:
+          statement
+        | begin ' ' statement
+        ;
+
+statement:
+         expression
+          { }
+        | COMMENT
+          { }
+        | EMPTY_LINE
+          { }
+        | END
+          {
+            context->set_end();
+            YYACCEPT;
+          }
+        | ERROR
+          {
+            context->rc= MEMCACHED_PARSE_USER_ERROR;
+            parser_abort(context, NULL);
+          }
+        | RESET
+          {
+            memcached_reset(context->memc);
+          }
+        | PARSER_DEBUG
+          {
+            yydebug= 1;
+          }
+        | INCLUDE ' ' string
+          {
+            if ((context->rc= memcached_parse_configure_file(context->memc, $3.c_str, $3.size)) != MEMCACHED_SUCCESS)
+            {
+              parser_abort(context, NULL);
+            }
+          }
+        ;
+
+
+expression:
+          SERVER HOSTNAME optional_port optional_weight
+          {
+            if (memcached_failed(context->rc= memcached_server_add_with_weight(context->memc, $2.c_str, $3, $4)))
+            {
+              parser_abort(context, NULL);
+            }
+            context->unset_server();
+          }
+        | SERVER IPADDRESS optional_port optional_weight
+          {
+            if (memcached_failed(context->rc= memcached_server_add_with_weight(context->memc, $2.c_str, $3, $4)))
+            {
+              parser_abort(context, NULL);
+            }
+            context->unset_server();
+          }
+        | CONFIGURE_FILE string
+          {
+            memcached_set_configuration_file(context->memc, $2.c_str, $2.size);
+          }
+        | POOL_MIN NUMBER
+          {
+            context->memc->configure.initial_pool_size= $2;
+          }
+        | POOL_MAX NUMBER
+          {
+            context->memc->configure.max_pool_size= $2;
+          }
+        | behaviors
+        ;
+
+behaviors:
+          NAMESPACE string
+          {
+            if ((context->rc= memcached_set_prefix_key(context->memc, $2.c_str, $2.size)) != MEMCACHED_SUCCESS)
+            {
+              parser_abort(context, NULL);;
+            }
+          }
+        | DISTRIBUTION distribution
+          {
+            if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, $2)) != MEMCACHED_SUCCESS)
+            {
+              parser_abort(context, NULL);;
+            }
+          }
+        | DISTRIBUTION distribution ',' hash
+          {
+            if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, $2)) != MEMCACHED_SUCCESS)
+            {
+              parser_abort(context, NULL);;
+            }
+            if ((context->rc= memcached_behavior_set_distribution_hash(context->memc, $4)) != MEMCACHED_SUCCESS)
+            {
+              parser_abort(context, NULL);;
+            }
+          }
+        | HASH hash
+          {
+            if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_HASH, $2)) != MEMCACHED_SUCCESS)
+            {
+              parser_abort(context, NULL);; 
+            }
+          }
+        | behavior_number NUMBER
+          {
+            if ((context->rc= memcached_behavior_set(context->memc, $1, $2)) != MEMCACHED_SUCCESS)
+            {
+              parser_abort(context, NULL);;
+            }
+          }
+        | behavior_boolean
+          {
+            if ((context->rc= memcached_behavior_set(context->memc, $1, true)) != MEMCACHED_SUCCESS)
+            {
+              parser_abort(context, NULL);;
+            }
+          }
+        |  USER_DATA
+          {
+          }
+        ;
+
+behavior_number:
+          REMOVE_FAILED_SERVERS
+          {
+            $$= MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS;
+          }
+        | CONNECT_TIMEOUT
+          {
+            $$= MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT;
+          }
+        | IO_MSG_WATERMARK
+          {
+            $$= MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK;
+          }
+        | IO_BYTES_WATERMARK
+          {
+            $$= MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK;
+          }
+        | IO_KEY_PREFETCH
+          {
+            $$= MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH;
+          }
+        | NUMBER_OF_REPLICAS
+          {
+            $$= MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS;
+          }
+        | POLL_TIMEOUT
+          {
+            $$= MEMCACHED_BEHAVIOR_POLL_TIMEOUT;
+          }
+        |  RCV_TIMEOUT
+          {
+            $$= MEMCACHED_BEHAVIOR_RCV_TIMEOUT;
+          }
+        |  RETRY_TIMEOUT
+          {
+            $$= MEMCACHED_BEHAVIOR_RETRY_TIMEOUT;
+          }
+        |  SND_TIMEOUT
+          {
+            $$= MEMCACHED_BEHAVIOR_SND_TIMEOUT;
+          }
+        |  SOCKET_RECV_SIZE
+          {
+            $$= MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE;
+          }
+        |  SOCKET_SEND_SIZE
+          {
+            $$= MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE;
+          }
+        ;
+
+behavior_boolean: 
+          BINARY_PROTOCOL
+          {
+            $$= MEMCACHED_BEHAVIOR_BINARY_PROTOCOL;
+          }
+        | BUFFER_REQUESTS
+          {
+            $$= MEMCACHED_BEHAVIOR_BUFFER_REQUESTS;
+          }
+        | HASH_WITH_NAMESPACE
+          {
+            $$= MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY;
+          }
+        | NOREPLY
+          {
+            $$= MEMCACHED_BEHAVIOR_NOREPLY;
+          }
+        |  RANDOMIZE_REPLICA_READ
+          {
+            $$= MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ;
+          }
+        |  SORT_HOSTS
+          {
+            $$= MEMCACHED_BEHAVIOR_SORT_HOSTS;
+          }
+        |  SUPPORT_CAS
+          {
+            $$= MEMCACHED_BEHAVIOR_SUPPORT_CAS;
+          }
+        |  _TCP_NODELAY
+          {
+            $$= MEMCACHED_BEHAVIOR_TCP_NODELAY;
+          }
+        |  _TCP_KEEPALIVE
+          {
+            $$= MEMCACHED_BEHAVIOR_TCP_KEEPALIVE;
+          }
+        |  _TCP_KEEPIDLE
+          {
+            $$= MEMCACHED_BEHAVIOR_TCP_KEEPIDLE;
+          }
+        |  USE_UDP
+          {
+            $$= MEMCACHED_BEHAVIOR_USE_UDP;
+          }
+        |  VERIFY_KEY
+          {
+            $$= MEMCACHED_BEHAVIOR_VERIFY_KEY;
+          }
+
+
+optional_port:
+          { $$= MEMCACHED_DEFAULT_PORT;}
+        | PORT
+          { };
+        ;
+
+optional_weight:
+          { $$= 1; }
+        | WEIGHT_START
+          { }
+        ;
+
+hash:
+          MD5
+          {
+            $$= MEMCACHED_HASH_MD5;
+          }
+        | CRC
+          {
+            $$= MEMCACHED_HASH_CRC;
+          }
+        | FNV1_64
+          {
+            $$= MEMCACHED_HASH_FNV1_64;
+          }
+        | FNV1A_64
+          {
+            $$= MEMCACHED_HASH_FNV1A_64;
+          }
+        | FNV1_32
+          {
+            $$= MEMCACHED_HASH_FNV1_32;
+          }
+        | FNV1A_32
+          {
+            $$= MEMCACHED_HASH_FNV1A_32;
+          }
+        | HSIEH
+          {
+            $$= MEMCACHED_HASH_HSIEH;
+          }
+        | MURMUR
+          {
+            $$= MEMCACHED_HASH_MURMUR;
+          }
+        | JENKINS
+          {
+            $$= MEMCACHED_HASH_JENKINS;
+          }
+        ;
+
+string:
+          STRING
+          {
+            $$= $1;
+          }
+        | QUOTED_STRING
+          {
+            $$.c_str= $1.c_str +1; // +1 to move use passed the initial quote
+            $$.size= $1.size -2; // -2 removes the begin and end quote
+          }
+        ;
+
+distribution:
+          CONSISTENT
+          {
+            $$= MEMCACHED_DISTRIBUTION_CONSISTENT;
+          }
+        | MODULA
+          {
+            $$= MEMCACHED_DISTRIBUTION_MODULA;
+          }
+        | RANDOM
+          {
+            $$= MEMCACHED_DISTRIBUTION_RANDOM;
+          }
+        ;
+
+%% 
+
+void Context::start() 
+{
+  config_parse(this, (void **)scanner);
+}
+
diff --git a/libmemcached/options/scanner.l b/libmemcached/options/scanner.l
new file mode 100644 (file)
index 0000000..dd6a9e0
--- /dev/null
@@ -0,0 +1,208 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ *
+ *  Libmemcached Scanner and Parser
+ *
+ *  Copyright (C) 2011 DataDifferental, http://datadifferential.com
+ * 
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU Affero General Public License as
+ *  published by the Free Software Foundation, either version 3 of the
+ *  License, or (at your option) any later version.
+ * 
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Affero General Public License for more details.
+ * 
+ *  You should have received a copy of the GNU Affero General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+%top{
+
+#include <libmemcached/common.h>
+#include <libmemcached/options/context.h>
+#include <libmemcached/options/parser.h>
+#include <libmemcached/options/symbol.h>
+
+#pragma GCC diagnostic ignored "-Wold-style-cast"
+#pragma GCC diagnostic ignored "-Wsign-compare"
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+
+#define YY_EXTRA_TYPE Context*
+
+}
+
+
+%{
+#include <cstdlib>
+#include <cstring>
+
+#define PARAM yyget_extra(yyscanner)
+
+#define get_lex_chars(buffer, result, max_size, context) \
+{ \
+  if (context->pos >= context->length) \
+  { \
+    result= YY_NULL; \
+  } \
+  else \
+  { \
+    result= (int)(context->length - context->pos); \
+    (size_t)result > (size_t)max_size ? result= max_size : 0; \
+    memcpy(buffer, context->buf + context->pos, result); \
+    context->pos += result; \
+  } \
+}
+
+
+#define YY_INPUT(buffer, result, max_size) get_lex_chars(buffer, result, max_size, PARAM)
+
+%}
+
+%option 8bit
+%option bison-bridge
+%option case-insensitive
+%option debug
+%option nounput
+%option noyywrap
+%option outfile="libmemcached/options/scanner.cc" header-file="libmemcached/options/scanner.h"
+%option perf-report
+%option prefix="config_"
+%option reentrant
+
+%%
+
+
+=|,|[ ]       { return yytext[0];}
+
+[[:digit:]]+ { yylval->number= atoi(yytext); return (NUMBER); }
+
+:[[:digit:]]{1,5} { yylval->number= atoi(yytext +1); return PORT; }
+
+"/?"[[:digit:]]{1,5} { yylval->number= atoi(yytext +2); return WEIGHT_START; }
+
+[\t\r\n] ; /* skip whitespace */
+
+
+^#.*$ {
+      return COMMENT;
+    }
+
+"--SERVER="                          { yyextra->begin= yytext; yyextra->set_server(); return SERVER; }
+
+"--BINARY-PROTOCOL"                    { yyextra->begin= yytext; return BINARY_PROTOCOL; }
+"--BUFFER-REQUESTS"                    { yyextra->begin= yytext; return BUFFER_REQUESTS; }
+"--CONFIGURE-FILE="                    { yyextra->begin= yytext; return CONFIGURE_FILE; }
+"--CONNECT-TIMEOUT="                   { yyextra->begin= yytext; return CONNECT_TIMEOUT; }
+"--DISTRIBUTION="                      { yyextra->begin= yytext; return DISTRIBUTION; }
+"--HASH-WITH-NAMESPACE"                { yyextra->begin= yytext; return HASH_WITH_NAMESPACE; }
+"--HASH="                              { yyextra->begin= yytext; return HASH; }
+"--IO-BYTES-WATERMARK="                { yyextra->begin= yytext; return IO_BYTES_WATERMARK; }
+"--IO-KEY-PREFETCH="                   { yyextra->begin= yytext; return IO_KEY_PREFETCH; }
+"--IO-MSG-WATERMARK="          { yyextra->begin= yytext; return IO_MSG_WATERMARK; }
+"--NOREPLY"                         { yyextra->begin= yytext; return NOREPLY; }
+"--NUMBER-OF-REPLICAS="                { yyextra->begin= yytext; return NUMBER_OF_REPLICAS; }
+"--POLL-TIMEOUT="                      { yyextra->begin= yytext; return POLL_TIMEOUT; }
+"--RANDOMIZE-REPLICA-READ"             { yyextra->begin= yytext; return RANDOMIZE_REPLICA_READ; }
+"--RCV-TIMEOUT="                       { yyextra->begin= yytext; return RCV_TIMEOUT; }
+"--REMOVE-FAILED-SERVERS="                     { yyextra->begin= yytext; return REMOVE_FAILED_SERVERS; }
+"--RETRY-TIMEOUT="                     { yyextra->begin= yytext; return RETRY_TIMEOUT; }
+"--SND-TIMEOUT="                       { yyextra->begin= yytext; return SND_TIMEOUT; }
+"--SOCKET-RECV-SIZE="          { yyextra->begin= yytext; return SOCKET_RECV_SIZE; }
+"--SOCKET-SEND-SIZE="          { yyextra->begin= yytext; return SOCKET_SEND_SIZE; }
+"--SORT-HOSTS"                 { yyextra->begin= yytext; return SORT_HOSTS; }
+"--SUPPORT-CAS"                        { yyextra->begin= yytext; return SUPPORT_CAS; }
+"--TCP-KEEPALIVE"                      { yyextra->begin= yytext; return _TCP_KEEPALIVE; }
+"--TCP-KEEPIDLE"                       { yyextra->begin= yytext; return _TCP_KEEPIDLE; }
+"--TCP-NODELAY"                        { yyextra->begin= yytext; return _TCP_NODELAY; }
+"--USE-UDP"                            { yyextra->begin= yytext; return USE_UDP; }
+"--USER-DATA"                  { yyextra->begin= yytext; return USER_DATA; }
+"--VERIFY-KEY"                      { yyextra->begin= yytext; return VERIFY_KEY; }
+
+"--POOL-MIN="                          { yyextra->begin= yytext; return POOL_MIN; }
+"--POOL-MAX="                          { yyextra->begin= yytext; return POOL_MAX; }
+
+"--NAMESPACE="                         { yyextra->begin= yytext; return NAMESPACE; }
+
+INCLUDE           { yyextra->begin= yytext; return INCLUDE; }
+RESET           { yyextra->begin= yytext; return RESET; }
+DEBUG           { yyextra->begin= yytext; return PARSER_DEBUG; }
+SERVERS           { yyextra->begin= yytext; return SERVERS; }
+END           { yyextra->begin= yytext; return END; }
+ERROR           { yyextra->begin= yytext; return ERROR; }
+
+TRUE           { return TRUE; }
+FALSE           { return FALSE; }
+
+
+"--"[[:alnum:]]*   {
+      yyextra->begin= yytext;
+      return UNKNOWN_OPTION;
+    }
+
+CONSISTENT      { return CONSISTENT; }
+MODULA          { return MODULA; }
+RANDOM          { return RANDOM; }
+
+MD5                    { return MD5; }
+CRC                    { return CRC; }
+FNV1_64                        { return FNV1_64; }
+FNV1A_64                       { return FNV1A_64; }
+FNV1_32                        { return FNV1_32; }
+FNV1A_32                       { return FNV1A_32; }
+HSIEH                  { return HSIEH; }
+MURMUR                 { return MURMUR; }
+JENKINS                        { return JENKINS; }
+
+(([[:digit:]]{1,3}"."){3}([[:digit:]]{1,3})) {
+      yylval->server.port= MEMCACHED_DEFAULT_PORT;
+      yylval->server.weight= 1;
+      yylval->server.c_str= yyextra->set_hostname(yytext, yyleng);
+      if (yylval->server.c_str)
+        yylval->server.size= yyleng;
+      return IPADDRESS;
+    }
+
+[[:alnum:]]["."[:alnum:]_-]+[[:alnum:]] {
+      if (yyextra->is_server())
+      {
+        yylval->server.port= MEMCACHED_DEFAULT_PORT;
+        yylval->server.weight= 1;
+        yylval->server.c_str= yyextra->set_hostname(yytext, yyleng);
+        if (yylval->server.c_str)
+          yylval->server.size= yyleng;
+
+        return HOSTNAME;
+      }
+
+      yylval->string.c_str = yytext;
+      yylval->string.size = yyleng;
+
+      return STRING;
+    }
+
+(\".*\") {
+      yylval->string.c_str = yytext;
+      yylval->string.size = yyleng;
+      return QUOTED_STRING;
+    }
+
+.   {
+      yyextra->begin= yytext;
+      return UNKNOWN;
+    }
+
+%%
+
+void Context::init_scanner()
+{
+  yylex_init(&scanner);
+  yyset_extra(this, scanner);
+}
+
+void Context::destroy_scanner()
+{
+  yylex_destroy(scanner);
+}
+
index 93fb316222276bfc859c196b0da20194492e2e59..0997ebb03dcc96af572b3e5d85b40037e5abf60f 100644 (file)
@@ -155,7 +155,7 @@ get_response_handler(const void *cookie,
       .opcode= opcode,
       .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS),
       .opaque= client->current_command->request.opaque,
-      .cas= htonll(cas),
+      .cas= memcached_htonll(cas),
       .keylen= htons(keylen),
       .extlen= 4,
       .bodylen= htonl(bodylen + keylen + 4),
@@ -184,12 +184,12 @@ get_response_handler(const void *cookie,
  * @param body the length of the body
  * @param bodylen the length of the body
  */
-static protocol_binary_response_status
-stat_response_handler(const void *cookie,
-                     const void *key,
-                     uint16_t keylen,
-                     const void *body,
-                     uint32_t bodylen) {
+static protocol_binary_response_status stat_response_handler(const void *cookie,
+                                                             const void *key,
+                                                             uint16_t keylen,
+                                                             const void *body,
+                                                             uint32_t bodylen)
+{
 
   memcached_protocol_client_st *client= (void*)cookie;
 
@@ -201,6 +201,7 @@ stat_response_handler(const void *cookie,
       .opaque= client->current_command->request.opaque,
       .keylen= htons(keylen),
       .bodylen= htonl(bodylen + keylen),
+      .cas= 0
     },
   };
 
@@ -236,6 +237,7 @@ version_response_handler(const void *cookie,
       .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS),
       .opaque= client->current_command->request.opaque,
       .bodylen= htonl(textlen),
+      .cas= 0
     },
   };
 
@@ -291,7 +293,7 @@ add_command_handler(const void *cookie,
             .opcode= PROTOCOL_BINARY_CMD_ADD,
             .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS),
             .opaque= header->request.opaque,
-            .cas= ntohll(cas)
+            .cas= memcached_ntohll(cas)
           }
         }
       };
@@ -326,8 +328,8 @@ decrement_command_handler(const void *cookie,
   {
     uint16_t keylen= ntohs(header->request.keylen);
     protocol_binary_request_decr *request= (void*)header;
-    uint64_t init= ntohll(request->message.body.initial);
-    uint64_t delta= ntohll(request->message.body.delta);
+    uint64_t init= memcached_ntohll(request->message.body.initial);
+    uint64_t delta= memcached_ntohll(request->message.body.delta);
     uint32_t timeout= ntohl(request->message.body.expiration);
     void *key= request->bytes + sizeof(request->bytes);
     uint64_t result;
@@ -347,10 +349,10 @@ decrement_command_handler(const void *cookie,
             .opcode= PROTOCOL_BINARY_CMD_DECREMENT,
             .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS),
             .opaque= header->request.opaque,
-            .cas= ntohll(cas),
+            .cas= memcached_ntohll(cas),
             .bodylen= htonl(8)
           },
-          .body.value= htonll(result)
+          .body.value= memcached_htonll(result)
         }
       };
       rval= response_handler(cookie, header, (void*)&response);
@@ -383,8 +385,8 @@ delete_command_handler(const void *cookie,
   if (client->root->callback->interface.v1.delete != NULL)
   {
     uint16_t keylen= ntohs(header->request.keylen);
-    void *key= (header + 1);
-    uint64_t cas= ntohll(header->request.cas);
+    void *key= (header +1);
+    uint64_t cas= memcached_ntohll(header->request.cas);
     rval= client->root->callback->interface.v1.delete(cookie, key, keylen, cas);
     if (rval == PROTOCOL_BINARY_RESPONSE_SUCCESS &&
         header->request.opcode == PROTOCOL_BINARY_CMD_DELETE)
@@ -521,8 +523,8 @@ increment_command_handler(const void *cookie,
   {
     uint16_t keylen= ntohs(header->request.keylen);
     protocol_binary_request_incr *request= (void*)header;
-    uint64_t init= ntohll(request->message.body.initial);
-    uint64_t delta= ntohll(request->message.body.delta);
+    uint64_t init= memcached_ntohll(request->message.body.initial);
+    uint64_t delta= memcached_ntohll(request->message.body.delta);
     uint32_t timeout= ntohl(request->message.body.expiration);
     void *key= request->bytes + sizeof(request->bytes);
     uint64_t cas;
@@ -542,10 +544,10 @@ increment_command_handler(const void *cookie,
             .opcode= PROTOCOL_BINARY_CMD_INCREMENT,
             .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS),
             .opaque= header->request.opaque,
-            .cas= ntohll(cas),
+            .cas= memcached_ntohll(cas),
             .bodylen= htonl(8)
           },
-          .body.value= htonll(result)
+          .body.value= memcached_htonll(result)
         }
       };
 
@@ -614,9 +616,9 @@ append_command_handler(const void *cookie,
   {
     uint16_t keylen= ntohs(header->request.keylen);
     uint32_t datalen= ntohl(header->request.bodylen) - keylen;
-    char *key= (void*)(header + 1);
-    char *data= key + keylen;
-    uint64_t cas= ntohll(header->request.cas);
+    char *key= (void*)(header +1);
+    char *data= key +keylen;
+    uint64_t cas= memcached_ntohll(header->request.cas);
     uint64_t result_cas;
 
     rval= client->root->callback->interface.v1.append(cookie, key, keylen,
@@ -633,7 +635,7 @@ append_command_handler(const void *cookie,
             .opcode= PROTOCOL_BINARY_CMD_APPEND,
             .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS),
             .opaque= header->request.opaque,
-            .cas= ntohll(result_cas),
+            .cas= memcached_ntohll(result_cas),
           },
         }
       };
@@ -670,7 +672,7 @@ prepend_command_handler(const void *cookie,
     uint32_t datalen= ntohl(header->request.bodylen) - keylen;
     char *key= (char*)(header + 1);
     char *data= key + keylen;
-    uint64_t cas= ntohll(header->request.cas);
+    uint64_t cas= memcached_ntohll(header->request.cas);
     uint64_t result_cas;
     rval= client->root->callback->interface.v1.prepend(cookie, key, keylen,
                                                        data, datalen, cas,
@@ -686,7 +688,7 @@ prepend_command_handler(const void *cookie,
             .opcode= PROTOCOL_BINARY_CMD_PREPEND,
             .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS),
             .opaque= header->request.opaque,
-            .cas= ntohll(result_cas),
+            .cas= memcached_ntohll(result_cas),
           },
         }
       };
@@ -764,7 +766,7 @@ replace_command_handler(const void *cookie,
     uint32_t timeout= ntohl(request->message.body.expiration);
     char *key= ((char*)header) + sizeof(*header) + 8;
     char *data= key + keylen;
-    uint64_t cas= ntohll(header->request.cas);
+    uint64_t cas= memcached_ntohll(header->request.cas);
     uint64_t result_cas;
 
     rval= client->root->callback->interface.v1.replace(cookie, key, keylen,
@@ -782,7 +784,7 @@ replace_command_handler(const void *cookie,
             .opcode= PROTOCOL_BINARY_CMD_REPLACE,
             .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS),
             .opaque= header->request.opaque,
-            .cas= ntohll(result_cas),
+            .cas= memcached_ntohll(result_cas),
           },
         }
       };
@@ -822,7 +824,7 @@ set_command_handler(const void *cookie,
     uint32_t timeout= ntohl(request->message.body.expiration);
     char *key= ((char*)header) + sizeof(*header) + 8;
     char *data= key + keylen;
-    uint64_t cas= ntohll(header->request.cas);
+    uint64_t cas= memcached_ntohll(header->request.cas);
     uint64_t result_cas;
 
 
@@ -840,7 +842,7 @@ set_command_handler(const void *cookie,
             .opcode= PROTOCOL_BINARY_CMD_SET,
             .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS),
             .opaque= header->request.opaque,
-            .cas= ntohll(result_cas),
+            .cas= memcached_ntohll(result_cas),
           },
         }
       };
index 07cd135f56c939281ae786bdd32372ea97e4b985..36a33ae987b46feb06bba06734312e86dc95b5bd 100644 (file)
@@ -2,7 +2,6 @@
 
 memcached_return_t memcached_purge(memcached_server_write_instance_st ptr)
 {
-  uint32_t x;
   memcached_return_t ret= MEMCACHED_SUCCESS;
   memcached_st *root= (memcached_st *)ptr->root;
 
@@ -26,7 +25,7 @@ memcached_return_t memcached_purge(memcached_server_write_instance_st ptr)
   {
     memcached_set_purging(root, true);
 
-    return MEMCACHED_WRITE_FAILURE;
+    return memcached_set_error(*ptr, MEMCACHED_WRITE_FAILURE, MEMCACHED_AT);
   }
   WATCHPOINT_ASSERT(ptr->fd != -1);
 
@@ -48,7 +47,7 @@ memcached_return_t memcached_purge(memcached_server_write_instance_st ptr)
     result_ptr= memcached_result_create(root, &result);
     WATCHPOINT_ASSERT(result_ptr);
 
-    for (x= 0; x < no_msg; x++)
+    for (uint32_t x= 0; x < no_msg; x++)
     {
       memcached_result_reset(result_ptr);
       memcached_return_t rc= memcached_read_one_response(ptr, buffer,
@@ -62,8 +61,9 @@ memcached_return_t memcached_purge(memcached_server_write_instance_st ptr)
       if (rc== MEMCACHED_PROTOCOL_ERROR || rc == MEMCACHED_UNKNOWN_READ_FAILURE)
       {
         WATCHPOINT_ERROR(rc);
-        ret = rc;
+        ret= rc;
         memcached_io_reset(ptr);
+        memcached_set_error(*ptr, rc, MEMCACHED_AT);
       }
 
       if (ptr->root->callbacks != NULL)
index fb045ce1d9a05545e95d8a75dd0b961386e62a7d..fa7599ede2a0f5d4b15e858930ed65531f9444de 100644 (file)
@@ -52,11 +52,9 @@ void memcached_quit_server(memcached_server_st *ptr, bool io_death)
   {
     if (io_death == false && ptr->type != MEMCACHED_CONNECTION_UDP && ptr->options.is_shutting_down == false)
     {
-      memcached_return_t rc;
-      char buffer[MEMCACHED_MAX_BUFFER];
-
       ptr->options.is_shutting_down= true;
 
+      memcached_return_t rc;
       if (ptr->root->flags.binary_protocol)
       {
         protocol_binary_request_quit request= {}; // = {.bytes= {0}};
@@ -70,8 +68,7 @@ void memcached_quit_server(memcached_server_st *ptr, bool io_death)
         rc= memcached_do(ptr, memcached_literal_param("quit\r\n"), true);
       }
 
-      WATCHPOINT_ASSERT(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_FETCH_NOTFINISHED);
-      (void)rc; // Shut up ICC
+      WATCHPOINT_ASSERT(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_FETCH_NOTFINISHED);
 
       /* read until socket is closed, or there is an error
        * closing the socket before all data is read
@@ -81,14 +78,13 @@ void memcached_quit_server(memcached_server_st *ptr, bool io_death)
        * In .40 we began to only do this if we had been doing buffered
        * requests of had replication enabled.
        */
-      if (ptr->root->flags.buffer_requests || ptr->root->number_of_replicas)
+      if (ptr->root->flags.buffer_requests or ptr->root->number_of_replicas)
       {
-        ssize_t nread;
-        while (memcached_io_read(ptr, buffer, sizeof(buffer)/sizeof(*buffer),
-                                 &nread) == MEMCACHED_SUCCESS) {} ;
+        memcached_return_t rc_slurp;
+        while (memcached_continue(rc_slurp= memcached_io_slurp(ptr))) {} ;
+        WATCHPOINT_ASSERT(rc_slurp == MEMCACHED_CONNECTION_FAILURE);
       }
 
-
       /*
        * memcached_io_read may call memcached_quit_server with io_death if
        * it encounters problems, but we don't care about those occurences.
@@ -101,7 +97,8 @@ void memcached_quit_server(memcached_server_st *ptr, bool io_death)
     memcached_io_close(ptr);
   }
 
-  ptr->fd= INVALID_SOCKET;
+  ptr->state= MEMCACHED_SERVER_STATE_NEW;
+  ptr->cursor_active= 0;
   ptr->io_bytes_sent= 0;
   ptr->write_buffer_offset= (size_t) ((ptr->type == MEMCACHED_CONNECTION_UDP) ? UDP_DATAGRAM_HEADER_LENGTH : 0);
   ptr->read_buffer_length= 0;
@@ -133,7 +130,7 @@ void send_quit(memcached_st *ptr)
 
 void memcached_quit(memcached_st *ptr)
 {
-  if (initialize_query(ptr) != MEMCACHED_SUCCESS)
+  if (memcached_failed(initialize_query(ptr)))
   {
     return;
   }
index 6ee62af08ad86b67e2cf8ac2f3f4daf3bcc17197..ff1d77b1bd7954a4f69bf7c7b0d603baccf138c4 100644 (file)
@@ -62,9 +62,9 @@ memcached_return_t memcached_read_one_response(memcached_server_write_instance_s
   else
     rc= textual_read_one_response(ptr, buffer, buffer_length, result);
 
-  unlikely(rc == MEMCACHED_UNKNOWN_READ_FAILURE ||
-           rc == MEMCACHED_PROTOCOL_ERROR ||
-           rc == MEMCACHED_CLIENT_ERROR ||
+  unlikely(rc == MEMCACHED_UNKNOWN_READ_FAILURE or
+           rc == MEMCACHED_PROTOCOL_ERROR or
+           rc == MEMCACHED_CLIENT_ERROR or
            rc == MEMCACHED_MEMORY_ALLOCATION_FAILURE)
     memcached_io_reset(ptr);
 
@@ -211,8 +211,15 @@ static memcached_return_t textual_value_fetch(memcached_server_write_instance_st
     */
     to_read= (value_length) + 2;
     memcached_return_t rrc= memcached_io_read(ptr, value_ptr, to_read, &read_length);
-    if (memcached_failed(rrc))
+    if (memcached_failed(rrc) and rrc == MEMCACHED_IN_PROGRESS)
+    {
+      memcached_quit_server(ptr, true);
+      return memcached_set_error(*ptr, rrc, MEMCACHED_AT);
+    }
+    else if (memcached_failed(rrc))
+    {
       return rrc;
+    }
   }
 
   if (read_length != (ssize_t)(value_length + 2))
@@ -225,7 +232,7 @@ static memcached_return_t textual_value_fetch(memcached_server_write_instance_st
     char *char_ptr;
     char_ptr= memcached_string_value_mutable(&result->value);;
     char_ptr[value_length]= 0;
-    char_ptr[value_length + 1]= 0;
+    char_ptr[value_length +1]= 0;
     memcached_string_set_length(&result->value, value_length);
   }
 
@@ -242,8 +249,10 @@ static memcached_return_t textual_read_one_response(memcached_server_write_insta
                                                     memcached_result_st *result)
 {
   memcached_return_t rc= memcached_io_readline(ptr, buffer, buffer_length);
-  if (rc != MEMCACHED_SUCCESS)
+  if (memcached_failed(rc))
+  {
     return rc;
+  }
 
   switch(buffer[0])
   {
@@ -384,7 +393,7 @@ static memcached_return_t binary_read_one_response(memcached_server_write_instan
   header.response.keylen= ntohs(header.response.keylen);
   header.response.status= ntohs(header.response.status);
   header.response.bodylen= ntohl(header.response.bodylen);
-  header.response.cas= ntohll(header.response.cas);
+  header.response.cas= memcached_ntohll(header.response.cas);
   uint32_t bodylen= header.response.bodylen;
 
   if (header.response.status == PROTOCOL_BINARY_RESPONSE_SUCCESS ||
@@ -450,7 +459,7 @@ static memcached_return_t binary_read_one_response(memcached_server_write_instan
           return MEMCACHED_UNKNOWN_READ_FAILURE;
         }
 
-        val= ntohll(val);
+        val= memcached_ntohll(val);
         memcpy(buffer, &val, sizeof(val));
       }
       break;
index f9d55a9412c1087d6ca0a0e0a2407b301aa8bf92..851337f30facf159c5fe0b59fbbd43587f44bc30 100644 (file)
@@ -52,6 +52,7 @@ static inline void _result_init(memcached_result_st *self,
   self->key_length= 0;
   self->item_cas= 0;
   self->root= memc;
+  self->count= 0;
   self->item_key[0]= 0;
 }
 
@@ -69,8 +70,10 @@ memcached_result_st *memcached_result_create(const memcached_st *memc,
   {
     ptr= static_cast<memcached_result_st *>(libmemcached_malloc(memc, sizeof(memcached_result_st)));
 
-    if (ptr == NULL)
+    if (not ptr)
+    {
       return NULL;
+    }
 
     ptr->options.is_allocated= true;
   }
@@ -110,6 +113,7 @@ void memcached_result_free(memcached_result_st *ptr)
   }
   else
   {
+    ptr->count= 0;
     ptr->options.is_initialized= false;
   }
 }
index 6142ba82e74f948c6f35fb29e9b448f57a404704..41608b5b8f89e081893f031c29d2a9f4f76adc09 100644 (file)
@@ -44,6 +44,7 @@ struct memcached_result_st {
   uint64_t item_cas;
   memcached_st *root;
   memcached_string_st value;
+  uint64_t count;
   char item_key[MEMCACHED_MAX_KEY];
   struct {
     bool is_allocated:1;
index 634651c84a6ecd75c872dd17e35acb5f92198e11..0d3148429f46be9ad901f28c104c9ff4b6688d10 100644 (file)
@@ -39,9 +39,9 @@
 enum memcached_return_t {
   MEMCACHED_SUCCESS,
   MEMCACHED_FAILURE,
-  MEMCACHED_HOST_LOOKUP_FAILURE, // getaddrinfo() only
-  MEMCACHED_CONNECTION_FAILURE,  // DEPRECATED
-  MEMCACHED_CONNECTION_BIND_FAILURE,  // DEPRECATED
+  MEMCACHED_HOST_LOOKUP_FAILURE, // getaddrinfo() and getnameinfo() only
+  MEMCACHED_CONNECTION_FAILURE,
+  MEMCACHED_CONNECTION_BIND_FAILURE,  // DEPRECATED, see MEMCACHED_HOST_LOOKUP_FAILURE
   MEMCACHED_WRITE_FAILURE,
   MEMCACHED_READ_FAILURE,
   MEMCACHED_UNKNOWN_READ_FAILURE,
@@ -83,6 +83,7 @@ enum memcached_return_t {
   MEMCACHED_PARSE_ERROR,
   MEMCACHED_PARSE_USER_ERROR,
   MEMCACHED_DEPRECATED,
+  MEMCACHED_IN_PROGRESS,
   MEMCACHED_MAXIMUM_RETURN /* Always add new error code before */
 };
 
@@ -91,6 +92,7 @@ typedef enum memcached_return_t memcached_return_t;
 #endif
 
 
-#define memcached_success(X) ((X) == MEMCACHED_SUCCESS)
-#define memcached_failed(A) ((A) != MEMCACHED_SUCCESS)
+#define memcached_success(__memcached_return_t) ((__memcached_return_t) == MEMCACHED_SUCCESS or (__memcached_return_t) == MEMCACHED_END)
+#define memcached_failed(__memcached_return_t) ((__memcached_return_t) != MEMCACHED_SUCCESS and (__memcached_return_t) != MEMCACHED_END)
+#define memcached_continue(__memcached_return_t) ((__memcached_return_t) == MEMCACHED_IN_PROGRESS)
 
index 686b6a38af9438204b7f71bf80745d80ead81d2c..434d2db6af7ccd2d97a0d41b08cc50b112a5c28c 100644 (file)
@@ -36,6 +36,7 @@
  */
 
 #include <libmemcached/common.h>
+#include <iso646.h>
 
 void memcached_set_sasl_callbacks(memcached_st *ptr,
                                   const sasl_callback_t *callbacks)
@@ -56,39 +57,44 @@ const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st *ptr)
  * @param raddr remote address (out)
  * @return true on success false otherwise (errno contains more info)
  */
-static bool resolve_names(int fd, char *laddr, size_t laddr_length, char *raddr, size_t raddr_length)
+static memcached_return_t resolve_names(int fd, char *laddr, size_t laddr_length, char *raddr, size_t raddr_length)
 {
   char host[NI_MAXHOST];
   char port[NI_MAXSERV];
   struct sockaddr_storage saddr;
   socklen_t salen= sizeof(saddr);
 
-  if ((getsockname(fd, (struct sockaddr *)&saddr, &salen) < 0) ||
-      (getnameinfo((struct sockaddr *)&saddr, salen, host, sizeof(host),
-                   port, sizeof(port), NI_NUMERICHOST | NI_NUMERICSERV) < 0))
+  if (getsockname(fd, (struct sockaddr *)&saddr, &salen) < 0)
   {
-    return false;
+    return MEMCACHED_ERRNO;
+  }
+
+  if (getnameinfo((struct sockaddr *)&saddr, salen, host, sizeof(host), port, sizeof(port), NI_NUMERICHOST | NI_NUMERICSERV) < 0)
+  {
+    return MEMCACHED_HOST_LOOKUP_FAILURE;
   }
 
   (void)snprintf(laddr, laddr_length, "%s;%s", host, port);
   salen= sizeof(saddr);
 
-  if ((getpeername(fd, (struct sockaddr *)&saddr, &salen) < 0) ||
-      (getnameinfo((struct sockaddr *)&saddr, salen, host, sizeof(host),
-                   port, sizeof(port), NI_NUMERICHOST | NI_NUMERICSERV) < 0))
+  if (getpeername(fd, (struct sockaddr *)&saddr, &salen) < 0)
+  {
+    return MEMCACHED_ERRNO;
+  }
+
+  if (getnameinfo((struct sockaddr *)&saddr, salen, host, sizeof(host),
+                   port, sizeof(port), NI_NUMERICHOST | NI_NUMERICSERV) < 0)
   {
-    return false;
+    return MEMCACHED_HOST_LOOKUP_FAILURE;
   }
 
   (void)snprintf(raddr, raddr_length, "%s;%s", host, port);
 
-  return true;
+  return MEMCACHED_SUCCESS;
 }
 
 memcached_return_t memcached_sasl_authenticate_connection(memcached_server_st *server)
 {
-  memcached_return_t rc;
-
   /* SANITY CHECK: SASL can only be used with the binary protocol */
   if (!server->root->flags.binary_protocol)
     return MEMCACHED_FAILURE;
@@ -113,8 +119,8 @@ memcached_return_t memcached_sasl_authenticate_connection(memcached_server_st *s
   memcached_server_response_increment(server);
 
   char mech[MEMCACHED_MAX_BUFFER];
-  rc= memcached_response(server, mech, sizeof(mech), NULL);
-  if (rc != MEMCACHED_SUCCESS)
+  memcached_return_t rc= memcached_response(server, mech, sizeof(mech), NULL);
+  if (memcached_failed(rc))
   {
     if (rc == MEMCACHED_PROTOCOL_ERROR)
     {
@@ -134,15 +140,13 @@ memcached_return_t memcached_sasl_authenticate_connection(memcached_server_st *s
   char laddr[NI_MAXHOST + NI_MAXSERV];
   char raddr[NI_MAXHOST + NI_MAXSERV];
 
-  unlikely (!resolve_names(server->fd, laddr, sizeof(laddr), raddr, sizeof(raddr)))
+  if (memcached_failed(rc= resolve_names(server->fd, laddr, sizeof(laddr), raddr, sizeof(raddr))))
   {
-    server->cached_errno= errno;
-    return MEMCACHED_ERRNO;
+    return rc;
   }
 
   sasl_conn_t *conn;
-  int ret= sasl_client_new("memcached", server->hostname, laddr, raddr,
-                          server->root->sasl.callbacks, 0, &conn);
+  int ret= sasl_client_new("memcached", server->hostname, laddr, raddr, server->root->sasl.callbacks, 0, &conn);
   if (ret != SASL_OK)
   {
     return MEMCACHED_AUTH_PROBLEM;
@@ -249,34 +253,36 @@ memcached_return_t memcached_set_sasl_auth_data(memcached_st *ptr,
     return MEMCACHED_FAILURE;
   }
 
-  sasl_callback_t *cb= libmemcached_calloc(ptr, 4, sizeof(sasl_callback_t));
-  char *name= libmemcached_malloc(ptr, strlen(username) + 1);
+  sasl_callback_t *callbacks= libmemcached_calloc(ptr, 4, sizeof(sasl_callback_t));
   size_t password_length= strlen(password);
-  sasl_secret_t *secret= libmemcached_malloc(ptr, password_length +1 + sizeof(*secret));
-  if (cb == NULL || name == NULL || secret == NULL)
+  size_t username_length= strlen(username);
+  char *name= libmemcached_malloc(ptr, username_length +1);
+  sasl_secret_t *secret= libmemcached_malloc(ptr, password_length +1 + sizeof(sasl_secret_t));
+
+  if (callbacks == NULL || name == NULL || secret == NULL)
   {
-    libmemcached_free(ptr, cb);
+    libmemcached_free(ptr, callbacks);
     libmemcached_free(ptr, name);
     libmemcached_free(ptr, secret);
     return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
   }
 
-  secret->len= strlen(password);
+  secret->len= password_length;
   memcpy(secret->data, password, password_length);
   secret->data[password_length]= 0;
 
-  cb[0].id= SASL_CB_USER;
-  cb[0].proc= get_username;
-  cb[0].context= strncpy(name, username, sizeof(cb[0].context));
-  cb[1].id= SASL_CB_AUTHNAME;
-  cb[1].proc= get_username;
-  cb[1].context= name;
-  cb[2].id= SASL_CB_PASS;
-  cb[2].proc= get_password;
-  cb[2].context= secret;
-  cb[3].id= SASL_CB_LIST_END;
-
-  ptr->sasl.callbacks= cb;
+  callbacks[0].id= SASL_CB_USER;
+  callbacks[0].proc= get_username;
+  callbacks[0].context= strncpy(name, username, username_length +1);
+  callbacks[1].id= SASL_CB_AUTHNAME;
+  callbacks[1].proc= get_username;
+  callbacks[1].context= name;
+  callbacks[2].id= SASL_CB_PASS;
+  callbacks[2].proc= get_password;
+  callbacks[2].context= secret;
+  callbacks[3].id= SASL_CB_LIST_END;
+
+  ptr->sasl.callbacks= callbacks;
   ptr->sasl.is_allocated= true;
 
   return MEMCACHED_SUCCESS;
@@ -348,21 +354,21 @@ memcached_return_t memcached_clone_sasl(memcached_st *clone, const  memcached_st
     ++total;
   }
 
-  sasl_callback_t *cb= libmemcached_calloc(clone, total + 1, sizeof(sasl_callback_t));
-  if (cb == NULL)
+  sasl_callback_t *callbacks= libmemcached_calloc(clone, total + 1, sizeof(sasl_callback_t));
+  if (callbacks == NULL)
   {
     return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
   }
-  memcpy(cb, source->sasl.callbacks, (total + 1) * sizeof(sasl_callback_t));
+  memcpy(callbacks, source->sasl.callbacks, (total + 1) * sizeof(sasl_callback_t));
 
   /* Now update the context... */
   for (size_t x= 0; x < total; ++x)
   {
-    if (cb[x].id == SASL_CB_USER || cb[x].id == SASL_CB_AUTHNAME)
+    if (callbacks[x].id == SASL_CB_USER || callbacks[x].id == SASL_CB_AUTHNAME)
     {
-      cb[x].context= libmemcached_malloc(clone, strlen(source->sasl.callbacks[x].context));
+      callbacks[x].context= libmemcached_malloc(clone, strlen(source->sasl.callbacks[x].context));
 
-      if (cb[x].context == NULL)
+      if (callbacks[x].context == NULL)
       {
         /* Failed to allocate memory, clean up previously allocated memory */
         for (size_t y= 0; y < x; ++y)
@@ -370,10 +376,10 @@ memcached_return_t memcached_clone_sasl(memcached_st *clone, const  memcached_st
           libmemcached_free(clone, clone->sasl.callbacks[y].context);
         }
 
-        libmemcached_free(clone, cb);
+        libmemcached_free(clone, callbacks);
         return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
       }
-      strncpy(cb[x].context, source->sasl.callbacks[x].context, sizeof(cb[x].context));
+      strncpy(callbacks[x].context, source->sasl.callbacks[x].context, sizeof(callbacks[x].context));
     }
     else
     {
@@ -387,15 +393,15 @@ memcached_return_t memcached_clone_sasl(memcached_st *clone, const  memcached_st
           libmemcached_free(clone, clone->sasl.callbacks[y].context);
         }
 
-        libmemcached_free(clone, cb);
+        libmemcached_free(clone, callbacks);
         return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
       }
       memcpy(n, src, src->len + 1 + sizeof(*n));
-      cb[x].context= n;
+      callbacks[x].context= n;
     }
   }
 
-  clone->sasl.callbacks= cb;
+  clone->sasl.callbacks= callbacks;
   clone->sasl.is_allocated= true;
 
   return MEMCACHED_SUCCESS;
index 57540ccff06d150f9db5c1ed5e997ffe086a7783..ea88967d444716d4599e8194f832d12b2436a0c2 100644 (file)
@@ -69,6 +69,8 @@ static inline void _server_init(memcached_server_st *self, memcached_st *root,
   self->address_info= NULL;
   self->address_info_next= NULL;
 
+  self->state= MEMCACHED_SERVER_STATE_NEW;
+
   if (root)
   {
     self->next_retry= root->retry_timeout;
@@ -80,13 +82,13 @@ static inline void _server_init(memcached_server_st *self, memcached_st *root,
 
   self->root= root;
   self->limit_maxbytes= 0;
-  if (hostname == NULL)
+  if (hostname)
   {
-    self->hostname[0]= 0;
+    strncpy(self->hostname, hostname, NI_MAXHOST - 1);
   }
   else
   {
-    strncpy(self->hostname, hostname, NI_MAXHOST - 1);
+    self->hostname[0]= 0;
   }
 }
 
@@ -294,8 +296,7 @@ void memcached_server_list_free(memcached_server_list_st self)
     }
   }
 
-  memcached_st *root= self->root;
-  libmemcached_free(root, self);
+  libmemcached_free(self->root, self);
 }
 
 uint32_t memcached_servers_set_count(memcached_server_st *servers, uint32_t count)
index b04410d64646a47cddf22c50ca740e64bf42cdb6..9000454988f7ac99dbc2d27e7c8df0b955139e6d 100644 (file)
 
 #pragma once
 
+enum memcached_server_state_t {
+  MEMCACHED_SERVER_STATE_NEW, // fd == -1, no address lookup has been done
+  MEMCACHED_SERVER_STATE_ADDRINFO, // ADDRRESS information has been gathered
+  MEMCACHED_SERVER_STATE_IN_PROGRESS,
+  MEMCACHED_SERVER_STATE_CONNECTED
+};
+
 struct memcached_server_st {
   struct {
     bool is_allocated:1;
@@ -53,6 +60,7 @@ struct memcached_server_st {
   uint32_t io_bytes_sent; /* # bytes sent since last read */
   uint32_t server_failure_counter;
   uint32_t weight;
+  enum memcached_server_state_t state;
   struct {
     uint32_t read;
     uint32_t write;
index eb2904438e746223ff399d5dbde01dcfce6e7555..5a2013e815b9d44a5da236dc0250170ee456527e 100644 (file)
@@ -53,121 +53,121 @@ static memcached_return_t set_data(memcached_stat_st *memc_stat, char *key, char
     WATCHPOINT_STRING(key);
     return MEMCACHED_UNKNOWN_STAT_KEY;
   }
-  else if (!strcmp("pid", key))
+  else if (not strcmp("pid", key))
   {
-    memc_stat->pid= (uint32_t) strtol(value, (char **)NULL, 10);
+    memc_stat->pid= strtoul(value, (char **)NULL, 10);
   }
-  else if (!strcmp("uptime", key))
+  else if (not strcmp("uptime", key))
   {
-    memc_stat->uptime= (uint32_t) strtol(value, (char **)NULL, 10);
+    memc_stat->uptime= strtoul(value, (char **)NULL, 10);
   }
-  else if (!strcmp("time", key))
+  else if (not strcmp("time", key))
   {
-    memc_stat->time= (uint32_t) strtol(value, (char **)NULL, 10);
+    memc_stat->time= strtoul(value, (char **)NULL, 10);
   }
-  else if (!strcmp("version", key))
+  else if (not strcmp("version", key))
   {
     memcpy(memc_stat->version, value, strlen(value));
     memc_stat->version[strlen(value)]= 0;
   }
-  else if (!strcmp("pointer_size", key))
+  else if (not strcmp("pointer_size", key))
   {
-    memc_stat->pointer_size= (uint32_t) strtol(value, (char **)NULL, 10);
+    memc_stat->pointer_size= strtoul(value, (char **)NULL, 10);
   }
-  else if (!strcmp("rusage_user", key))
+  else if (not strcmp("rusage_user", key))
   {
     char *walk_ptr;
     for (walk_ptr= value; (!ispunct(*walk_ptr)); walk_ptr++) {};
     *walk_ptr= 0;
     walk_ptr++;
-    memc_stat->rusage_user_seconds= (uint32_t) strtol(value, (char **)NULL, 10);
-    memc_stat->rusage_user_microseconds= (uint32_t) strtol(walk_ptr, (char **)NULL, 10);
+    memc_stat->rusage_user_seconds= strtoul(value, (char **)NULL, 10);
+    memc_stat->rusage_user_microseconds= strtoul(walk_ptr, (char **)NULL, 10);
   }
-  else if (!strcmp("rusage_system", key))
+  else if (not strcmp("rusage_system", key))
   {
     char *walk_ptr;
     for (walk_ptr= value; (!ispunct(*walk_ptr)); walk_ptr++) {};
     *walk_ptr= 0;
     walk_ptr++;
-    memc_stat->rusage_system_seconds= (uint32_t) strtol(value, (char **)NULL, 10);
-    memc_stat->rusage_system_microseconds= (uint32_t) strtol(walk_ptr, (char **)NULL, 10);
+    memc_stat->rusage_system_seconds= strtoul(value, (char **)NULL, 10);
+    memc_stat->rusage_system_microseconds= strtoul(walk_ptr, (char **)NULL, 10);
   }
-  else if (!strcmp("curr_items", key))
+  else if (not strcmp("curr_items", key))
   {
-    memc_stat->curr_items= (uint32_t) strtol(value, (char **)NULL, 10);
+    memc_stat->curr_items= strtoul(value, (char **)NULL, 10);
   }
-  else if (!strcmp("total_items", key))
+  else if (not strcmp("total_items", key))
   {
-    memc_stat->total_items= (uint32_t) strtol(value, (char **)NULL, 10);
+    memc_stat->total_items= strtoul(value, (char **)NULL, 10);
   }
-  else if (!strcmp("bytes_read", key))
+  else if (not strcmp("bytes_read", key))
   {
-    memc_stat->bytes_read= (uint32_t) strtoll(value, (char **)NULL, 10);
+    memc_stat->bytes_read= strtoull(value, (char **)NULL, 10);
   }
-  else if (!strcmp("bytes_written", key))
+  else if (not strcmp("bytes_written", key))
   {
-    memc_stat->bytes_written= (uint32_t) strtoll(value, (char **)NULL, 10);
+    memc_stat->bytes_written= strtoull(value, (char **)NULL, 10);
   }
-  else if (!strcmp("bytes", key))
+  else if (not strcmp("bytes", key))
   {
-    memc_stat->bytes= (uint32_t) strtoll(value, (char **)NULL, 10);
+    memc_stat->bytes= strtoull(value, (char **)NULL, 10);
   }
-  else if (!strcmp("curr_connections", key))
+  else if (not strcmp("curr_connections", key))
   {
-    memc_stat->curr_connections= (uint32_t) strtoll(value, (char **)NULL, 10);
+    memc_stat->curr_connections= strtoull(value, (char **)NULL, 10);
   }
-  else if (!strcmp("total_connections", key))
+  else if (not strcmp("total_connections", key))
   {
-    memc_stat->total_connections= (uint32_t) strtoll(value, (char **)NULL, 10);
+    memc_stat->total_connections= strtoull(value, (char **)NULL, 10);
   }
-  else if (!strcmp("connection_structures", key))
+  else if (not strcmp("connection_structures", key))
   {
-    memc_stat->connection_structures= (uint32_t) strtol(value, (char **)NULL, 10);
+    memc_stat->connection_structures= strtoul(value, (char **)NULL, 10);
   }
-  else if (!strcmp("cmd_get", key))
+  else if (not strcmp("cmd_get", key))
   {
-    memc_stat->cmd_get= (uint64_t) strtoll(value, (char **)NULL, 10);
+    memc_stat->cmd_get= strtoull(value, (char **)NULL, 10);
   }
-  else if (!strcmp("cmd_set", key))
+  else if (not strcmp("cmd_set", key))
   {
-    memc_stat->cmd_set= (uint64_t) strtoll(value, (char **)NULL, 10);
+    memc_stat->cmd_set= strtoull(value, (char **)NULL, 10);
   }
-  else if (!strcmp("get_hits", key))
+  else if (not strcmp("get_hits", key))
   {
-    memc_stat->get_hits= (uint64_t) strtoll(value, (char **)NULL, 10);
+    memc_stat->get_hits= strtoull(value, (char **)NULL, 10);
   }
-  else if (!strcmp("get_misses", key))
+  else if (not strcmp("get_misses", key))
   {
-    memc_stat->get_misses= (uint64_t)strtoll(value, (char **)NULL, 10);
+    memc_stat->get_misses= strtoull(value, (char **)NULL, 10);
   }
-  else if (!strcmp("evictions", key))
+  else if (not strcmp("evictions", key))
   {
-    memc_stat->evictions= (uint64_t)strtoll(value, (char **)NULL, 10);
+    memc_stat->evictions= strtoull(value, (char **)NULL, 10);
   }
-  else if (!strcmp("limit_maxbytes", key))
+  else if (not strcmp("limit_maxbytes", key))
   {
-    memc_stat->limit_maxbytes= (uint64_t) strtoll(value, (char **)NULL, 10);
+    memc_stat->limit_maxbytes= strtoull(value, (char **)NULL, 10);
   }
-  else if (!strcmp("threads", key))
+  else if (not strcmp("threads", key))
   {
-    memc_stat->threads= (uint32_t) strtol(value, (char **)NULL, 10);
+    memc_stat->threads= strtoul(value, (char **)NULL, 10);
   }
-  else if (!(strcmp("delete_misses", key) == 0 ||/* New stats in the 1.3 beta */
-             strcmp("delete_hits", key) == 0 ||/* Just swallow them for now.. */
-             strcmp("incr_misses", key) == 0 ||
-             strcmp("incr_hits", key) == 0 ||
-             strcmp("decr_misses", key) == 0 ||
-             strcmp("decr_hits", key) == 0 ||
-             strcmp("cas_misses", key) == 0 ||
-             strcmp("cas_hits", key) == 0 ||
-             strcmp("cas_badval", key) == 0 ||
-             strcmp("cmd_flush", key) == 0 ||
-             strcmp("accepting_conns", key) == 0 ||
-             strcmp("listen_disabled_num", key) == 0 ||
-             strcmp("conn_yields", key) == 0 ||
-             strcmp("auth_cmds", key) == 0 ||
-             strcmp("auth_errors", key) == 0 ||
-             strcmp("reclaimed", key) == 0))
+  else if (not (strcmp("delete_misses", key) == 0 or /* New stats in the 1.3 beta */
+                strcmp("delete_hits", key) == 0 or /* Just swallow them for now.. */
+                strcmp("incr_misses", key) == 0 or
+                strcmp("incr_hits", key) == 0 or
+                strcmp("decr_misses", key) == 0 or
+                strcmp("decr_hits", key) == 0 or
+                strcmp("cas_misses", key) == 0 or
+                strcmp("cas_hits", key) == 0 or
+                strcmp("cas_badval", key) == 0 or
+                strcmp("cmd_flush", key) == 0 or
+                strcmp("accepting_conns", key) == 0 or
+                strcmp("listen_disabled_num", key) == 0 or
+                strcmp("conn_yields", key) == 0 or
+                strcmp("auth_cmds", key) == 0 or
+                strcmp("auth_errors", key) == 0 or
+                strcmp("reclaimed", key) == 0))
   {
     WATCHPOINT_STRING(key);
     /* return MEMCACHED_UNKNOWN_STAT_KEY; */
@@ -186,50 +186,94 @@ char *memcached_stat_get_value(const memcached_st *ptr, memcached_stat_st *memc_
 
   *error= MEMCACHED_SUCCESS;
 
-  if (!memcmp("pid", key, sizeof("pid") -1))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%u", memc_stat->pid);
-  else if (!memcmp("uptime", key, sizeof("uptime") -1))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%u", memc_stat->uptime);
-  else if (!memcmp("time", key, sizeof("time") -1))
+  if (not memcmp("pid", key, sizeof("pid") -1))
+  {
+    length= snprintf(buffer, SMALL_STRING_LEN,"%lu", memc_stat->pid);
+  }
+  else if (not memcmp("uptime", key, sizeof("uptime") -1))
+  {
+    length= snprintf(buffer, SMALL_STRING_LEN,"%lu", memc_stat->uptime);
+  }
+  else if (not memcmp("time", key, sizeof("time") -1))
+  {
     length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->time);
-  else if (!memcmp("version", key, sizeof("version") -1))
+  }
+  else if (not memcmp("version", key, sizeof("version") -1))
+  {
     length= snprintf(buffer, SMALL_STRING_LEN,"%s", memc_stat->version);
-  else if (!memcmp("pointer_size", key, sizeof("pointer_size") -1))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%u", memc_stat->pointer_size);
-  else if (!memcmp("rusage_user", key, sizeof("rusage_user") -1))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%u.%u", memc_stat->rusage_user_seconds, memc_stat->rusage_user_microseconds);
-  else if (!memcmp("rusage_system", key, sizeof("rusage_system") -1))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%u.%u", memc_stat->rusage_system_seconds, memc_stat->rusage_system_microseconds);
-  else if (!memcmp("curr_items", key, sizeof("curr_items") -1))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%u", memc_stat->curr_items);
-  else if (!memcmp("total_items", key, sizeof("total_items") -1))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%u", memc_stat->total_items);
-  else if (!memcmp("curr_connections", key, sizeof("curr_connections") -1))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%u", memc_stat->curr_connections);
-  else if (!memcmp("total_connections", key, sizeof("total_connections") -1))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%u", memc_stat->total_connections);
-  else if (!memcmp("connection_structures", key, sizeof("connection_structures") -1))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%u", memc_stat->connection_structures);
-  else if (!memcmp("cmd_get", key, sizeof("cmd_get") -1))
+  }
+  else if (not memcmp("pointer_size", key, sizeof("pointer_size") -1))
+  {
+    length= snprintf(buffer, SMALL_STRING_LEN,"%lu", memc_stat->pointer_size);
+  }
+  else if (not memcmp("rusage_user", key, sizeof("rusage_user") -1))
+  {
+    length= snprintf(buffer, SMALL_STRING_LEN,"%lu.%lu", memc_stat->rusage_user_seconds, memc_stat->rusage_user_microseconds);
+  }
+  else if (not memcmp("rusage_system", key, sizeof("rusage_system") -1))
+  {
+    length= snprintf(buffer, SMALL_STRING_LEN,"%lu.%lu", memc_stat->rusage_system_seconds, memc_stat->rusage_system_microseconds);
+  }
+  else if (not memcmp("curr_items", key, sizeof("curr_items") -1))
+  {
+    length= snprintf(buffer, SMALL_STRING_LEN,"%lu", memc_stat->curr_items);
+  }
+  else if (not memcmp("total_items", key, sizeof("total_items") -1))
+  {
+    length= snprintf(buffer, SMALL_STRING_LEN,"%lu", memc_stat->total_items);
+  }
+  else if (not memcmp("curr_connections", key, sizeof("curr_connections") -1))
+  {
+    length= snprintf(buffer, SMALL_STRING_LEN,"%lu", memc_stat->curr_connections);
+  }
+  else if (not memcmp("total_connections", key, sizeof("total_connections") -1))
+  {
+    length= snprintf(buffer, SMALL_STRING_LEN,"%lu", memc_stat->total_connections);
+  }
+  else if (not memcmp("connection_structures", key, sizeof("connection_structures") -1))
+  {
+    length= snprintf(buffer, SMALL_STRING_LEN,"%lu", memc_stat->connection_structures);
+  }
+  else if (not memcmp("cmd_get", key, sizeof("cmd_get") -1))
+  {
     length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->cmd_get);
-  else if (!memcmp("cmd_set", key, sizeof("cmd_set") -1))
+  }
+  else if (not memcmp("cmd_set", key, sizeof("cmd_set") -1))
+  {
     length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->cmd_set);
-  else if (!memcmp("get_hits", key, sizeof("get_hits") -1))
+  }
+  else if (not memcmp("get_hits", key, sizeof("get_hits") -1))
+  {
     length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->get_hits);
-  else if (!memcmp("get_misses", key, sizeof("get_misses") -1))
+  }
+  else if (not memcmp("get_misses", key, sizeof("get_misses") -1))
+  {
     length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->get_misses);
-  else if (!memcmp("evictions", key, sizeof("evictions") -1))
+  }
+  else if (not memcmp("evictions", key, sizeof("evictions") -1))
+  {
     length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->evictions);
-  else if (!memcmp("bytes_read", key, sizeof("bytes_read") -1))
+  }
+  else if (not memcmp("bytes_read", key, sizeof("bytes_read") -1))
+  {
     length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->bytes_read);
-  else if (!memcmp("bytes_written", key, sizeof("bytes_written") -1))
+  }
+  else if (not memcmp("bytes_written", key, sizeof("bytes_written") -1))
+  {
     length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->bytes_written);
-  else if (!memcmp("bytes", key, sizeof("bytes") -1))
+  }
+  else if (not memcmp("bytes", key, sizeof("bytes") -1))
+  {
     length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->bytes);
-  else if (!memcmp("limit_maxbytes", key, sizeof("limit_maxbytes") -1))
+  }
+  else if (not memcmp("limit_maxbytes", key, sizeof("limit_maxbytes") -1))
+  {
     length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->limit_maxbytes);
-  else if (! memcmp("threads", key, sizeof("threads") -1))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%u", memc_stat->threads);
+  }
+  else if (not memcmp("threads", key, sizeof("threads") -1))
+  {
+    length= snprintf(buffer, SMALL_STRING_LEN,"%lu", memc_stat->threads);
+  }
   else
   {
     *error= MEMCACHED_NOTFOUND;
@@ -254,19 +298,17 @@ static memcached_return_t binary_stats_fetch(memcached_stat_st *memc_stat,
                                              memcached_server_write_instance_st instance,
                                              struct local_context *check)
 {
-  memcached_return_t rc;
-
   char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
   protocol_binary_request_stats request= {}; // = {.bytes= {0}};
   request.message.header.request.magic= PROTOCOL_BINARY_REQ;
   request.message.header.request.opcode= PROTOCOL_BINARY_CMD_STAT;
   request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES;
 
-  if (args != NULL)
+  if (args)
   {
     size_t len= strlen(args);
 
-    rc= memcached_validate_key_length(len, true);
+    memcached_return_t rc= memcached_validate_key_length(len, true);
     unlikely (rc != MEMCACHED_SUCCESS)
       return rc;
 
@@ -298,7 +340,7 @@ static memcached_return_t binary_stats_fetch(memcached_stat_st *memc_stat,
   memcached_server_response_decrement(instance);
   do
   {
-    rc= memcached_response(instance, buffer, sizeof(buffer), NULL);
+    memcached_return_t rc= memcached_response(instance, buffer, sizeof(buffer), NULL);
 
     if (rc == MEMCACHED_END)
       break;
@@ -413,8 +455,6 @@ error:
 memcached_stat_st *memcached_stat(memcached_st *self, char *args, memcached_return_t *error)
 {
   memcached_return_t rc;
-  memcached_stat_st *stats;
-
   if ((rc= initialize_query(self)) != MEMCACHED_SUCCESS)
   {
     if (error)
@@ -433,9 +473,9 @@ memcached_stat_st *memcached_stat(memcached_st *self, char *args, memcached_retu
     return NULL;
   }
 
-  stats= static_cast<memcached_stat_st *>(libmemcached_calloc(self, memcached_server_count(self), sizeof(memcached_stat_st)));
+  memcached_stat_st *stats= static_cast<memcached_stat_st *>(libmemcached_calloc(self, memcached_server_count(self), sizeof(memcached_stat_st)));
 
-  if (! stats)
+  if (not stats)
   {
     if (error)
       *error= MEMCACHED_MEMORY_ALLOCATION_FAILURE;
@@ -451,7 +491,7 @@ memcached_stat_st *memcached_stat(memcached_st *self, char *args, memcached_retu
     memcached_server_write_instance_st instance;
     memcached_stat_st *stat_instance;
 
-    stat_instance= stats + x;
+    stat_instance= stats +x;
 
     stat_instance->root= self;
 
@@ -480,13 +520,12 @@ memcached_return_t memcached_stat_servername(memcached_stat_st *memc_stat, char
                                              const char *hostname, in_port_t port)
 {
   memcached_st memc;
-  memcached_st *memc_ptr;
   memcached_server_write_instance_st instance;
 
   memset(memc_stat, 0, sizeof(memcached_stat_st));
 
-  memc_ptr= memcached_create(&memc);
-  if (! memc_ptr)
+  memcached_st *memc_ptr= memcached_create(&memc);
+  if (not memc_ptr)
     return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
 
   memcached_server_add(&memc, hostname, port);
@@ -517,20 +556,17 @@ memcached_return_t memcached_stat_servername(memcached_stat_st *memc_stat, char
   We make a copy of the keys since at some point in the not so distant future
   we will add support for "found" keys.
 */
-char ** memcached_stat_get_keys(const memcached_st *ptr,
-                                memcached_stat_st *memc_stat,
+char ** memcached_stat_get_keys(memcached_st *ptr,
+                                memcached_stat_st *,
                                 memcached_return_t *error)
 {
-  char **list;
-  size_t length= sizeof(memcached_stat_keys);
-
-  (void)memc_stat;
-
-  list= static_cast<char **>(libmemcached_malloc(ptr, length));
+  if (not ptr)
+    return NULL;
 
+  char **list= static_cast<char **>(libmemcached_malloc(ptr, sizeof(memcached_stat_keys)));
   if (not list)
   {
-    *error= MEMCACHED_MEMORY_ALLOCATION_FAILURE;
+    *error= memcached_set_error(*ptr, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT);
     return NULL;
   }
 
@@ -541,11 +577,11 @@ char ** memcached_stat_get_keys(const memcached_st *ptr,
   return list;
 }
 
-void memcached_stat_free(const memcached_st *ptr, memcached_stat_st *memc_stat)
+void memcached_stat_free(const memcached_st *, memcached_stat_st *memc_stat)
 {
-  if (memc_stat == NULL)
+  WATCHPOINT_ASSERT(memc_stat); // Be polite, but when debugging catch this as an error
+  if (not memc_stat)
   {
-    WATCHPOINT_ASSERT(0); /* Be polite, but when debugging catch this as an error */
     return;
   }
 
@@ -555,7 +591,7 @@ void memcached_stat_free(const memcached_st *ptr, memcached_stat_st *memc_stat)
     return;
   }
 
-  libmemcached_free(ptr, memc_stat);
+  libmemcached_free(NULL, memc_stat);
 }
 
 static memcached_return_t call_stat_fn(memcached_st *ptr,
index 6742a2f3cf22ddfb0d7b18b8359ae3c96ad0683b..3f8aa50006ee4da308364a98d6d507b46cb6a550 100644 (file)
 
 #pragma once
 
-
 struct memcached_stat_st {
-  uint32_t connection_structures;
-  uint32_t curr_connections;
-  uint32_t curr_items;
-  uint32_t pid;
-  uint32_t pointer_size;
-  uint32_t rusage_system_microseconds;
-  uint32_t rusage_system_seconds;
-  uint32_t rusage_user_microseconds;
-  uint32_t rusage_user_seconds;
-  uint32_t threads;
-  uint32_t time;
-  uint32_t total_connections;
-  uint32_t total_items;
-  uint32_t uptime;
-  uint64_t bytes;
-  uint64_t bytes_read;
-  uint64_t bytes_written;
-  uint64_t cmd_get;
-  uint64_t cmd_set;
-  uint64_t evictions;
-  uint64_t get_hits;
-  uint64_t get_misses;
-  uint64_t limit_maxbytes;
+  unsigned long connection_structures;
+  unsigned long curr_connections;
+  unsigned long curr_items;
+  unsigned long pid;
+  unsigned long pointer_size;
+  unsigned long rusage_system_microseconds;
+  unsigned long rusage_system_seconds;
+  unsigned long rusage_user_microseconds;
+  unsigned long rusage_user_seconds;
+  unsigned long threads;
+  unsigned long time;
+  unsigned long total_connections;
+  unsigned long total_items;
+  unsigned long uptime;
+  unsigned long long bytes;
+  unsigned long long bytes_read;
+  unsigned long long bytes_written;
+  unsigned long long cmd_get;
+  unsigned long long cmd_set;
+  unsigned long long evictions;
+  unsigned long long get_hits;
+  unsigned long long get_misses;
+  unsigned long long limit_maxbytes;
   char version[MEMCACHED_VERSION_STRING_LENGTH];
+  void *__future; // @todo create a new structure to place here for future usage
   memcached_st *root;
 };
 
@@ -85,7 +85,7 @@ char *memcached_stat_get_value(const memcached_st *ptr, memcached_stat_st *memc_
                                const char *key, memcached_return_t *error);
 
 LIBMEMCACHED_API
-char ** memcached_stat_get_keys(const memcached_st *ptr, memcached_stat_st *memc_stat,
+char ** memcached_stat_get_keys(memcached_st *ptr, memcached_stat_st *memc_stat,
                                 memcached_return_t *error);
 
 LIBMEMCACHED_API
index 006393c484df526b1c864d2dbb83597152ac7591..c19f7ecc6382f7681d19953a7bc7302e2402d227 100644 (file)
@@ -68,8 +68,6 @@ static inline memcached_return_t memcached_send(memcached_st *ptr,
   bool to_write;
   size_t write_length;
   char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
-  uint32_t server_key;
-  memcached_server_write_instance_st instance;
 
   WATCHPOINT_ASSERT(!(value == NULL && value_length > 0));
 
@@ -85,8 +83,8 @@ static inline memcached_return_t memcached_send(memcached_st *ptr,
   if (ptr->flags.verify_key && (memcached_key_test((const char **)&key, &key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED))
     return MEMCACHED_BAD_KEY_PROVIDED;
 
-  server_key= memcached_generate_hash_with_redistribution(ptr, group_key, group_key_length);
-  instance= memcached_server_instance_fetch(ptr, server_key);
+  uint32_t server_key= memcached_generate_hash_with_redistribution(ptr, group_key, group_key_length);
+  memcached_server_write_instance_st instance= memcached_server_instance_fetch(ptr, server_key);
 
   WATCHPOINT_SET(instance->io_wait_count.read= 0);
   WATCHPOINT_SET(instance->io_wait_count.write= 0);
@@ -142,13 +140,12 @@ static inline memcached_return_t memcached_send(memcached_st *ptr,
       buffer_ptr++;
 
       write_length= (size_t)(buffer_ptr - buffer);
-      int check_length;
-      check_length= snprintf(buffer_ptr, MEMCACHED_DEFAULT_COMMAND_SIZE -(size_t)(buffer_ptr - buffer),
-                                    "%u %llu %lu%s\r\n",
-                                    flags,
-                                    (unsigned long long)expiration, (unsigned long)value_length,
-                                    ptr->flags.no_reply ? " noreply" : "");
-      if ((size_t)check_length >= MEMCACHED_DEFAULT_COMMAND_SIZE -(size_t)(buffer_ptr - buffer) || check_length < 0)
+      int check_length= snprintf(buffer_ptr, MEMCACHED_DEFAULT_COMMAND_SIZE -(size_t)(buffer_ptr - buffer),
+                                 "%u %llu %lu%s\r\n",
+                                 flags,
+                                 (unsigned long long)expiration, (unsigned long)value_length,
+                                 ptr->flags.no_reply ? " noreply" : "");
+      if ((size_t)check_length >= MEMCACHED_DEFAULT_COMMAND_SIZE -size_t(buffer_ptr - buffer) || check_length < 0)
       {
         rc= MEMCACHED_WRITE_FAILURE;
         memcached_io_reset(instance);
@@ -162,16 +159,17 @@ static inline memcached_return_t memcached_send(memcached_st *ptr,
 
     if (ptr->flags.use_udp && ptr->flags.buffer_requests)
     {
-      size_t cmd_size= write_length + value_length + 2;
+      size_t cmd_size= write_length + value_length +2;
       if (cmd_size > MAX_UDP_DATAGRAM_LENGTH - UDP_DATAGRAM_HEADER_LENGTH)
-        return MEMCACHED_WRITE_FAILURE;
+        return memcached_set_error(*ptr, MEMCACHED_WRITE_FAILURE, MEMCACHED_AT);
+
       if (cmd_size + instance->write_buffer_offset > MAX_UDP_DATAGRAM_LENGTH)
         memcached_io_write(instance, NULL, 0, true);
     }
 
     if (write_length >= MEMCACHED_DEFAULT_COMMAND_SIZE)
     {
-      rc= MEMCACHED_WRITE_FAILURE;
+      rc= memcached_set_error(*ptr, MEMCACHED_WRITE_FAILURE, MEMCACHED_AT);
     }
     else
     {
@@ -494,7 +492,7 @@ static memcached_return_t memcached_send_binary(memcached_st *ptr,
                                                             request.message.header.request.extlen));
 
   if (cas)
-    request.message.header.request.cas= htonll(cas);
+    request.message.header.request.cas= memcached_htonll(cas);
 
   flush= (bool) ((server->root->flags.buffer_requests && verb == SET_OP) ? 0 : 1);
 
index 48a970aa238b87d8e0b8420214ec16e8f90c22c4..3688a66bcc678bf50ecd9764fdf4bacedc49ca53 100644 (file)
@@ -43,96 +43,145 @@ const char *memcached_strerror(memcached_st *, memcached_return_t rc)
   {
   case MEMCACHED_SUCCESS:
     return "SUCCESS";
+
   case MEMCACHED_FAILURE:
     return "FAILURE";
+
   case MEMCACHED_HOST_LOOKUP_FAILURE: // getaddrinfo only
-    return "getaddrinfo() HOSTNAME LOOKUP FAILURE";
-  case MEMCACHED_CONNECTION_FAILURE: // DEPRECATED
+    return "getaddrinfo() or getnameinfo() HOSTNAME LOOKUP FAILURE";
+
+  case MEMCACHED_CONNECTION_FAILURE:
     return "CONNECTION FAILURE";
-  case MEMCACHED_CONNECTION_BIND_FAILURE:
+
+  case MEMCACHED_CONNECTION_BIND_FAILURE: // DEPRECATED, see MEMCACHED_HOST_LOOKUP_FAILURE
     return "CONNECTION BIND FAILURE";
+
   case MEMCACHED_READ_FAILURE:
     return "READ FAILURE";
+
   case MEMCACHED_UNKNOWN_READ_FAILURE:
     return "UNKNOWN READ FAILURE";
+
   case MEMCACHED_PROTOCOL_ERROR:
     return "PROTOCOL ERROR";
+
   case MEMCACHED_CLIENT_ERROR:
     return "CLIENT ERROR";
+
   case MEMCACHED_SERVER_ERROR:
     return "SERVER ERROR";
+
   case MEMCACHED_WRITE_FAILURE:
     return "WRITE FAILURE";
+
   case MEMCACHED_CONNECTION_SOCKET_CREATE_FAILURE: // DEPRECATED
     return "CONNECTION SOCKET CREATE FAILURE";
+
   case MEMCACHED_DATA_EXISTS:
     return "CONNECTION DATA EXISTS";
+
   case MEMCACHED_DATA_DOES_NOT_EXIST:
     return "CONNECTION DATA DOES NOT EXIST";
+
   case MEMCACHED_NOTSTORED:
     return "NOT STORED";
+
   case MEMCACHED_STORED:
     return "STORED";
+
   case MEMCACHED_NOTFOUND:
     return "NOT FOUND";
+
   case MEMCACHED_MEMORY_ALLOCATION_FAILURE:
     return "MEMORY ALLOCATION FAILURE";
+
   case MEMCACHED_PARTIAL_READ:
     return "PARTIAL READ";
+
   case MEMCACHED_SOME_ERRORS:
     return "SOME ERRORS WERE REPORTED";
+
   case MEMCACHED_NO_SERVERS:
     return "NO SERVERS DEFINED";
+
   case MEMCACHED_END:
     return "SERVER END";
+
   case MEMCACHED_DELETED:
     return "SERVER DELETE";
+
   case MEMCACHED_VALUE:
     return "SERVER VALUE";
+
   case MEMCACHED_STAT:
     return "STAT VALUE";
+
   case MEMCACHED_ITEM:
     return "ITEM VALUE";
+
   case MEMCACHED_ERRNO:
     return "SYSTEM ERROR";
+
   case MEMCACHED_FAIL_UNIX_SOCKET:
     return "COULD NOT OPEN UNIX SOCKET";
+
   case MEMCACHED_NOT_SUPPORTED:
     return "ACTION NOT SUPPORTED";
+
   case MEMCACHED_FETCH_NOTFINISHED:
     return "FETCH WAS NOT COMPLETED";
+
   case MEMCACHED_NO_KEY_PROVIDED:
     return "A KEY LENGTH OF ZERO WAS PROVIDED";
+
   case MEMCACHED_BUFFERED:
     return "ACTION QUEUED";
+
   case MEMCACHED_TIMEOUT:
     return "A TIMEOUT OCCURRED";
+
   case MEMCACHED_BAD_KEY_PROVIDED:
     return "A BAD KEY WAS PROVIDED/CHARACTERS OUT OF RANGE";
+
   case MEMCACHED_INVALID_HOST_PROTOCOL:
     return "THE HOST TRANSPORT PROTOCOL DOES NOT MATCH THAT OF THE CLIENT";
+
   case MEMCACHED_SERVER_MARKED_DEAD:
     return "SERVER IS MARKED DEAD";
+
   case MEMCACHED_UNKNOWN_STAT_KEY:
     return "ENCOUNTERED AN UNKNOWN STAT KEY";
+
   case MEMCACHED_E2BIG:
     return "ITEM TOO BIG";
+
   case MEMCACHED_INVALID_ARGUMENTS:
      return "INVALID ARGUMENTS";
+
   case MEMCACHED_KEY_TOO_BIG:
      return "KEY RETURNED FROM SERVER WAS TOO LARGE";
+
   case MEMCACHED_AUTH_PROBLEM:
     return "FAILED TO SEND AUTHENTICATION TO SERVER";
+
   case MEMCACHED_AUTH_FAILURE:
     return "AUTHENTICATION FAILURE";
+
   case MEMCACHED_AUTH_CONTINUE:
     return "CONTINUE AUTHENTICATION";
+
   case MEMCACHED_PARSE_ERROR:
     return "ERROR OCCURED WHILE PARSING";
+
   case MEMCACHED_PARSE_USER_ERROR:
     return "USER INITIATED ERROR OCCURED WHILE PARSING";
+
   case MEMCACHED_DEPRECATED:
     return "DEPRECATED";
+
+  case MEMCACHED_IN_PROGRESS:
+    return "OPERATION IN PROCESS";
+
   default:
   case MEMCACHED_MAXIMUM_RETURN:
     return "INVALID memcached_return_t";
index 9e029627131392a6163761d5d01c8f2d4282688c..6f3b9c1c571a4e5e9ccc5685eb59a6bcb35ec3ea 100644 (file)
@@ -37,6 +37,7 @@
 
 
 #include <libmemcached/common.h>
+#include <cassert>
 
 inline static memcached_return_t _string_check(memcached_string_st *string, size_t need)
 {
@@ -118,6 +119,18 @@ memcached_string_st *memcached_string_create(memcached_st *memc, memcached_strin
   return self;
 }
 
+static memcached_return_t memcached_string_append_null(memcached_string_st *string)
+{
+  if (memcached_failed(_string_check(string, 1)))
+  {
+    return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
+  }
+
+  *string->end= 0;
+
+  return MEMCACHED_SUCCESS;
+}
+
 memcached_return_t memcached_string_append_character(memcached_string_st *string,
                                                      char character)
 {
@@ -213,6 +226,22 @@ const char *memcached_string_value(const memcached_string_st *self)
   return self->string;
 }
 
+char *memcached_string_take_value(memcached_string_st *self)
+{
+  assert(self);
+  // If we fail at adding the null, we copy and move on
+  if (memcached_success(memcached_string_append_null(self)))
+  {
+    return memcached_string_c_copy(self);
+  }
+
+  char *value= self->string;
+
+  _init_string(self);
+
+  return value;
+}
+
 char *memcached_string_value_mutable(const memcached_string_st *self)
 {
   return self->string;
index a0b66ed3fbb6d50aa325ca47451af9f4a6b1c24f..3a3fdf530fd1add85d247bda40f8c86d46de0334 100644 (file)
@@ -97,6 +97,9 @@ size_t memcached_string_size(const memcached_string_st *self);
 LIBMEMCACHED_LOCAL
 const char *memcached_string_value(const memcached_string_st *self);
 
+LIBMEMCACHED_LOCAL
+char *memcached_string_take_value(memcached_string_st *self);
+
 LIBMEMCACHED_LOCAL
 char *memcached_string_value_mutable(const memcached_string_st *self);
 
diff --git a/libmemcached/util/flush.cc b/libmemcached/util/flush.cc
new file mode 100644 (file)
index 0000000..17131f7
--- /dev/null
@@ -0,0 +1,61 @@
+/*  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.
+ *
+ * Summary: connects to a host, and then flushes it (memcached_flush(3)).
+ *
+ */
+
+#include <libmemcached/common.h>
+#include <libmemcached/memcached_util.h>
+
+
+bool libmemcached_util_flush(const char *hostname, in_port_t port, memcached_return_t *ret)
+{
+  memcached_st *memc_ptr= memcached_create(NULL);
+
+  memcached_return_t rc= memcached_server_add(memc_ptr, hostname, port);
+  if (memcached_success(rc))
+  {
+    rc= memcached_flush(memc_ptr, 0);
+  }
+
+  memcached_free(memc_ptr);
+
+  if (ret)
+  {
+    *ret= rc;
+  }
+
+  return memcached_success(rc);
+}
diff --git a/libmemcached/util/flush.h b/libmemcached/util/flush.h
new file mode 100644 (file)
index 0000000..dd7e779
--- /dev/null
@@ -0,0 +1,50 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached library
+ *
+ *  Copyright (C) 2011 Data Differential, http://datadifferential.com/
+ *  Copyright (C) 2010 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.
+ *
+ */
+
+#pragma once
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+LIBMEMCACHED_API
+bool libmemcached_util_flush(const char *hostname, in_port_t port, memcached_return_t *ret);
+
+#ifdef __cplusplus
+}
+#endif
+
index 2c452f526247cee8efcfc45c2239a1785d306c68..449b2c1882aded433e194cd63f178bf3163049ba 100644 (file)
@@ -6,6 +6,7 @@ if BUILD_LIBMEMCACHEDUTIL
 nobase_include_HEADERS+= \
                         libmemcached/memcached_util.h \
                         libmemcached/util.h \
+                        libmemcached/util/flush.h \
                         libmemcached/util/ping.h \
                         libmemcached/util/pool.h \
                         libmemcached/util/version.h
@@ -13,6 +14,7 @@ lib_LTLIBRARIES+= libmemcached/libmemcachedutil.la
 endif
 
 libmemcached_libmemcachedutil_la_SOURCES= \
+                                         libmemcached/util/flush.cc \
                                          libmemcached/util/ping.cc \
                                          libmemcached/util/pool.cc \
                                          libmemcached/util/version.cc
index 3d5471a34b4bca9c17e0d7c94bcbaad0e51ebcb7..37da864925f680b760a6f95f06691c9860aa9d63 100644 (file)
@@ -1,28 +1,52 @@
-/* LibMemcached
- * Copyright (C) 2010 Brian Aker
- * All rights reserved.
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached library
  *
- * Use and distribution licensed under the BSD license.  See
- * the COPYING file in the parent directory for full text.
+ *  Copyright (C) 2011 Data Differential, http://datadifferential.com/
+ *  Copyright (C) 2010 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.
  *
  * Summary: connects to a host, and makes sure it is alive.
  *
  */
 
-#include "libmemcached/common.h"
-#include "libmemcached/memcached_util.h"
+#include <libmemcached/common.h>
+#include <libmemcached/memcached_util.h>
 
 
 bool libmemcached_util_ping(const char *hostname, in_port_t port, memcached_return_t *ret)
 {
-  memcached_return_t rc;
-  memcached_st memc, *memc_ptr;
-
-  memc_ptr= memcached_create(&memc);
-
-  rc= memcached_server_add(memc_ptr, hostname, port);
+  memcached_st *memc_ptr= memcached_create(NULL);
 
-  if (rc == MEMCACHED_SUCCESS)
+  memcached_return_t rc= memcached_server_add(memc_ptr, hostname, port);
+  if (memcached_success(rc))
   {
     rc= memcached_version(memc_ptr);
   }
index b4fa50e6e8e6e914693ea83f04bc632e91c1c552..58875e09048d237cb2d2cf3c918980878f3287b9 100644 (file)
@@ -96,14 +96,14 @@ static inline void libmemcached_stack_dump(void)
 
 #define WATCHPOINT
 #define WATCHPOINT_ERROR(A)
-#define WATCHPOINT_IFERROR(A)
+#define WATCHPOINT_IFERROR(__memcached_return_t) (void)(__memcached_return_t)
 #define WATCHPOINT_STRING(A)
 #define WATCHPOINT_NUMBER(A)
 #define WATCHPOINT_LABELED_NUMBER(A,B)
 #define WATCHPOINT_IF_LABELED_NUMBER(A,B,C)
 #define WATCHPOINT_ERRNO(A)
 #define WATCHPOINT_ASSERT_PRINT(A,B,C)
-#define WATCHPOINT_ASSERT(A)
+#define WATCHPOINT_ASSERT(A) (void)(A)
 #define WATCHPOINT_ASSERT_INITIALIZED(A)
 #define WATCHPOINT_SET(A)
 
index 893a864c4f816919129913c310f1a6c82309527c..dac57c775c8bd5f40fc9740ffd9cbc6d7bd63341 100644 (file)
@@ -1,14 +1,41 @@
-/* LibMemcached
- * Copyright (C) 2006-2009 Brian Aker
- * All rights reserved.
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached library
  *
- * Use and distribution licensed under the BSD license.  See
- * the COPYING file in the parent directory for full text.
+ *  Copyright (C) 2011 Data Differential, http://datadifferential.com/
+ *  Copyright (C) 2006-2009 Brian Aker All rights reserved.
  *
- * Summary:
+ *  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.
  *
  */
 
+
 /*
   Startup, and shutdown the memcached servers.
 */
@@ -17,6 +44,8 @@
 
 #include <config.h>
 
+#include <iso646.h>
+
 #include <assert.h>
 #include <limits.h>
 #include <signal.h>
@@ -146,8 +175,17 @@ void server_startup(server_startup_st *construct)
 
               if (libmemcached_util_ping("localhost", construct->port[x], NULL))
               {
-                port_base++;
-                construct->port[x]= 0;
+                if (libmemcached_util_flush("localhost", construct->port[x], NULL))
+                { 
+                  fprintf(stderr, "Found server on port %d, flushed it!\n", (int)construct->port[x]);
+                  construct->is_used[x]= true;
+                } // If we can flush it, we will just use it
+                else
+                {
+                  fprintf(stderr, "Found server on port %d, could not flush it, so trying next port.\n", (int)construct->port[x]);
+                  port_base++;
+                  construct->port[x]= 0;
+                }
               }
             } while (construct->port[x] == 0);
           }
@@ -165,15 +203,22 @@ void server_startup(server_startup_st *construct)
                    MEMCACHED_BINARY, construct->pid_file[x], construct->port[x], construct->port[x]);
         }
 
-       if (libmemcached_util_ping("localhost", construct->port[x], NULL))
-       {
-         fprintf(stderr, "Server on port %u already exists\n", construct->port[x]);
-       }
-       else
-       {
-         status= system(buffer);
-         fprintf(stderr, "STARTING SERVER: %s  status:%d\n", buffer, status);
-       }
+        if (construct->is_used[x])
+        {
+          fprintf(stderr, "USING SERVER: %s\n", buffer);
+        }
+        else
+        {
+          if (libmemcached_util_ping("localhost", construct->port[x], NULL))
+          {
+            fprintf(stderr, "Server on port %u already exists\n", construct->port[x]);
+          }
+          else
+          {
+            status= system(buffer);
+            fprintf(stderr, "STARTING SERVER: %s  status:%d\n", buffer, status);
+          }
+        }
 
         int count;
         size_t remaining_length= sizeof(server_string_buffer) - (size_t)(end_ptr -server_string_buffer);
@@ -200,6 +245,10 @@ void server_startup(server_startup_st *construct)
       for (uint32_t x= 0; x < construct->count; x++)
       {
         uint32_t counter= 3000; // Absurd, just to catch run away process
+
+        if (construct->is_used[x])
+          continue;
+
         while (construct->pids[x] <= 0  && --counter)
         {
           FILE *file= fopen(construct->pid_file[x], "r");
@@ -218,15 +267,19 @@ void server_startup(server_startup_st *construct)
             }
             fclose(file);
           }
+
           switch (errno)
           {
           default:
-            fprintf(stderr, "%s -> fopen(%s)\n", construct->pid_file[x], strerror(errno));
+            fprintf(stderr, "Could not open pid file %s -> fopen(%s) -> %s:%d\n", construct->pid_file[x], strerror(errno), __FILE__, __LINE__);
             abort();
+
           case ENOENT:
           case EINTR:
           case EACCES:
+          case EINPROGRESS:
             break;
+
           case ENOTCONN:
             continue;
           }
@@ -291,6 +344,9 @@ void server_shutdown(server_startup_st *construct)
   {
     for (uint32_t x= 0; x < construct->count; x++)
     {
+      if (construct->is_used[x])
+        continue;
+
       kill_file(construct->pid_file[x]);
     }
 
index 454f69ca81e1266824c6cd7d5d3e58a0f36380b2..581cf8596b30297af084fe554cef729838ac33e8 100644 (file)
@@ -32,6 +32,7 @@ struct server_startup_st
   char pid_file[SERVERS_TO_CREATE][FILENAME_MAX];
   in_port_t port[SERVERS_TO_CREATE];
   int pids[SERVERS_TO_CREATE];
+  bool is_used[SERVERS_TO_CREATE]; // Did we start it, or was it just sitting there?
 };
 
 void server_startup(server_startup_st *construct);
index afb2b96522ce4c1f582e4fa6771c5c2bb2735c31..0905e13b6fc94562c4303749af6b0c786910212d 100644 (file)
@@ -59,10 +59,12 @@ const char *test_strerror(test_return_t code)
     return "ok";
   case TEST_FAILURE:
     return "failed";
-  case TEST_MEMORY_ALLOCATION_FAILURE:
-    return "memory allocation";
+  case TEST_FATAL:
+    return "failed";
   case TEST_SKIPPED:
     return "skipped";
+  case TEST_MEMORY_ALLOCATION_FAILURE:
+    return "memory allocation";
   case TEST_MAXIMUM_RETURN:
   default:
     fprintf(stderr, "Unknown return value\n");
@@ -146,7 +148,6 @@ int main(int argc, char *argv[])
   char *wildcard= NULL;
   world_st world;
   collection_st *collection;
-  collection_st *next;
   void *world_ptr;
 
   world_stats_st stats;
@@ -178,12 +179,23 @@ int main(int argc, char *argv[])
   }
 
   if (argc > 1)
+  {
     collection_to_run= argv[1];
+  }
+  else if (getenv("TEST_COLLECTION"))
+  {
+    collection_to_run= getenv("TEST_COLLECTION");
+  }
+
+  if (collection_to_run)
+    printf("Only testing %s\n", collection_to_run);
 
   if (argc == 3)
+  {
     wildcard= argv[2];
+  }
 
-  for (next= collection; next->name; next++)
+  for (collection_st *next= collection; next->name; next++)
   {
     test_return_t collection_rc= TEST_SUCCESS;
     test_st *run;
@@ -212,6 +224,10 @@ skip_pre:
       case TEST_SUCCESS:
         fprintf(stderr, "\n%s\n\n", next->name);
         break;
+      case TEST_FATAL:
+        fprintf(stderr, "\n%s [ failed ]\n\n", next->name);
+        stats.collection_failed++;
+        goto cleanup;
       case TEST_FAILURE:
         fprintf(stderr, "\n%s [ failed ]\n\n", next->name);
         stats.collection_failed++;
@@ -296,6 +312,8 @@ skip_pre:
         fprintf(stderr, "%ld.%03ld ", load_time / 1000, load_time % 1000);
         stats.success++;
         break;
+
+      case TEST_FATAL:
       case TEST_FAILURE:
 #if 0
         push_failed_test(next->name, run->name);
@@ -303,13 +321,16 @@ skip_pre:
         stats.failed++;
         failed= true;
         break;
+
       case TEST_SKIPPED:
         stats.skipped++;
         skipped= true;
         break;
+
       case TEST_MEMORY_ALLOCATION_FAILURE:
         fprintf(stderr, "Exhausted memory, quitting\n");
         abort();
+
       case TEST_MAXIMUM_RETURN:
       default:
         assert(0); // Coding error.
@@ -326,6 +347,12 @@ skip_pre:
         if (rc != TEST_SUCCESS)
           break;
       }
+
+      // If we get a TEST_FATAL we move onto the next collection
+      if (return_code == TEST_FATAL)
+      {
+        break;
+      }
     }
 
     if (next->post && world.runner->post)
index 0493f3106b1b4b657aefb312d6195fb49a141af5..2245e798da6899253d1ddd072ef49017e2538d14 100644 (file)
@@ -56,13 +56,25 @@ typedef struct world_st world_st;
 typedef struct collection_st collection_st;
 typedef struct test_st test_st;
 
-typedef enum {
-  TEST_SUCCESS= 0, /* Backwards compatibility */
+enum test_return_t {
+  TEST_SUCCESS, /* Backwards compatibility */
   TEST_FAILURE,
   TEST_MEMORY_ALLOCATION_FAILURE,
   TEST_SKIPPED,
+  TEST_FATAL, // Collection should not be continued
   TEST_MAXIMUM_RETURN /* Always add new error code before */
-} test_return_t;
+};
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum test_return_t test_return_t;
+
+#ifdef __cplusplus
+}
+#endif
+
 
 typedef void *(*test_callback_create_fn)(test_return_t *error);
 typedef test_return_t (*test_callback_fn)(void *);
@@ -228,6 +240,15 @@ do \
   } \
 } while (0)
 
+#define test_skip(A,B) \
+do \
+{ \
+  if ((A) != (B)) \
+  { \
+    return TEST_SKIPPED; \
+  } \
+} while (0)
+
 #define test_compare_got(A,B,C) \
 do \
 { \
diff --git a/m4/memaslap.m4 b/m4/memaslap.m4
new file mode 100644 (file)
index 0000000..6c9a932
--- /dev/null
@@ -0,0 +1,9 @@
+AC_DEFUN([ENABLE_MEMASLAP],
+  [AC_ARG_ENABLE([memaslap],
+    [AS_HELP_STRING([--enable-memaslap],
+      [build with memaslap tool. @<:@default=off@:>@])],
+    [ac_cv_enable_memaslap=yes],
+    [ac_cv_enable_memaslap=no])
+
+  AM_CONDITIONAL([BUILD_MEMASLAP], [test "$ac_cv_enable_memaslap" = "yes"])
+])
index 10f9eff396db9d781c082fb886d5432d2ac43115..6fd899ab52eaa2a9e0f0375ca39197aac1a491c7 100644 (file)
@@ -155,6 +155,7 @@ you will need to install %{name}-devel.
 %{_includedir}/libmemcached/string.h
 %{_includedir}/libmemcached/types.h
 %{_includedir}/libmemcached/util.h
+%{_includedir}/libmemcached/util/flush.h
 %{_includedir}/libmemcached/util/ping.h
 %{_includedir}/libmemcached/util/pool.h
 %{_includedir}/libmemcached/util/version.h
index 14141a0b4e95ac0da50eed997541ef972139838b..f963582eddff8308c9a24419a7b1887c143d37d5 100644 (file)
@@ -54,6 +54,8 @@
 #include <sys/types.h>
 #include <unistd.h>
 
+#include <iostream>
+
 #include <libtest/server.h>
 
 #include "clients/generator.h"
@@ -107,9 +109,9 @@ static test_return_t init_test(memcached_st *not_used)
 #define TEST_PORT_COUNT 7
 in_port_t test_ports[TEST_PORT_COUNT];
 
-static memcached_return_t  server_display_function(const memcached_st *ptr,
-                                                   const memcached_server_st *server,
-                                                   void *context)
+static memcached_return_t server_display_function(const memcached_st *ptr,
+                                                  const memcached_server_st *server,
+                                                  void *context)
 {
   /* Do Nothing */
   size_t bigger= *((size_t *)(context));
@@ -155,11 +157,11 @@ static test_return_t server_sort_test(memcached_st *ptr)
   {
     test_ports[x]= (in_port_t)random() % 64000;
     rc= memcached_server_add_with_weight(local_memc, "localhost", test_ports[x], 0);
-    test_true(memcached_server_count(local_memc) == x + 1);
+    test_compare(memcached_server_count(local_memc), x +1);
 #if 0 // Rewrite
     test_true(memcached_server_list_count(memcached_server_list(local_memc)) == x+1);
 #endif
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
   }
 
   callbacks[0]= server_display_function;
@@ -174,7 +176,6 @@ static test_return_t server_sort_test(memcached_st *ptr)
 static test_return_t server_sort2_test(memcached_st *ptr)
 {
   size_t bigger= 0; /* Prime the value for the test_true in server_display_function */
-  memcached_return_t rc;
   memcached_server_fn callbacks[1];
   memcached_st *local_memc;
   memcached_server_instance_st instance;
@@ -182,22 +183,22 @@ static test_return_t server_sort2_test(memcached_st *ptr)
 
   local_memc= memcached_create(NULL);
   test_true(local_memc);
-  rc= memcached_behavior_set(local_memc, MEMCACHED_BEHAVIOR_SORT_HOSTS, 1);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_behavior_set(local_memc, MEMCACHED_BEHAVIOR_SORT_HOSTS, 1));
 
-  rc= memcached_server_add_with_weight(local_memc, "MEMCACHED_BEHAVIOR_SORT_HOSTS", 43043, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_server_add_with_weight(local_memc, "MEMCACHED_BEHAVIOR_SORT_HOSTS", 43043, 0));
   instance= memcached_server_instance_by_position(local_memc, 0);
-  test_true(memcached_server_port(instance) == 43043);
+  test_compare(43043, memcached_server_port(instance));
 
-  rc= memcached_server_add_with_weight(local_memc, "MEMCACHED_BEHAVIOR_SORT_HOSTS", 43042, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_server_add_with_weight(local_memc, "MEMCACHED_BEHAVIOR_SORT_HOSTS", 43042, 0));
 
   instance= memcached_server_instance_by_position(local_memc, 0);
-  test_true(memcached_server_port(instance) == 43042);
+  test_compare(43042, memcached_server_port(instance));
 
   instance= memcached_server_instance_by_position(local_memc, 1);
-  test_true(memcached_server_port(instance) == 43043);
+  test_compare(43043, memcached_server_port(instance));
 
   callbacks[0]= server_display_function;
   memcached_server_cursor(local_memc, callbacks, (void *)&bigger,  1);
@@ -251,7 +252,6 @@ static test_return_t server_unsort_test(memcached_st *ptr)
 {
   size_t counter= 0; /* Prime the value for the test_true in server_display_function */
   size_t bigger= 0; /* Prime the value for the test_true in server_display_function */
-  memcached_return_t rc;
   memcached_server_fn callbacks[1];
   memcached_st *local_memc;
   (void)ptr;
@@ -262,12 +262,12 @@ static test_return_t server_unsort_test(memcached_st *ptr)
   for (size_t x= 0; x < TEST_PORT_COUNT; x++)
   {
     test_ports[x]= (in_port_t)(random() % 64000);
-    rc= memcached_server_add_with_weight(local_memc, "localhost", test_ports[x], 0);
-    test_true(memcached_server_count(local_memc) == x+1);
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_server_add_with_weight(local_memc, "localhost", test_ports[x], 0));
+    test_compare(memcached_server_count(local_memc), x +1);
 #if 0 // Rewrite
     test_true(memcached_server_list_count(memcached_server_list(local_memc)) == x+1);
 #endif
-    test_true(rc == MEMCACHED_SUCCESS);
   }
 
   callbacks[0]= server_display_unsort_function;
@@ -381,7 +381,7 @@ static test_return_t clone_test(memcached_st *memc)
 static test_return_t userdata_test(memcached_st *memc)
 {
   void* foo= NULL;
-  test_true(memcached_set_user_data(memc, foo) == NULL);
+  test_false(memcached_set_user_data(memc, foo));
   test_true(memcached_get_user_data(memc) == foo);
   test_true(memcached_set_user_data(memc, NULL) == foo);
 
@@ -390,10 +390,8 @@ static test_return_t userdata_test(memcached_st *memc)
 
 static test_return_t connection_test(memcached_st *memc)
 {
-  memcached_return_t rc;
-
-  rc= memcached_server_add_with_weight(memc, "localhost", 0, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_server_add_with_weight(memc, "localhost", 0, 0));
 
   return TEST_SUCCESS;
 }
@@ -422,7 +420,7 @@ static test_return_t libmemcached_string_distribution_test(memcached_st *)
 
 static test_return_t error_test(memcached_st *memc)
 {
-  uint32_t values[] = { 851992627U, 2337886783U, 646418395U, 4001849190U,
+  uint32_t values[] = { 851992627U, 2337886783U, 4109241422U, 4001849190U,
                         982370485U, 1263635348U, 4242906218U, 3829656100U,
                         1891735253U, 334139633U, 2257084983U, 3088286104U,
                         13199785U, 2542027183U, 1097051614U, 199566778U,
@@ -433,7 +431,7 @@ static test_return_t error_test(memcached_st *memc)
                         54481931U, 4186304426U, 1741088401U, 2979625118U,
                         4159057246U, 3425930182U, 2593724503U,  1868899624U,
                         1769812374U, 2302537950U, 1110330676U, 3365377466U, 
-                        1336171666U, 3021258493U, 3365377466U };
+                        1336171666U, 3021258493U, 2334992265U, 3365377466U };
 
   // You have updated the memcache_error messages but not updated docs/tests.
   for (int rc= int(MEMCACHED_SUCCESS); rc < int(MEMCACHED_MAXIMUM_RETURN); ++rc)
@@ -447,9 +445,9 @@ static test_return_t error_test(memcached_st *memc)
       fprintf(stderr, "\n\nYou have updated memcached_return_t without updating the error_test\n");
       fprintf(stderr, "%u, %s, (%u)\n\n", (uint32_t)rc, memcached_strerror(memc, memcached_return_t(rc)), hash_val);
     }
-    test_true(values[rc] == hash_val);
+    test_compare(values[rc], hash_val);
   }
-  test_true(MEMCACHED_MAXIMUM_RETURN == 46);
+  test_compare(MEMCACHED_MAXIMUM_RETURN, 47);
 
   return TEST_SUCCESS;
 }
@@ -460,7 +458,7 @@ static test_return_t set_test(memcached_st *memc)
                                        memcached_literal_param("foo"),
                                        memcached_literal_param("when we sanitize"),
                                        time_t(0), (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
+  test_true_got(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED, memcached_strerror(NULL, rc));
 
   return TEST_SUCCESS;
 }
@@ -475,28 +473,28 @@ static test_return_t append_test(memcached_st *memc)
   uint32_t flags;
 
   rc= memcached_flush(memc, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   rc= memcached_set(memc, key, strlen(key),
                     in_value, strlen(in_value),
                     (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   rc= memcached_append(memc, key, strlen(key),
                        " the", strlen(" the"),
                        (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   rc= memcached_append(memc, key, strlen(key),
                        " people", strlen(" people"),
                        (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   out_value= memcached_get(memc, key, strlen(key),
                        &value_length, &flags, &rc);
-  test_true(!memcmp(out_value, "we the people", strlen("we the people")));
-  test_true(strlen("we the people") == value_length);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_memcmp(out_value, "we the people", strlen("we the people"));
+  test_compare(strlen("we the people"), value_length);
+  test_compare(MEMCACHED_SUCCESS, rc);
   free(out_value);
 
   return TEST_SUCCESS;
@@ -513,13 +511,13 @@ static test_return_t append_binary_test(memcached_st *memc)
   uint32_t x;
 
   rc= memcached_flush(memc, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   rc= memcached_set(memc,
                     key, strlen(key),
                     NULL, 0,
                     (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare_got(MEMCACHED_SUCCESS, rc, memcached_strerror(NULL, rc));
 
   for (x= 0; store_list[x] ; x++)
   {
@@ -527,17 +525,17 @@ static test_return_t append_binary_test(memcached_st *memc)
                          key, strlen(key),
                          (char *)&store_list[x], sizeof(uint32_t),
                          (time_t)0, (uint32_t)0);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
   }
 
   value= (uint32_t *)memcached_get(memc, key, strlen(key),
                        &value_length, &flags, &rc);
-  test_true((value_length == (sizeof(uint32_t) * x)));
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(value_length, sizeof(uint32_t) * x);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   for (uint32_t counter= x, *ptr= value; counter; counter--)
   {
-    test_true(*ptr == store_list[x - counter]);
+    test_compare(*ptr, store_list[x - counter]);
     ptr++;
   }
   free(value);
@@ -552,22 +550,20 @@ static test_return_t cas2_test(memcached_st *memc)
   size_t key_length[]= {5, 3, 4};
   const char *value= "we the people";
   size_t value_length= strlen("we the people");
-  unsigned int x;
   memcached_result_st results_obj;
   memcached_result_st *results;
   unsigned int set= 1;
 
-  rc= memcached_flush(memc, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, memcached_flush(memc, 0));
 
   memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SUPPORT_CAS, set);
 
-  for (x= 0; x < 3; x++)
+  for (uint32_t x= 0; x < 3; x++)
   {
     rc= memcached_set(memc, keys[x], key_length[x],
                       keys[x], key_length[x],
                       (time_t)50, (uint32_t)9);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
   }
 
   rc= memcached_mget(memc, keys, key_length, 3);
@@ -577,12 +573,12 @@ static test_return_t cas2_test(memcached_st *memc)
   results= memcached_fetch_result(memc, &results_obj, &rc);
   test_true(results);
   test_true(results->item_cas);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
   test_true(memcached_result_cas(results));
 
-  test_true(!memcmp(value, "we the people", strlen("we the people")));
-  test_true(strlen("we the people") == value_length);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_memcmp(value, "we the people", strlen("we the people"));
+  test_compare(strlen("we the people"), value_length);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   memcached_result_free(&results_obj);
 
@@ -606,14 +602,14 @@ static test_return_t cas_test(memcached_st *memc)
   unsigned int set= 1;
 
   rc= memcached_flush(memc, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SUPPORT_CAS, set);
 
   rc= memcached_set(memc, key, strlen(key),
                     value, strlen(value),
                     (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   rc= memcached_mget(memc, keys, keylengths, 1);
 
@@ -621,11 +617,11 @@ static test_return_t cas_test(memcached_st *memc)
 
   results= memcached_fetch_result(memc, &results_obj, &rc);
   test_true(results);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
   test_true(memcached_result_cas(results));
-  test_true(!memcmp(value, memcached_result_value(results), value_length));
-  test_true(strlen(memcached_result_value(results)) == value_length);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_memcmp(value, memcached_result_value(results), value_length);
+  test_compare(strlen(memcached_result_value(results)), value_length);
+  test_compare(MEMCACHED_SUCCESS, rc);
   uint64_t cas = memcached_result_cas(results);
 
 #if 0
@@ -635,14 +631,14 @@ static test_return_t cas_test(memcached_st *memc)
 #endif
 
   rc= memcached_cas(memc, key, key_length, value2, value2_length, 0, 0, cas);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   /*
    * The item will have a new cas value, so try to set it again with the old
    * value. This should fail!
    */
   rc= memcached_cas(memc, key, key_length, value2, value2_length, 0, 0, cas);
-  test_true(rc == MEMCACHED_DATA_EXISTS);
+  test_compare(MEMCACHED_DATA_EXISTS, rc);
 
   memcached_result_free(&results_obj);
 
@@ -659,28 +655,28 @@ static test_return_t prepend_test(memcached_st *memc)
   uint32_t flags;
 
   rc= memcached_flush(memc, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   rc= memcached_set(memc, key, strlen(key),
                     value, strlen(value),
                     (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   rc= memcached_prepend(memc, key, strlen(key),
                        "the ", strlen("the "),
                        (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   rc= memcached_prepend(memc, key, strlen(key),
                        "we ", strlen("we "),
                        (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   out_value= memcached_get(memc, key, strlen(key),
                        &value_length, &flags, &rc);
-  test_true(!memcmp(out_value, "we the people", strlen("we the people")));
-  test_true(strlen("we the people") == value_length);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_memcmp(out_value, "we the people", strlen("we the people"));
+  test_compare(strlen("we the people"), value_length);
+  test_compare(MEMCACHED_SUCCESS, rc);
   free(out_value);
 
   return TEST_SUCCESS;
@@ -756,10 +752,10 @@ static test_return_t replace_test(memcached_st *memc)
                     (time_t)0, (uint32_t)0);
   test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
 
-  rc= memcached_replace(memc, key, strlen(key),
-                    value, strlen(value),
-                    (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_replace(memc, key, strlen(key),
+                                 value, strlen(value),
+                                 (time_t)0, (uint32_t)0));
 
   return TEST_SUCCESS;
 }
@@ -783,11 +779,9 @@ static test_return_t delete_test(memcached_st *memc)
 
 static test_return_t flush_test(memcached_st *memc)
 {
-  memcached_return_t rc;
-
   uint64_t query_id= memcached_query_id(memc);
-  rc= memcached_flush(memc, 0);
-  test_compare(rc, MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_flush(memc, 0));
   test_compare(query_id +1, memcached_query_id(memc));
 
   return TEST_SUCCESS;
@@ -835,48 +829,48 @@ static test_return_t bad_key_test(memcached_st *memc)
   test_true(memc_clone);
 
   query_id= memcached_query_id(memc_clone);
-  rc= memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_VERIFY_KEY, set);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_VERIFY_KEY, set));
   test_compare(query_id, memcached_query_id(memc_clone)); // We should not increase the query_id for memcached_behavior_set()
 
   /* All keys are valid in the binary protocol (except for length) */
-  if (memcached_behavior_get(memc_clone, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL) == 0)
+  if (not memcached_behavior_get(memc_clone, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL))
   {
     query_id= memcached_query_id(memc_clone);
     string= memcached_get(memc_clone, key, strlen(key),
                           &string_length, &flags, &rc);
-    test_true(rc == MEMCACHED_BAD_KEY_PROVIDED);
-    test_true(string_length ==  0);
-    test_true(!string);
+    test_compare(MEMCACHED_BAD_KEY_PROVIDED, rc);
+    test_compare(0, string_length);
+    test_false(string);
 
     set= 0;
     query_id= memcached_query_id(memc_clone);
-    rc= memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_VERIFY_KEY, set);
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_VERIFY_KEY, set));
     test_compare(query_id, memcached_query_id(memc_clone)); // We should not increase the query_id for memcached_behavior_set()
-    test_true(rc == MEMCACHED_SUCCESS);
     string= memcached_get(memc_clone, key, strlen(key),
                           &string_length, &flags, &rc);
-    test_true(rc == MEMCACHED_NOTFOUND);
-    test_true(string_length ==  0);
-    test_true(!string);
+    test_compare_got(MEMCACHED_NOTFOUND, rc, memcached_strerror(NULL, rc));
+    test_compare(0, string_length);
+    test_false(string);
 
     /* Test multi key for bad keys */
     const char *keys[] = { "GoodKey", "Bad Key", "NotMine" };
     size_t key_lengths[] = { 7, 7, 7 };
     set= 1;
     query_id= memcached_query_id(memc_clone);
-    rc= memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_VERIFY_KEY, set);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, 
+                 memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_VERIFY_KEY, set));
     test_compare(query_id, memcached_query_id(memc_clone));
 
     query_id= memcached_query_id(memc_clone);
-    rc= memcached_mget(memc_clone, keys, key_lengths, 3);
-    test_true(rc == MEMCACHED_BAD_KEY_PROVIDED);
+    test_compare(MEMCACHED_BAD_KEY_PROVIDED,
+                 memcached_mget(memc_clone, keys, key_lengths, 3));
     test_compare(query_id +1, memcached_query_id(memc_clone));
 
     query_id= memcached_query_id(memc_clone);
-    rc= memcached_mget_by_key(memc_clone, "foo daddy", 9, keys, key_lengths, 1);
-    test_true(rc == MEMCACHED_BAD_KEY_PROVIDED);
+    test_compare(MEMCACHED_BAD_KEY_PROVIDED,
+                 memcached_mget_by_key(memc_clone, "foo daddy", 9, keys, key_lengths, 1));
     test_compare(query_id +1, memcached_query_id(memc_clone));
 
     max_keylen= 250;
@@ -885,24 +879,24 @@ static test_return_t bad_key_test(memcached_st *memc)
        memcached server is updated to allow max size length of the keys in the
        binary protocol
     */
-    rc= memcached_callback_set(memc_clone, MEMCACHED_CALLBACK_PREFIX_KEY, NULL);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, 
+                 memcached_callback_set(memc_clone, MEMCACHED_CALLBACK_PREFIX_KEY, NULL));
 
     char *longkey= (char *)malloc(max_keylen + 1);
-    if (longkey != NULL)
+    if (longkey)
     {
       memset(longkey, 'a', max_keylen + 1);
       string= memcached_get(memc_clone, longkey, max_keylen,
                             &string_length, &flags, &rc);
-      test_true(rc == MEMCACHED_NOTFOUND);
-      test_true(string_length ==  0);
-      test_true(!string);
+      test_compare(MEMCACHED_NOTFOUND, rc);
+      test_compare(0, string_length);
+      test_false(string);
 
       string= memcached_get(memc_clone, longkey, max_keylen + 1,
                             &string_length, &flags, &rc);
-      test_true(rc == MEMCACHED_BAD_KEY_PROVIDED);
-      test_true(string_length ==  0);
-      test_true(!string);
+      test_compare(MEMCACHED_BAD_KEY_PROVIDED, rc);
+      test_compare(0, string_length);
+      test_false(string);
 
       free(longkey);
     }
@@ -910,13 +904,13 @@ static test_return_t bad_key_test(memcached_st *memc)
 
   /* Make sure zero length keys are marked as bad */
   set= 1;
-  rc= memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_VERIFY_KEY, set);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_VERIFY_KEY, set));
   string= memcached_get(memc_clone, key, 0,
                         &string_length, &flags, &rc);
-  test_true(rc == MEMCACHED_BAD_KEY_PROVIDED);
-  test_true(string_length ==  0);
-  test_true(!string);
+  test_compare(MEMCACHED_BAD_KEY_PROVIDED, rc);
+  test_compare(0, string_length);
+  test_false(string);
 
   memcached_free(memc_clone);
 
@@ -949,38 +943,41 @@ static test_return_t read_through(memcached_st *memc)
   string= memcached_get(memc, key, strlen(key),
                         &string_length, &flags, &rc);
 
-  test_true(rc == MEMCACHED_NOTFOUND);
+  test_compare(MEMCACHED_NOTFOUND, rc);
   test_false(string_length);
   test_false(string);
 
   rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_GET_FAILURE, *(void **)&cb);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   string= memcached_get(memc, key, strlen(key),
                         &string_length, &flags, &rc);
 
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(string_length ==  strlen(READ_THROUGH_VALUE));
+  test_compare(MEMCACHED_SUCCESS, rc);
+  test_compare(string_length, sizeof(READ_THROUGH_VALUE) -1);
+  test_true(string[sizeof(READ_THROUGH_VALUE) -1] == 0);
   test_strcmp(READ_THROUGH_VALUE, string);
   free(string);
 
   string= memcached_get(memc, key, strlen(key),
                         &string_length, &flags, &rc);
 
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(string_length ==  strlen(READ_THROUGH_VALUE));
-  test_true(!strcmp(READ_THROUGH_VALUE, string));
+  test_compare(MEMCACHED_SUCCESS, rc);
+  test_true(string);
+  test_compare(string_length, sizeof(READ_THROUGH_VALUE) -1);
+  test_true(string[sizeof(READ_THROUGH_VALUE) -1] == 0);
+  test_strcmp(READ_THROUGH_VALUE, string);
   free(string);
 
   return TEST_SUCCESS;
 }
 
-static memcached_return_t  delete_trigger(memcached_st *ptr,
-                                          const char *key,
-                                          size_t key_length)
+static memcached_return_t delete_trigger(memcached_st *,
+                                         const char *key,
+                                         size_t key_length)
 {
-  (void)ptr;(void)key_length;
   assert(key);
+  assert(key_length);
 
   return MEMCACHED_SUCCESS;
 }
@@ -993,7 +990,7 @@ static test_return_t delete_through(memcached_st *memc)
   callback= (memcached_trigger_delete_key_fn)delete_trigger;
 
   rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_DELETE_TRIGGER, *(void**)&callback);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   return TEST_SUCCESS;
 }
@@ -1014,7 +1011,7 @@ static test_return_t get_test(memcached_st *memc)
   string= memcached_get(memc, key, strlen(key),
                         &string_length, &flags, &rc);
 
-  test_true(rc == MEMCACHED_NOTFOUND);
+  test_compare_got(MEMCACHED_NOTFOUND, rc, memcached_strerror(NULL, rc));
   test_false(string_length);
   test_false(string);
 
@@ -1023,28 +1020,29 @@ static test_return_t get_test(memcached_st *memc)
 
 static test_return_t get_test2(memcached_st *memc)
 {
-  memcached_return_t rc;
   const char *key= "foo";
   const char *value= "when we sanitize";
-  char *string;
-  size_t string_length;
-  uint32_t flags;
 
   uint64_t query_id= memcached_query_id(memc);
-  rc= memcached_set(memc, key, strlen(key),
-                    value, strlen(value),
-                    (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
+  memcached_return_t rc= memcached_set(memc, key, strlen(key),
+                                       value, strlen(value),
+                                       (time_t)0, (uint32_t)0);
+  test_true(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED);
   test_compare(query_id +1, memcached_query_id(memc));
 
   query_id= memcached_query_id(memc);
-  string= memcached_get(memc, key, strlen(key),
-                        &string_length, &flags, &rc);
+  test_true(query_id);
+
+  uint32_t flags;
+  size_t string_length;
+  char *string= memcached_get(memc, key, strlen(key),
+                              &string_length, &flags, &rc);
   test_compare(query_id +1, memcached_query_id(memc));
 
+  test_compare_got(MEMCACHED_SUCCESS, rc, memcached_strerror(NULL, rc));
+  test_compare_got(MEMCACHED_SUCCESS, memcached_last_error(memc), memcached_last_error_message(memc));
   test_true(string);
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(string_length == strlen(value));
+  test_compare(strlen(value), string_length);
   test_memcmp(string, value, string_length);
 
   free(string);
@@ -1054,18 +1052,16 @@ static test_return_t get_test2(memcached_st *memc)
 
 static test_return_t set_test2(memcached_st *memc)
 {
-  memcached_return_t rc;
   const char *key= "foo";
   const char *value= "train in the brain";
   size_t value_length= strlen(value);
-  unsigned int x;
 
-  for (x= 0; x < 10; x++)
+  for (uint32_t x= 0; x < 10; x++)
   {
-    rc= memcached_set(memc, key, strlen(key),
-                      value, value_length,
-                      (time_t)0, (uint32_t)0);
-    test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
+    memcached_return_t rc= memcached_set(memc, key, strlen(key),
+                                         value, value_length,
+                                         (time_t)0, (uint32_t)0);
+    test_true(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED);
   }
 
   return TEST_SUCCESS;
@@ -1073,15 +1069,15 @@ static test_return_t set_test2(memcached_st *memc)
 
 static test_return_t set_test3(memcached_st *memc)
 {
-  memcached_return_t rc;
-  char *value;
   size_t value_length= 8191;
 
-  value = (char*)malloc(value_length);
+  char *value= (char*)malloc(value_length);
   test_true(value);
 
   for (uint32_t x= 0; x < value_length; x++)
+  {
     value[x] = (char) (x % 127);
+  }
 
   /* The dump test relies on there being at least 32 items in memcached */
   for (uint32_t x= 0; x < 32; x++)
@@ -1091,9 +1087,9 @@ static test_return_t set_test3(memcached_st *memc)
     snprintf(key, sizeof(key), "foo%u", x);
 
     uint64_t query_id= memcached_query_id(memc);
-    rc= memcached_set(memc, key, strlen(key),
-                      value, value_length,
-                      (time_t)0, (uint32_t)0);
+    memcached_return_t rc= memcached_set(memc, key, strlen(key),
+                                         value, value_length,
+                                         (time_t)0, (uint32_t)0);
     test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
     test_compare(query_id +1, memcached_query_id(memc));
   }
@@ -1105,33 +1101,32 @@ static test_return_t set_test3(memcached_st *memc)
 
 static test_return_t get_test3(memcached_st *memc)
 {
-  memcached_return_t rc;
   const char *key= "foo";
-  char *value;
   size_t value_length= 8191;
-  char *string;
-  size_t string_length;
-  uint32_t flags;
-  uint32_t x;
 
-  value = (char*)malloc(value_length);
+  char *value= (char*)malloc(value_length);
   test_true(value);
 
-  for (x= 0; x < value_length; x++)
+  for (uint32_t x= 0; x < value_length; x++)
+  {
     value[x] = (char) (x % 127);
+  }
 
+  memcached_return_t rc;
   rc= memcached_set(memc, key, strlen(key),
                     value, value_length,
                     (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
+  test_true(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED);
 
-  string= memcached_get(memc, key, strlen(key),
-                        &string_length, &flags, &rc);
+  size_t string_length;
+  uint32_t flags;
+  char *string= memcached_get(memc, key, strlen(key),
+                              &string_length, &flags, &rc);
 
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
   test_true(string);
-  test_true(string_length == value_length);
-  test_true(!memcmp(string, value, string_length));
+  test_compare(string_length, value_length);
+  test_memcmp(string, value, string_length);
 
   free(string);
   free(value);
@@ -1166,10 +1161,10 @@ static test_return_t get_test4(memcached_st *memc)
     string= memcached_get(memc, key, strlen(key),
                           &string_length, &flags, &rc);
 
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
     test_true(string);
-    test_true(string_length == value_length);
-    test_true(!memcmp(string, value, string_length));
+    test_compare(string_length, value_length);
+    test_memcmp(string, value, string_length);
     free(string);
   }
 
@@ -1196,7 +1191,7 @@ static test_return_t get_test5(memcached_st *memc)
 
   memcached_return_t rc= memcached_set(memc, keys[0], lengths[0],
                                      keys[0], lengths[0], 0, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
   rc= memcached_mget(memc, keys, lengths, 2);
 
   memcached_result_st results_obj;
@@ -1209,15 +1204,15 @@ static test_return_t get_test5(memcached_st *memc)
 
   /* Don't read out the second result, but issue a set instead.. */
   rc= memcached_set(memc, keys[0], lengths[0], keys[0], lengths[0], 0, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   char *val= memcached_get_by_key(memc, keys[0], lengths[0], "yek", 3,
                                   &rlen, &flags, &rc);
-  test_true(val == NULL);
-  test_true(rc == MEMCACHED_NOTFOUND);
+  test_false(val);
+  test_compare(MEMCACHED_NOTFOUND, rc);
   val= memcached_get(memc, keys[0], lengths[0], &rlen, &flags, &rc);
-  test_true(val != NULL);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_true(val);
+  test_compare(MEMCACHED_SUCCESS, rc);
   free(val);
 
   return TEST_SUCCESS;
@@ -1236,7 +1231,7 @@ static test_return_t mget_end(memcached_st *memc)
   {
     rc= memcached_set(memc, keys[i], lengths[i], values[i], strlen(values[i]),
                      (time_t)0, (uint32_t)0);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
   }
 
   char *string;
@@ -1245,7 +1240,7 @@ static test_return_t mget_end(memcached_st *memc)
 
   // retrieve both via mget
   rc= memcached_mget(memc, keys, lengths, 2);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   char key[MEMCACHED_MAX_KEY];
   size_t key_length;
@@ -1255,29 +1250,29 @@ static test_return_t mget_end(memcached_st *memc)
   {
     string= memcached_fetch(memc, key, &key_length, &string_length,
                             &flags, &rc);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
     int val = 0;
     if (key_length == 4)
       val= 1;
-    test_true(string_length == strlen(values[val]));
+    test_compare(string_length, strlen(values[val]));
     test_true(strncmp(values[val], string, string_length) == 0);
     free(string);
   }
 
   // this should indicate end
   string= memcached_fetch(memc, key, &key_length, &string_length, &flags, &rc);
-  test_true(rc == MEMCACHED_END);
+  test_compare(MEMCACHED_END, rc);
 
   // now get just one
   rc= memcached_mget(memc, keys, lengths, 1);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   string= memcached_fetch(memc, key, &key_length, &string_length, &flags, &rc);
-  test_true(key_length == lengths[0]);
+  test_compare(key_length, lengths[0]);
   test_true(strncmp(keys[0], key, key_length) == 0);
-  test_true(string_length == strlen(values[0]));
+  test_compare(string_length, strlen(values[0]));
   test_true(strncmp(values[0], string, string_length) == 0);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
   free(string);
 
   // this should indicate end
@@ -1320,12 +1315,12 @@ static test_return_t increment_test(memcached_st *memc)
 
   rc= memcached_increment(memc, key, strlen(key),
                           1, &new_number);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
   test_true(new_number == 1);
 
   rc= memcached_increment(memc, key, strlen(key),
                           1, &new_number);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
   test_true(new_number == 2);
 
   return TEST_SUCCESS;
@@ -1342,12 +1337,12 @@ static test_return_t increment_with_initial_test(memcached_st *memc)
 
     rc= memcached_increment_with_initial(memc, key, strlen(key),
                                          1, initial, 0, &new_number);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
     test_true(new_number == initial);
 
     rc= memcached_increment_with_initial(memc, key, strlen(key),
                                          1, initial, 0, &new_number);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
     test_true(new_number == (initial + 1));
   }
   return TEST_SUCCESS;
@@ -1367,12 +1362,12 @@ static test_return_t decrement_test(memcached_st *memc)
 
   rc= memcached_decrement(memc, key, strlen(key),
                           1, &new_number);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
   test_true(new_number == 2);
 
   rc= memcached_decrement(memc, key, strlen(key),
                           1, &new_number);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
   test_true(new_number == 1);
 
   return TEST_SUCCESS;
@@ -1389,12 +1384,12 @@ static test_return_t decrement_with_initial_test(memcached_st *memc)
 
     rc= memcached_decrement_with_initial(memc, key, strlen(key),
                                          1, initial, 0, &new_number);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
     test_true(new_number == initial);
 
     rc= memcached_decrement_with_initial(memc, key, strlen(key),
                                          1, initial, 0, &new_number);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
     test_true(new_number == (initial - 1));
   }
   return TEST_SUCCESS;
@@ -1416,12 +1411,12 @@ static test_return_t increment_by_key_test(memcached_st *memc)
 
   rc= memcached_increment_by_key(memc, master_key, strlen(master_key), key, strlen(key),
                                  1, &new_number);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
   test_true(new_number == 1);
 
   rc= memcached_increment_by_key(memc, master_key, strlen(master_key), key, strlen(key),
                                  1, &new_number);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
   test_true(new_number == 2);
 
   return TEST_SUCCESS;
@@ -1440,13 +1435,13 @@ static test_return_t increment_with_initial_by_key_test(memcached_st *memc)
     rc= memcached_increment_with_initial_by_key(memc, master_key, strlen(master_key),
                                                 key, strlen(key),
                                                 1, initial, 0, &new_number);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
     test_true(new_number == initial);
 
     rc= memcached_increment_with_initial_by_key(memc, master_key, strlen(master_key),
                                                 key, strlen(key),
                                                 1, initial, 0, &new_number);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
     test_true(new_number == (initial + 1));
   }
   return TEST_SUCCESS;
@@ -1469,13 +1464,13 @@ static test_return_t decrement_by_key_test(memcached_st *memc)
   rc= memcached_decrement_by_key(memc, master_key, strlen(master_key),
                                  key, strlen(key),
                                  1, &new_number);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
   test_true(new_number == 2);
 
   rc= memcached_decrement_by_key(memc, master_key, strlen(master_key),
                                  key, strlen(key),
                                  1, &new_number);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
   test_true(new_number == 1);
 
   return TEST_SUCCESS;
@@ -1486,22 +1481,21 @@ static test_return_t decrement_with_initial_by_key_test(memcached_st *memc)
   if (memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL) != 0)
   {
     uint64_t new_number;
-    memcached_return_t rc;
     const char *master_key= "foo";
     const char *key= "number";
     uint64_t initial= 3;
 
-    rc= memcached_decrement_with_initial_by_key(memc, master_key, strlen(master_key),
-                                                key, strlen(key),
-                                                1, initial, 0, &new_number);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(new_number == initial);
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_decrement_with_initial_by_key(memc, master_key, strlen(master_key),
+                                                         key, strlen(key),
+                                                         1, initial, 0, &new_number));
+    test_compare(new_number, initial);
 
-    rc= memcached_decrement_with_initial_by_key(memc, master_key, strlen(master_key),
-                                                key, strlen(key),
-                                                1, initial, 0, &new_number);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(new_number == (initial - 1));
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_decrement_with_initial_by_key(memc, master_key, strlen(master_key),
+                                                         key, strlen(key),
+                                                         1, initial, 0, &new_number));
+    test_compare(new_number, (initial - 1));
   }
   return TEST_SUCCESS;
 }
@@ -1528,10 +1522,8 @@ static test_return_t quit_test(memcached_st *memc)
 
 static test_return_t mget_result_test(memcached_st *memc)
 {
-  memcached_return_t rc;
   const char *keys[]= {"fudge", "son", "food"};
   size_t key_length[]= {5, 3, 4};
-  unsigned int x;
 
   memcached_result_st results_obj;
   memcached_result_st *results;
@@ -1541,22 +1533,23 @@ static test_return_t mget_result_test(memcached_st *memc)
   test_true(&results_obj == results);
 
   /* We need to empty the server before continueing test */
-  rc= memcached_flush(memc, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_flush(memc, 0));
 
-  rc= memcached_mget(memc, keys, key_length, 3);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, keys, key_length, 3));
 
-  while ((results= memcached_fetch_result(memc, &results_obj, &rc)) != NULL)
+  memcached_return_t rc;
+  while ((results= memcached_fetch_result(memc, &results_obj, &rc)))
   {
     test_true(results);
   }
 
-  while ((results= memcached_fetch_result(memc, &results_obj, &rc)) != NULL)
-  test_true(!results);
-  test_true(rc == MEMCACHED_END);
+  while ((results= memcached_fetch_result(memc, &results_obj, &rc))) { test_true(false); /* We should never see a value returned */ };
+  test_false(results);
+  test_compare_got(MEMCACHED_NOTFOUND, rc, memcached_strerror(NULL, rc));
 
-  for (x= 0; x < 3; x++)
+  for (uint32_t x= 0; x < 3; x++)
   {
     rc= memcached_set(memc, keys[x], key_length[x],
                       keys[x], key_length[x],
@@ -1564,18 +1557,18 @@ static test_return_t mget_result_test(memcached_st *memc)
     test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
   }
 
-  rc= memcached_mget(memc, keys, key_length, 3);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, keys, key_length, 3));
 
   while ((results= memcached_fetch_result(memc, &results_obj, &rc)))
   {
     test_true(results);
     test_true(&results_obj == results);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(memcached_result_key_length(results) == memcached_result_length(results));
-    test_true(!memcmp(memcached_result_key_value(results),
-                   memcached_result_value(results),
-                   memcached_result_length(results)));
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_compare(memcached_result_key_length(results), memcached_result_length(results));
+    test_memcmp(memcached_result_key_value(results),
+                memcached_result_value(results),
+                memcached_result_length(results));
   }
 
   memcached_result_free(&results_obj);
@@ -1585,28 +1578,27 @@ static test_return_t mget_result_test(memcached_st *memc)
 
 static test_return_t mget_result_alloc_test(memcached_st *memc)
 {
-  memcached_return_t rc;
   const char *keys[]= {"fudge", "son", "food"};
   size_t key_length[]= {5, 3, 4};
-  unsigned int x;
 
   memcached_result_st *results;
 
   /* We need to empty the server before continueing test */
-  rc= memcached_flush(memc, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_flush(memc, 0));
 
-  rc= memcached_mget(memc, keys, key_length, 3);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, keys, key_length, 3));
 
-  while ((results= memcached_fetch_result(memc, NULL, &rc)) != NULL)
+  memcached_return_t rc;
+  while ((results= memcached_fetch_result(memc, NULL, &rc)))
   {
     test_true(results);
   }
-  test_true(!results);
-  test_true(rc == MEMCACHED_END);
+  test_false(results);
+  test_compare_got(MEMCACHED_NOTFOUND, rc, memcached_strerror(NULL, rc));
 
-  for (x= 0; x < 3; x++)
+  for (uint32_t x= 0; x < 3; x++)
   {
     rc= memcached_set(memc, keys[x], key_length[x],
                       keys[x], key_length[x],
@@ -1614,18 +1606,18 @@ static test_return_t mget_result_alloc_test(memcached_st *memc)
     test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
   }
 
-  rc= memcached_mget(memc, keys, key_length, 3);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, keys, key_length, 3));
 
-  x= 0;
+  uint32_t x= 0;
   while ((results= memcached_fetch_result(memc, NULL, &rc)))
   {
     test_true(results);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
     test_true(memcached_result_key_length(results) == memcached_result_length(results));
-    test_true(!memcmp(memcached_result_key_value(results),
-                   memcached_result_value(results),
-                   memcached_result_length(results)));
+    test_memcmp(memcached_result_key_value(results),
+                memcached_result_value(results),
+                memcached_result_length(results));
     memcached_result_free(results);
     x++;
   }
@@ -1634,11 +1626,8 @@ static test_return_t mget_result_alloc_test(memcached_st *memc)
 }
 
 /* Count the results */
-static memcached_return_t callback_counter(const memcached_st *ptr,
-                                           memcached_result_st *result,
-                                           void *context)
+static memcached_return_t callback_counter(const memcached_st*, memcached_result_st*, void *context)
 {
-  (void)ptr; (void)result;
   size_t *counter= (size_t *)context;
 
   *counter= *counter + 1;
@@ -1648,42 +1637,42 @@ static memcached_return_t callback_counter(const memcached_st *ptr,
 
 static test_return_t mget_result_function(memcached_st *memc)
 {
-  memcached_return_t rc;
   const char *keys[]= {"fudge", "son", "food"};
   size_t key_length[]= {5, 3, 4};
-  unsigned int x;
   size_t counter;
   memcached_execute_fn callbacks[1];
 
   /* We need to empty the server before continueing test */
-  rc= memcached_flush(memc, 0);
-  for (x= 0; x < 3; x++)
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_flush(memc, 0));
+  for (uint32_t x= 0; x < 3; x++)
   {
-    rc= memcached_set(memc, keys[x], key_length[x],
-                      keys[x], key_length[x],
-                      (time_t)50, (uint32_t)9);
+    memcached_return_t rc= memcached_set(memc, keys[x], key_length[x],
+                                         keys[x], key_length[x],
+                                         (time_t)50, (uint32_t)9);
     test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
   }
 
-  rc= memcached_mget(memc, keys, key_length, 3);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, keys, key_length, 3));
 
   callbacks[0]= &callback_counter;
   counter= 0;
-  rc= memcached_fetch_execute(memc, callbacks, (void *)&counter, 1);
 
-  test_true(counter == 3);
+  memcached_return_t rc;
+  test_compare_got(MEMCACHED_SUCCESS, 
+                   rc= memcached_fetch_execute(memc, callbacks, (void *)&counter, 1),
+                   memcached_strerror(NULL, rc));
+
+  test_compare(counter, 3);
 
   return TEST_SUCCESS;
 }
 
 static test_return_t mget_test(memcached_st *memc)
 {
-  memcached_return_t rc;
   const 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;
@@ -1691,40 +1680,41 @@ static test_return_t mget_test(memcached_st *memc)
   size_t return_value_length;
 
   /* We need to empty the server before continueing test */
-  rc= memcached_flush(memc, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_flush(memc, 0));
 
-  rc= memcached_mget(memc, keys, key_length, 3);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, keys, key_length, 3));
 
+  uint32_t flags;
+  memcached_return_t rc;
   while ((return_value= memcached_fetch(memc, return_key, &return_key_length,
-                      &return_value_length, &flags, &rc)) != NULL)
+                                        &return_value_length, &flags, &rc)))
   {
     test_true(return_value);
   }
-  test_true(!return_value);
-  test_true(return_value_length == 0);
-  test_true(rc == MEMCACHED_END);
+  test_false(return_value);
+  test_compare(0, return_value_length);
+  test_compare_got(MEMCACHED_NOTFOUND, rc, memcached_strerror(NULL, rc));
 
-  for (x= 0; x < 3; x++)
+  for (uint32_t x= 0; x < 3; x++)
   {
     rc= memcached_set(memc, keys[x], key_length[x],
                       keys[x], key_length[x],
                       (time_t)50, (uint32_t)9);
     test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
   }
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, keys, key_length, 3));
 
-  rc= memcached_mget(memc, keys, key_length, 3);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  x= 0;
+  uint32_t x= 0;
   while ((return_value= memcached_fetch(memc, return_key, &return_key_length,
                                         &return_value_length, &flags, &rc)))
   {
     test_true(return_value);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
     test_true(return_key_length == return_value_length);
-    test_true(!memcmp(return_value, return_key, return_value_length));
+    test_memcmp(return_value, return_key, return_value_length);
     free(return_value);
     x++;
   }
@@ -1775,12 +1765,12 @@ static test_return_t mget_execute(memcached_st *memc)
   rc= memcached_mget_execute(memc, (const char**)keys, key_length,
                              max_keys, callbacks, &counter, 1);
 
-  if (rc == MEMCACHED_SUCCESS)
+  if (memcached_success(rc))
   {
     test_true(binary);
     uint64_t query_id= memcached_query_id(memc);
-    rc= memcached_fetch_execute(memc, callbacks, (void *)&counter, 1);
-    test_true(rc == MEMCACHED_END);
+    test_compare(MEMCACHED_SUCCESS, 
+                 memcached_fetch_execute(memc, callbacks, (void *)&counter, 1));
     test_compare(query_id, memcached_query_id(memc));
 
     /* Verify that we got all of the items */
@@ -1811,10 +1801,7 @@ static test_return_t mget_execute(memcached_st *memc)
 
 static test_return_t key_setup(memcached_st *memc)
 {
-  (void)memc;
-
-  if (pre_binary(memc) != TEST_SUCCESS)
-    return TEST_SKIPPED;
+  test_skip(TEST_SUCCESS, pre_binary(memc));
 
   global_pairs= pairs_generate(REGRESSION_BINARY_VS_BLOCK_COUNT, 0);
 
@@ -1860,7 +1847,7 @@ static test_return_t get_stats_keys(memcached_st *memc)
  memcached_return_t rc;
 
  stat_list= memcached_stat_get_keys(memc, &memc_stat, &rc);
- test_true(rc == MEMCACHED_SUCCESS);
+ test_compare(MEMCACHED_SUCCESS, rc);
  for (ptr= stat_list; *ptr; ptr++)
    test_true(*ptr);
 
@@ -1876,29 +1863,24 @@ static test_return_t version_string_test(memcached_st *memc)
 
   version_string= memcached_lib_version();
 
-  test_true(!strcmp(version_string, LIBMEMCACHED_VERSION_STRING));
+  test_strcmp(version_string, LIBMEMCACHED_VERSION_STRING);
 
   return TEST_SUCCESS;
 }
 
 static test_return_t get_stats(memcached_st *memc)
 {
- char **stat_list;
- char **ptr;
  memcached_return_t rc;
- memcached_stat_st *memc_stat;
-
- memc_stat= memcached_stat(memc, NULL, &rc);
- test_true(rc == MEMCACHED_SUCCESS);
 
- test_true(rc == MEMCACHED_SUCCESS);
+ memcached_stat_st *memc_stat= memcached_stat(memc, NULL, &rc);
+ test_compare(MEMCACHED_SUCCESS, rc);
  test_true(memc_stat);
 
  for (uint32_t x= 0; x < memcached_server_count(memc); x++)
  {
-   stat_list= memcached_stat_get_keys(memc, memc_stat+x, &rc);
-   test_true(rc == MEMCACHED_SUCCESS);
-   for (ptr= stat_list; *ptr; ptr++);
+   char **stat_list= memcached_stat_get_keys(memc, memc_stat+x, &rc);
+   test_compare(MEMCACHED_SUCCESS, rc);
+   for (char **ptr= stat_list; *ptr; ptr++);
 
    free(stat_list);
  }
@@ -1926,20 +1908,39 @@ static test_return_t add_host_test(memcached_st *memc)
     snprintf(buffer, SMALL_STRING_LEN, "%u.example.com", 400+x);
     servers= memcached_server_list_append_with_weight(servers, buffer, 401, 0,
                                      &rc);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
     test_true(x == memcached_server_list_count(servers));
   }
 
   rc= memcached_server_push(memc, servers);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
   rc= memcached_server_push(memc, servers);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   memcached_server_list_free(servers);
 
   return TEST_SUCCESS;
 }
 
+static test_return_t memcached_fetch_result_NOT_FOUND(memcached_st *memc)
+{
+  memcached_return_t rc;
+  const char *key= "not_found";
+  size_t key_len= strlen(key);
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, &key, &key_len, 1));
+
+  memcached_result_st *result= NULL;
+  result= memcached_fetch_result(memc, result, &rc);
+  test_false(result);
+  test_compare_got(MEMCACHED_NOTFOUND, rc, memcached_strerror(NULL, rc));
+
+  memcached_result_free(result);
+
+  return TEST_SUCCESS;
+}
+
 static memcached_return_t  clone_test_callback(memcached_st *parent, memcached_st *memc_clone)
 {
   (void)parent;(void)memc_clone;
@@ -1961,7 +1962,7 @@ static test_return_t callback_test(memcached_st *memc)
     memcached_return_t rc;
 
     rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_USER_DATA, &x);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
     test_ptr= (int *)memcached_callback_get(memc, MEMCACHED_CALLBACK_USER_DATA, &rc);
     test_true(*test_ptr == x);
   }
@@ -1975,7 +1976,7 @@ static test_return_t callback_test(memcached_st *memc)
 
     rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_CLONE_FUNCTION,
                                clone_cb_ptr);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
     temp_function= memcached_callback_get(memc, MEMCACHED_CALLBACK_CLONE_FUNCTION, &rc);
     test_true(temp_function == clone_cb_ptr);
   }
@@ -1990,7 +1991,7 @@ static test_return_t callback_test(memcached_st *memc)
 
     rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_CLONE_FUNCTION,
                                cleanup_cb_ptr);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
     temp_function= memcached_callback_get(memc, MEMCACHED_CALLBACK_CLONE_FUNCTION, &rc);
     test_true(temp_function == cleanup_cb_ptr);
   }
@@ -2115,74 +2116,76 @@ static test_return_t MEMCACHED_BEHAVIOR_TCP_KEEPIDLE_test(memcached_st *memc)
   return TEST_SUCCESS;
 }
 
-static test_return_t fetch_all_results(memcached_st *memc, size_t *keys_returned)
+static test_return_t fetch_all_results(memcached_st *memc, size_t &keys_returned, const memcached_return_t expect)
 {
-  memcached_return_t rc= MEMCACHED_SUCCESS;
+  memcached_return_t rc;
   char return_key[MEMCACHED_MAX_KEY];
   size_t return_key_length;
   char *return_value;
   size_t return_value_length;
   uint32_t flags;
 
-  *keys_returned= 0;
-
+  keys_returned= 0;
   while ((return_value= memcached_fetch(memc, return_key, &return_key_length,
                                         &return_value_length, &flags, &rc)))
   {
     test_true(return_value);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare_got(MEMCACHED_SUCCESS, rc, memcached_strerror(NULL, rc));
     free(return_value);
-    *keys_returned= *keys_returned +1;
+    keys_returned+= 1;
   }
 
-  test_true_got(rc == MEMCACHED_END || memcached_success(rc), memcached_strerror(NULL, rc));
+  if (memcached_success(expect) and memcached_success(rc))
+  {
+    return TEST_SUCCESS;
+  }
+  else if (expect == rc)
+  {
+    return TEST_SUCCESS;
+  }
+  fprintf(stderr, "\n%s:%u %s(#%lu)\n", __FILE__, __LINE__, memcached_strerror(NULL, rc), (unsigned long)(keys_returned));
 
-  return TEST_SUCCESS;
+  return TEST_FAILURE;
 }
 
 /* Test case provided by Cal Haldenbrand */
+#define HALDENBRAND_KEY_COUNT 3000 // * 1024576
+#define HALDENBRAND_FLAG_KEY 99 // * 1024576
 static test_return_t user_supplied_bug1(memcached_st *memc)
 {
-  unsigned int setter= 1;
-
-  unsigned long long total= 0;
-  uint32_t size= 0;
-  char key[10];
-  char randomstuff[6 * 1024];
-  memcached_return_t rc;
-
-  memset(randomstuff, 0, 6 * 1024);
-
   /* We just keep looking at the same values over and over */
   srandom(10);
 
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, setter);
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, setter);
+  unsigned int setter= 1;
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, setter));
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, setter));
 
 
   /* add key */
+  unsigned long long total= 0;
   for (uint32_t x= 0 ; total < 20 * 1024576 ; x++ )
   {
-    unsigned int j= 0;
-
-    size= (uint32_t)(rand() % ( 5 * 1024 ) ) + 400;
+    uint32_t size= (uint32_t)(rand() % ( 5 * 1024 ) ) + 400;
+    char randomstuff[6 * 1024];
     memset(randomstuff, 0, 6 * 1024);
     test_true(size < 6 * 1024); /* Being safe here */
 
-    for (j= 0 ; j < size ;j++)
+    for (uint32_t j= 0 ; j < size ;j++)
+    {
       randomstuff[j] = (signed char) ((rand() % 26) + 97);
+    }
 
-    total += size;
-    snprintf(key, sizeof(key), "%u", x);
-    rc = memcached_set(memc, key, strlen(key),
-                       randomstuff, strlen(randomstuff), 10, 0);
-    test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-    /* If we fail, lets try again */
-    if (rc != MEMCACHED_SUCCESS && rc != MEMCACHED_BUFFERED)
-      rc = memcached_set(memc, key, strlen(key),
-                         randomstuff, strlen(randomstuff), 10, 0);
-    test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
+    total+= size;
+    char key[22];
+    int key_length= snprintf(key, sizeof(key), "%u", x);
+    memcached_return_t rc;
+    test_compare_got(MEMCACHED_SUCCESS,
+                     rc= memcached_set(memc, key, key_length, randomstuff, strlen(randomstuff), time_t(0), HALDENBRAND_FLAG_KEY),
+                     memcached_strerror(NULL, rc));
   }
+  test_true(total > HALDENBRAND_KEY_COUNT);
 
   return TEST_SUCCESS;
 }
@@ -2190,12 +2193,14 @@ static test_return_t user_supplied_bug1(memcached_st *memc)
 /* Test case provided by Cal Haldenbrand */
 static test_return_t user_supplied_bug2(memcached_st *memc)
 {
-  unsigned int setter;
-  size_t total= 0;
+  unsigned int setter= 1;
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, setter));
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, setter));
 
-  setter= 1;
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, setter);
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, setter);
 #ifdef NOT_YET
   setter = 20 * 1024576;
   memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE, setter);
@@ -2207,23 +2212,23 @@ static test_return_t user_supplied_bug2(memcached_st *memc)
   for (x= 0, errors= 0; total < 20 * 1024576 ; x++)
 #endif
 
-  for (uint32_t x= 0, errors= 0; total < 24576 ; x++)
+  size_t total_value_length= 0;
+  for (uint32_t x= 0, errors= 0; total_value_length < 24576 ; x++)
   {
-    memcached_return_t rc= MEMCACHED_SUCCESS;
-    char buffer[SMALL_STRING_LEN];
     uint32_t flags= 0;
     size_t val_len= 0;
-    char *getval;
 
-    memset(buffer, 0, SMALL_STRING_LEN);
+    char key[MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH +1];
+    int key_length= snprintf(key, sizeof(key), "%u", x);
 
-    snprintf(buffer, sizeof(buffer), "%u", x);
-    getval= memcached_get(memc, buffer, strlen(buffer),
-                           &val_len, &flags, &rc);
-    if (rc != MEMCACHED_SUCCESS)
+    memcached_return_t rc;
+    char *getval= memcached_get(memc, key, key_length, &val_len, &flags, &rc);
+    if (memcached_failed(rc))
     {
       if (rc == MEMCACHED_NOTFOUND)
+      {
         errors++;
+      }
       else
       {
         test_true(rc);
@@ -2231,7 +2236,9 @@ static test_return_t user_supplied_bug2(memcached_st *memc)
 
       continue;
     }
-    total+= val_len;
+    test_compare(HALDENBRAND_FLAG_KEY, flags);
+
+    total_value_length+= val_len;
     errors= 0;
     free(getval);
   }
@@ -2240,16 +2247,9 @@ static test_return_t user_supplied_bug2(memcached_st *memc)
 }
 
 /* Do a large mget() over all the keys we think exist */
-#define KEY_COUNT 3000 // * 1024576
 static test_return_t user_supplied_bug3(memcached_st *memc)
 {
-  memcached_return_t rc;
-  unsigned int setter;
-  unsigned int x;
-  char **keys;
-  size_t key_lengths[KEY_COUNT];
-
-  setter= 1;
+  unsigned int setter= 1;
   memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, setter);
   memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, setter);
 #ifdef NOT_YET
@@ -2261,25 +2261,31 @@ static test_return_t user_supplied_bug3(memcached_st *memc)
   getter = memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE);
 #endif
 
-  keys= static_cast<char **>(calloc(KEY_COUNT, sizeof(char *)));
+  size_t key_lengths[HALDENBRAND_KEY_COUNT];
+  char **keys= static_cast<char **>(calloc(HALDENBRAND_KEY_COUNT, sizeof(char *)));
   test_true(keys);
-  for (x= 0; x < KEY_COUNT; x++)
+  for (uint32_t x= 0; x < HALDENBRAND_KEY_COUNT; x++)
   {
-    char buffer[30];
-
-    snprintf(buffer, 30, "%u", x);
-    keys[x]= strdup(buffer);
-    key_lengths[x]= strlen(keys[x]);
+    char key[MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH +1];
+    int key_length= snprintf(key, sizeof(key), "%u", x);
+    keys[x]= strdup(key);
+    test_true(keys[x]);
+    key_lengths[x]= key_length;
+    test_compare(key_length, strlen(keys[x]));
   }
 
-  rc= memcached_mget(memc, (const char **)keys, key_lengths, KEY_COUNT);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, (const char **)keys, key_lengths, HALDENBRAND_KEY_COUNT));
 
+  test_return_t foo;
   size_t keys_returned;
-  test_true(fetch_all_results(memc, &keys_returned) == TEST_SUCCESS);
+  test_compare_got(TEST_SUCCESS, foo= fetch_all_results(memc, keys_returned, MEMCACHED_SUCCESS), test_strerror(foo));
+  test_compare(HALDENBRAND_KEY_COUNT, keys_returned);
 
-  for (x= 0; x < KEY_COUNT; x++)
+  for (uint32_t x= 0; x < HALDENBRAND_KEY_COUNT; x++)
+  {
     free(keys[x]);
+  }
   free(keys);
 
   return TEST_SUCCESS;
@@ -2288,57 +2294,53 @@ static test_return_t user_supplied_bug3(memcached_st *memc)
 /* Make sure we behave properly if server list has no values */
 static test_return_t user_supplied_bug4(memcached_st *memc)
 {
-  memcached_return_t rc;
   const 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;
 
   /* Here we free everything before running a bunch of mget tests */
   memcached_servers_reset(memc);
 
 
   /* We need to empty the server before continueing test */
-  rc= memcached_flush(memc, 0);
-  test_compare(rc, MEMCACHED_NO_SERVERS);
+  test_compare(MEMCACHED_NO_SERVERS,
+               memcached_flush(memc, 0));
 
-  rc= memcached_mget(memc, keys, key_length, 3);
-  test_true(rc == MEMCACHED_NO_SERVERS);
+  test_compare(MEMCACHED_NO_SERVERS,
+               memcached_mget(memc, keys, key_length, 3));
 
-  while ((return_value= memcached_fetch(memc, return_key, &return_key_length,
-                      &return_value_length, &flags, &rc)) != NULL)
-  {
-    test_true(return_value);
-  }
-  test_false(return_value);
-  test_true(return_value_length == 0);
-  test_true(rc == MEMCACHED_NO_SERVERS);
+  size_t keys_returned;
+  test_compare(TEST_SUCCESS, fetch_all_results(memc, keys_returned, MEMCACHED_NOTFOUND));
+  test_compare(0, keys_returned);
 
-  for (x= 0; x < 3; x++)
+  for (uint32_t x= 0; x < 3; x++)
   {
-    rc= memcached_set(memc, keys[x], key_length[x],
-                      keys[x], key_length[x],
-                      (time_t)50, (uint32_t)9);
-    test_true(rc == MEMCACHED_NO_SERVERS);
+    test_compare(MEMCACHED_NO_SERVERS,
+                 memcached_set(memc, keys[x], key_length[x],
+                               keys[x], key_length[x],
+                               (time_t)50, (uint32_t)9));
   }
 
-  rc= memcached_mget(memc, keys, key_length, 3);
-  test_true(rc == MEMCACHED_NO_SERVERS);
+  test_compare(MEMCACHED_NO_SERVERS, 
+               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)))
   {
-    test_true(return_value);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(return_key_length == return_value_length);
-    test_memcmp(return_value, return_key, return_value_length);
-    free(return_value);
-    x++;
+    char *return_value;
+    char return_key[MEMCACHED_MAX_KEY];
+    memcached_return_t rc;
+    size_t return_key_length;
+    size_t return_value_length;
+    uint32_t flags;
+    uint32_t x= 0;
+    while ((return_value= memcached_fetch(memc, return_key, &return_key_length,
+                                          &return_value_length, &flags, &rc)))
+    {
+      test_true(return_value);
+      test_compare(MEMCACHED_SUCCESS, rc);
+      test_true(return_key_length == return_value_length);
+      test_memcmp(return_value, return_key, return_value_length);
+      free(return_value);
+      x++;
+    }
   }
 
   return TEST_SUCCESS;
@@ -2347,57 +2349,53 @@ static test_return_t user_supplied_bug4(memcached_st *memc)
 #define VALUE_SIZE_BUG5 1048064
 static test_return_t user_supplied_bug5(memcached_st *memc)
 {
-  memcached_return_t rc;
   const char *keys[]= {"036790384900", "036790384902", "036790384904", "036790384906"};
   size_t key_length[]=  {strlen("036790384900"), strlen("036790384902"), strlen("036790384904"), strlen("036790384906")};
-  char return_key[MEMCACHED_MAX_KEY];
-  size_t return_key_length;
   char *value;
   size_t value_length;
   uint32_t flags;
-  unsigned int count;
-  unsigned int x;
   char *insert_data= new (std::nothrow) char[VALUE_SIZE_BUG5];
 
-  for (x= 0; x < VALUE_SIZE_BUG5; x++)
+  for (uint32_t x= 0; x < VALUE_SIZE_BUG5; x++)
+  {
     insert_data[x]= (signed char)rand();
+  }
 
-  memcached_flush(memc, 0);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_flush(memc, 0));
+
+  memcached_return_t rc;
   value= memcached_get(memc, keys[0], key_length[0],
                         &value_length, &flags, &rc);
-  test_true(value == NULL);
-  rc= memcached_mget(memc, keys, key_length, 4);
+  test_false(value);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, keys, key_length, 4));
 
-  count= 0;
-  while ((value= memcached_fetch(memc, return_key, &return_key_length,
-                                        &value_length, &flags, &rc)))
-    count++;
-  test_true(count == 0);
+  size_t count;
+  test_compare(TEST_SUCCESS, fetch_all_results(memc, count, MEMCACHED_NOTFOUND));
+  test_compare(0, count);
 
-  for (x= 0; x < 4; x++)
+  for (uint32_t x= 0; x < 4; x++)
   {
-    rc= memcached_set(memc, keys[x], key_length[x],
-                      insert_data, VALUE_SIZE_BUG5,
-                      (time_t)0, (uint32_t)0);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_set(memc, keys[x], key_length[x],
+                               insert_data, VALUE_SIZE_BUG5,
+                               (time_t)0, (uint32_t)0));
   }
 
-  for (x= 0; x < 10; x++)
+  for (uint32_t x= 0; x < 10; x++)
   {
     value= memcached_get(memc, keys[0], key_length[0],
                          &value_length, &flags, &rc);
+    test_compare(rc, MEMCACHED_SUCCESS);
     test_true(value);
     free(value);
 
-    rc= memcached_mget(memc, keys, key_length, 4);
-    count= 0;
-    while ((value= memcached_fetch(memc, return_key, &return_key_length,
-                                          &value_length, &flags, &rc)))
-    {
-      count++;
-      free(value);
-    }
-    test_true(count == 4);
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_mget(memc, keys, key_length, 4));
+
+    test_compare(TEST_SUCCESS, fetch_all_results(memc, count, MEMCACHED_SUCCESS));
+    test_compare(4, count);
   }
   delete [] insert_data;
 
@@ -2406,7 +2404,6 @@ static test_return_t user_supplied_bug5(memcached_st *memc)
 
 static test_return_t user_supplied_bug6(memcached_st *memc)
 {
-  memcached_return_t rc;
   const char *keys[]= {"036790384900", "036790384902", "036790384904", "036790384906"};
   size_t key_length[]=  {strlen("036790384900"), strlen("036790384902"), strlen("036790384904"), strlen("036790384906")};
   char return_key[MEMCACHED_MAX_KEY];
@@ -2414,53 +2411,59 @@ static test_return_t user_supplied_bug6(memcached_st *memc)
   char *value;
   size_t value_length;
   uint32_t flags;
-  unsigned int count;
-  unsigned int x;
   char *insert_data= new (std::nothrow) char[VALUE_SIZE_BUG5];
 
-  for (x= 0; x < VALUE_SIZE_BUG5; x++)
+  for (uint32_t x= 0; x < VALUE_SIZE_BUG5; x++)
+  {
     insert_data[x]= (signed char)rand();
+  }
 
-  memcached_flush(memc, 0);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_flush(memc, 0));
+
+  memcached_return_t rc;
   value= memcached_get(memc, keys[0], key_length[0],
                         &value_length, &flags, &rc);
-  test_true(value == NULL);
-  test_true(rc == MEMCACHED_NOTFOUND);
-  rc= memcached_mget(memc, keys, key_length, 4);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_false(value);
+  test_compare(MEMCACHED_NOTFOUND, rc);
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, keys, key_length, 4));
 
-  count= 0;
+  uint32_t count= 0;
   while ((value= memcached_fetch(memc, return_key, &return_key_length,
                                         &value_length, &flags, &rc)))
+  {
     count++;
-  test_true(count == 0);
-  test_true(rc == MEMCACHED_END);
+  }
+  test_compare(0, count);
+  test_compare_got(MEMCACHED_NOTFOUND, rc, memcached_strerror(NULL, rc));
 
-  for (x= 0; x < 4; x++)
+  for (uint32_t x= 0; x < 4; x++)
   {
-    rc= memcached_set(memc, keys[x], key_length[x],
-                      insert_data, VALUE_SIZE_BUG5,
-                      (time_t)0, (uint32_t)0);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_set(memc, keys[x], key_length[x],
+                               insert_data, VALUE_SIZE_BUG5,
+                               (time_t)0, (uint32_t)0));
   }
 
-  for (x= 0; x < 2; x++)
+  for (uint32_t x= 0; x < 2; x++)
   {
     value= memcached_get(memc, keys[0], key_length[0],
                          &value_length, &flags, &rc);
     test_true(value);
     free(value);
 
-    rc= memcached_mget(memc, keys, key_length, 4);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_mget(memc, keys, key_length, 4));
     count= 3;
     /* We test for purge of partial complete fetches */
     for (count= 3; count; count--)
     {
       value= memcached_fetch(memc, return_key, &return_key_length,
                              &value_length, &flags, &rc);
-      test_true(rc == MEMCACHED_SUCCESS);
-      test_true(!(memcmp(value, insert_data, value_length)));
+      test_compare(MEMCACHED_SUCCESS, rc);
+      test_memcmp(value, insert_data, value_length);
       test_true(value_length);
       free(value);
     }
@@ -2470,7 +2473,7 @@ static test_return_t user_supplied_bug6(memcached_st *memc)
   return TEST_SUCCESS;
 }
 
-static test_return_t user_supplied_bug8(memcached_st *memc)
+static test_return_t user_supplied_bug8(memcached_st *)
 {
   memcached_return_t rc;
   memcached_st *mine;
@@ -2479,13 +2482,12 @@ static test_return_t user_supplied_bug8(memcached_st *memc)
   memcached_server_st *servers;
   const char *server_list= "memcache1.memcache.bk.sapo.pt:11211, memcache1.memcache.bk.sapo.pt:11212, memcache1.memcache.bk.sapo.pt:11213, memcache1.memcache.bk.sapo.pt:11214, memcache2.memcache.bk.sapo.pt:11211, memcache2.memcache.bk.sapo.pt:11212, memcache2.memcache.bk.sapo.pt:11213, memcache2.memcache.bk.sapo.pt:11214";
 
-  (void)memc;
   servers= memcached_servers_parse(server_list);
   test_true(servers);
 
   mine= memcached_create(NULL);
   rc= memcached_server_push(mine, servers);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
   memcached_server_list_free(servers);
 
   test_true(mine);
@@ -2522,7 +2524,7 @@ static test_return_t user_supplied_bug7(memcached_st *memc)
   memcached_return_t rc= memcached_set(memc, keys, key_length,
                                        insert_data, VALUE_SIZE_BUG5,
                                        (time_t)0, flags);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   flags= 0;
   value= memcached_get(memc, keys, key_length,
@@ -2568,11 +2570,11 @@ static test_return_t user_supplied_bug9(memcached_st *memc)
     memcached_return_t rc= memcached_set(memc, keys[x], key_length[x],
                                          keys[x], key_length[x],
                                          (time_t)50, (uint32_t)9);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
   }
 
   memcached_return_t rc= memcached_mget(memc, keys, key_length, 3);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   /* We need to empty the server before continueing test */
   while ((return_value= memcached_fetch(memc, return_key, &return_key_length,
@@ -2591,34 +2593,34 @@ static test_return_t user_supplied_bug9(memcached_st *memc)
 static test_return_t user_supplied_bug10(memcached_st *memc)
 {
   const char *key= "foo";
-  char *value;
   size_t value_length= 512;
-  unsigned int x;
   size_t key_len= 3;
   unsigned int set= 1;
   memcached_st *mclone= memcached_clone(NULL, memc);
-  int32_t timeout;
 
   memcached_behavior_set(mclone, MEMCACHED_BEHAVIOR_NO_BLOCK, set);
   memcached_behavior_set(mclone, MEMCACHED_BEHAVIOR_TCP_NODELAY, set);
-  timeout= 2;
-  memcached_behavior_set(mclone, MEMCACHED_BEHAVIOR_POLL_TIMEOUT,
-                         (uint64_t)timeout);
+  int32_t timeout= 0;
+  memcached_behavior_set(mclone, MEMCACHED_BEHAVIOR_POLL_TIMEOUT, (uint64_t)timeout);
 
-  value = (char*)malloc(value_length * sizeof(char));
+  char *value= (char*)malloc(value_length * sizeof(char));
 
-  for (x= 0; x < value_length; x++)
+  for (unsigned int x= 0; x < value_length; x++)
+  {
     value[x]= (char) (x % 127);
+  }
 
-  for (x= 1; x <= 100000; ++x)
+  for (unsigned int x= 1; x <= 100000; ++x)
   {
     memcached_return_t rc= memcached_set(mclone, key, key_len,value, value_length, 0, 0);
 
-    test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_WRITE_FAILURE ||
-           rc == MEMCACHED_BUFFERED || rc == MEMCACHED_TIMEOUT);
+    test_true_got(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_WRITE_FAILURE or rc == MEMCACHED_BUFFERED or rc == MEMCACHED_TIMEOUT or rc == MEMCACHED_CONNECTION_FAILURE, 
+                  memcached_strerror(NULL, rc));
 
-    if (rc == MEMCACHED_WRITE_FAILURE || rc == MEMCACHED_TIMEOUT)
+    if (rc == MEMCACHED_WRITE_FAILURE or rc == MEMCACHED_TIMEOUT)
+    {
       x--;
+    }
   }
 
   free(value);
@@ -2633,33 +2635,31 @@ static test_return_t user_supplied_bug10(memcached_st *memc)
 static test_return_t user_supplied_bug11(memcached_st *memc)
 {
   const char *key= "foo";
-  char *value;
   size_t value_length= 512;
-  unsigned int x;
   size_t key_len= 3;
-  memcached_return_t rc;
   unsigned int set= 1;
-  int32_t timeout;
   memcached_st *mclone= memcached_clone(NULL, memc);
 
   memcached_behavior_set(mclone, MEMCACHED_BEHAVIOR_NO_BLOCK, set);
   memcached_behavior_set(mclone, MEMCACHED_BEHAVIOR_TCP_NODELAY, set);
-  timeout= -1;
-  memcached_behavior_set(mclone, MEMCACHED_BEHAVIOR_POLL_TIMEOUT,
-                         (size_t)timeout);
+  int32_t timeout= -1;
+  memcached_behavior_set(mclone, MEMCACHED_BEHAVIOR_POLL_TIMEOUT, (size_t)timeout);
 
   timeout= (int32_t)memcached_behavior_get(mclone, MEMCACHED_BEHAVIOR_POLL_TIMEOUT);
 
   test_true(timeout == -1);
 
-  value = (char*)malloc(value_length * sizeof(char));
+  char *value= (char*)malloc(value_length * sizeof(char));
 
-  for (x= 0; x < value_length; x++)
+  for (unsigned int x= 0; x < value_length; x++)
+  {
     value[x]= (char) (x % 127);
+  }
 
-  for (x= 1; x <= 100000; ++x)
+  for (unsigned int x= 1; x <= 100000; ++x)
   {
-    rc= memcached_set(mclone, key, key_len,value, value_length, 0, 0);
+    memcached_return_t rc= memcached_set(mclone, key, key_len,value, value_length, 0, 0);
+    (void)rc;
   }
 
   free(value);
@@ -2682,7 +2682,7 @@ static test_return_t user_supplied_bug12(memcached_st *memc)
   value= memcached_get(memc, "autoincrement", strlen("autoincrement"),
                         &value_length, &flags, &rc);
   test_true(value == NULL);
-  test_true(rc == MEMCACHED_NOTFOUND);
+  test_compare(MEMCACHED_NOTFOUND, rc);
 
   rc= memcached_increment(memc, "autoincrement", strlen("autoincrement"),
                           1, &number_value);
@@ -2691,11 +2691,11 @@ static test_return_t user_supplied_bug12(memcached_st *memc)
   /* The binary protocol will set the key if it doesn't exist */
   if (memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL) == 1)
   {
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
   }
   else
   {
-    test_true(rc == MEMCACHED_NOTFOUND);
+    test_compare(MEMCACHED_NOTFOUND, rc);
   }
 
   rc= memcached_set(memc, "autoincrement", strlen("autoincrement"), "1", 1, 0, 0);
@@ -2703,13 +2703,13 @@ static test_return_t user_supplied_bug12(memcached_st *memc)
   value= memcached_get(memc, "autoincrement", strlen("autoincrement"),
                         &value_length, &flags, &rc);
   test_true(value);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
   free(value);
 
   rc= memcached_increment(memc, "autoincrement", strlen("autoincrement"),
                           1, &number_value);
   test_true(number_value == 2);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   return TEST_SUCCESS;
 }
@@ -2741,7 +2741,7 @@ static test_return_t user_supplied_bug13(memcached_st *memc)
     memset(overflow, 'x', testSize);
     rc= memcached_set(memc, key, strlen(key),
                       overflow, testSize, 0, 0);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
     delete [] overflow;
   }
 
@@ -2785,9 +2785,9 @@ static test_return_t user_supplied_bug14(memcached_st *memc)
     string= memcached_get(memc, key, strlen(key),
                           &string_length, &flags, &rc);
 
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
     test_true(string_length == current_length);
-    test_true(!memcmp(string, value, string_length));
+    test_memcmp(string, value, string_length);
 
     free(string);
   }
@@ -2805,7 +2805,6 @@ static test_return_t user_supplied_bug15(memcached_st *memc)
   uint32_t x;
   memcached_return_t rc;
   const char *key= "mykey";
-  char *value;
   size_t length;
   uint32_t flags;
 
@@ -2815,20 +2814,20 @@ static test_return_t user_supplied_bug15(memcached_st *memc)
                       NULL, 0,
                       (time_t)0, (uint32_t)0);
 
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
 
-    value= memcached_get(memc, key, strlen(key),
-                         &length, &flags, &rc);
+    char *value= memcached_get(memc, key, strlen(key),
+                               &length, &flags, &rc);
 
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(value == NULL);
-    test_true(length == 0);
-    test_true(flags == 0);
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_false(value);
+    test_false(length);
+    test_false(flags);
 
     value= memcached_get(memc, key, strlen(key),
                          &length, &flags, &rc);
 
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
     test_true(value == NULL);
     test_true(length == 0);
     test_true(flags == 0);
@@ -2850,12 +2849,12 @@ static test_return_t user_supplied_bug16(memcached_st *memc)
                     NULL, 0,
                     (time_t)0, UINT32_MAX);
 
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   value= memcached_get(memc, key, strlen(key),
                        &length, &flags, &rc);
 
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
   test_true(value == NULL);
   test_true(length == 0);
   test_true(flags == UINT32_MAX);
@@ -2878,14 +2877,14 @@ static test_return_t user_supplied_bug17(memcached_st *memc)
             value, strlen(value),
             (time_t)0, 0);
 
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
 
     value2= memcached_get(memc, key, strlen(key),
             &length, &flags, &rc);
 
     test_true(length==strlen(value));
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(memcmp(value, value2, length)==0);
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_memcmp(value, value2, length);
     free(value2);
 
     return TEST_SUCCESS;
@@ -2953,7 +2952,6 @@ static test_return_t user_supplied_bug18(memcached_st *trash)
   memcached_return_t rc;
   uint64_t value;
   int x;
-  memcached_server_st *server_pool;
   memcached_st *memc;
 
   (void)trash;
@@ -2962,29 +2960,29 @@ static test_return_t user_supplied_bug18(memcached_st *trash)
   test_true(memc);
 
   rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED, 1);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED);
   test_true(value == 1);
 
   rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_HASH, MEMCACHED_HASH_MD5);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_HASH);
   test_true(value == MEMCACHED_HASH_MD5);
 
-  server_pool = memcached_servers_parse("10.0.1.1:11211 600,10.0.1.2:11211 300,10.0.1.3:11211 200,10.0.1.4:11211 350,10.0.1.5:11211 1000,10.0.1.6:11211 800,10.0.1.7:11211 950,10.0.1.8:11211 100");
+  memcached_server_st *server_pool= memcached_servers_parse("10.0.1.1:11211 600,10.0.1.2:11211 300,10.0.1.3:11211 200,10.0.1.4:11211 350,10.0.1.5:11211 1000,10.0.1.6:11211 800,10.0.1.7:11211 950,10.0.1.8:11211 100");
   memcached_server_push(memc, server_pool);
 
   /* verify that the server list was parsed okay. */
   test_true(memcached_server_count(memc) == 8);
-  test_true(strcmp(server_pool[0].hostname, "10.0.1.1") == 0);
+  test_strcmp(server_pool[0].hostname, "10.0.1.1");
   test_true(server_pool[0].port == 11211);
   test_true(server_pool[0].weight == 600);
-  test_true(strcmp(server_pool[2].hostname, "10.0.1.3") == 0);
+  test_strcmp(server_pool[2].hostname, "10.0.1.3");
   test_true(server_pool[2].port == 11211);
   test_true(server_pool[2].weight == 200);
-  test_true(strcmp(server_pool[7].hostname, "10.0.1.8") == 0);
+  test_strcmp(server_pool[7].hostname, "10.0.1.8");
   test_true(server_pool[7].port == 11211);
   test_true(server_pool[7].weight == 100);
 
@@ -3019,9 +3017,8 @@ static test_return_t user_supplied_bug18(memcached_st *trash)
  */
 
 /* sighandler_t function that always asserts false */
-static void fail(int unused)
+static void fail(int)
 {
-  (void)unused;
   assert(0);
 }
 
@@ -3039,11 +3036,10 @@ static test_return_t _user_supplied_bug21(memcached_st* memc, size_t key_count)
   test_true(memc_clone);
 
   /* only binproto uses getq for mget */
-  memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1);
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1));
 
   /* empty the cache to ensure misses (hence non-responses) */
-  memcached_return_t rc= memcached_flush(memc_clone, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, memcached_flush(memc_clone, 0));
 
   size_t* key_lengths= new (std::nothrow) size_t[key_count];
   test_true(key_lengths);
@@ -3055,19 +3051,35 @@ static test_return_t _user_supplied_bug21(memcached_st* memc, size_t key_count)
 
     snprintf(buffer, 30, "%u", x);
     keys[x]= strdup(buffer);
+    test_true(keys[x]);
     key_lengths[x]= strlen(keys[x]);
   }
 
   oldalarm= signal(SIGALRM, fail);
   alarm(5);
 
-  test_true_got(memcached_success(memcached_mget(memc_clone, (const char **)keys, key_lengths, key_count)), memcached_last_error_message(memc_clone));
+  test_compare_got(MEMCACHED_SUCCESS,
+                   memcached_mget(memc_clone, (const char **)keys, key_lengths, key_count), memcached_last_error_message(memc_clone));
 
   alarm(0);
   signal(SIGALRM, oldalarm);
 
-  size_t keys_returned;
-  test_true(fetch_all_results(memc, &keys_returned) == TEST_SUCCESS);
+  memcached_return_t rc;
+  uint32_t flags;
+  char return_key[MEMCACHED_MAX_KEY];
+  size_t return_key_length;
+  char *return_value;
+  size_t return_value_length;
+  while ((return_value= memcached_fetch(memc, return_key, &return_key_length,
+                                        &return_value_length, &flags, &rc)))
+  {
+    test_false(return_value); // There are no keys to fetch, so the value should never be returned
+  }
+  test_compare(MEMCACHED_NOTFOUND, rc);
+  test_compare(0, return_value_length);
+  test_compare(0, return_key_length);
+  test_false(return_key[0]);
+  test_false(return_value);
 
   for (unsigned int x= 0; x < key_count; x++)
   {
@@ -3090,15 +3102,13 @@ static test_return_t user_supplied_bug21(memcached_st *memc)
   if (test_rc != TEST_SUCCESS)
     return test_rc;
 
-  test_return_t rc;
-
   /* should work as of r580 */
-  rc= _user_supplied_bug21(memc, 10);
-  test_true(rc == TEST_SUCCESS);
+  test_compare(TEST_SUCCESS,
+               _user_supplied_bug21(memc, 10));
 
   /* should fail as of r580 */
-  rc= _user_supplied_bug21(memc, 1000);
-  test_true(rc == TEST_SUCCESS);
+  test_compare(TEST_SUCCESS,
+               _user_supplied_bug21(memc, 1000));
 
   return TEST_SUCCESS;
 }
@@ -3113,20 +3123,20 @@ static test_return_t auto_eject_hosts(memcached_st *trash)
   test_true(memc);
 
   rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED, 1);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   uint64_t value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED);
   test_true(value == 1);
 
   rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_HASH, MEMCACHED_HASH_MD5);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_HASH);
   test_true(value == MEMCACHED_HASH_MD5);
 
     /* server should be removed when in delay */
   rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS, 1);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS);
   test_true(value == 1);
@@ -3137,13 +3147,13 @@ static test_return_t auto_eject_hosts(memcached_st *trash)
 
   /* verify that the server list was parsed okay. */
   test_true(memcached_server_count(memc) == 8);
-  test_true(strcmp(server_pool[0].hostname, "10.0.1.1") == 0);
+  test_strcmp(server_pool[0].hostname, "10.0.1.1");
   test_true(server_pool[0].port == 11211);
   test_true(server_pool[0].weight == 600);
-  test_true(strcmp(server_pool[2].hostname, "10.0.1.3") == 0);
+  test_strcmp(server_pool[2].hostname, "10.0.1.3");
   test_true(server_pool[2].port == 11211);
   test_true(server_pool[2].weight == 200);
-  test_true(strcmp(server_pool[7].hostname, "10.0.1.8") == 0);
+  test_strcmp(server_pool[7].hostname, "10.0.1.8");
   test_true(server_pool[7].port == 11211);
   test_true(server_pool[7].weight == 100);
 
@@ -3173,7 +3183,7 @@ static test_return_t auto_eject_hosts(memcached_st *trash)
     instance=
       memcached_server_instance_by_position(memc, server_idx);
     const char *hostname = memcached_server_name(instance);
-    test_true(strcmp(hostname, ketama_test_cases[x].server) == 0);
+    test_strcmp(hostname, ketama_test_cases[x].server);
   }
 
   memcached_server_list_free(server_pool);
@@ -3192,13 +3202,13 @@ static test_return_t output_ketama_weighted_keys(memcached_st *trash)
 
 
   rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED, 1);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   uint64_t value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED);
   test_true(value == 1);
 
   rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_HASH, MEMCACHED_HASH_MD5);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_HASH);
   test_true(value == MEMCACHED_HASH_MD5);
@@ -3402,7 +3412,7 @@ static test_return_t get_read(memcached_st *memc)
                                       &return_value_length, &flags, &rc);
     /*
       test_true(return_value);
-      test_true(rc == MEMCACHED_SUCCESS);
+      test_compare(MEMCACHED_SUCCESS, rc);
     */
     if (rc == MEMCACHED_SUCCESS && return_value)
       free(return_value);
@@ -3414,46 +3424,46 @@ static test_return_t get_read(memcached_st *memc)
 static test_return_t mget_read(memcached_st *memc)
 {
 
-  if (not libmemcached_util_version_check(memc, 1, 4, 4))
-    return TEST_SKIPPED;
-
-  memcached_return_t rc= memcached_mget(memc, global_keys, global_keys_length, global_count);
+  test_skip(true, bool(libmemcached_util_version_check(memc, 1, 4, 4)));
 
-  test_true_got(memcached_success(rc), memcached_strerror(NULL, rc));
+  memcached_return_t rc;
+  test_compare_got(MEMCACHED_SUCCESS,
+                   rc= memcached_mget(memc, global_keys, global_keys_length, global_count),
+                   memcached_strerror(NULL, rc));
 
   // Go fetch the keys and test to see if all of them were returned
   {
     size_t keys_returned;
-    test_true(fetch_all_results(memc, &keys_returned) == TEST_SUCCESS);
+    test_compare(TEST_SUCCESS, fetch_all_results(memc, keys_returned, MEMCACHED_SUCCESS));
+    test_true(keys_returned > 0);
     char buffer[30];
     snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)keys_returned);
-    test_true_got(global_count == keys_returned, buffer);
+    test_compare_got(global_count, keys_returned, buffer);
   }
 
-
   return TEST_SUCCESS;
 }
 
 static test_return_t mget_read_result(memcached_st *memc)
 {
 
-  if (not libmemcached_util_version_check(memc, 1, 4, 4))
-    return TEST_SKIPPED;
-
-  memcached_return_t rc= memcached_mget(memc, global_keys, global_keys_length, global_count);
+  test_skip(true, bool(libmemcached_util_version_check(memc, 1, 4, 4)));
 
-  test_true_got(memcached_success(rc), memcached_strerror(NULL, rc));
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, global_keys, global_keys_length, global_count));
 
   /* Turn this into a help function */
   {
     memcached_result_st results_obj;
     memcached_result_st *results= memcached_result_create(memc, &results_obj);
 
+    memcached_return_t rc;
     while ((results= memcached_fetch_result(memc, &results_obj, &rc)))
     {
       test_true(results);
-      test_true(rc == MEMCACHED_SUCCESS);
+      test_compare(MEMCACHED_SUCCESS, rc);
     }
+    test_compare(MEMCACHED_END, rc);
 
     memcached_result_free(&results_obj);
   }
@@ -3461,19 +3471,82 @@ static test_return_t mget_read_result(memcached_st *memc)
   return TEST_SUCCESS;
 }
 
-static test_return_t mget_read_function(memcached_st *memc)
+static test_return_t mget_read_internal_result(memcached_st *memc)
 {
 
-  if (not libmemcached_util_version_check(memc, 1, 4, 4))
-    return TEST_SKIPPED;
+  test_skip(true, bool(libmemcached_util_version_check(memc, 1, 4, 4)));
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, global_keys, global_keys_length, global_count));
+  {
+    memcached_result_st *results= NULL;
+    memcached_return_t rc;
+    while ((results= memcached_fetch_result(memc, results, &rc)))
+    {
+      test_true(results);
+      test_compare(MEMCACHED_SUCCESS, rc);
+    }
+    test_compare(MEMCACHED_END, rc);
+
+    memcached_result_free(results);
+  }
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t mget_read_partial_result(memcached_st *memc)
+{
+
+  test_skip(true, bool(libmemcached_util_version_check(memc, 1, 4, 4)));
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, global_keys, global_keys_length, global_count));
+
+  // We will scan for just one key
+  {
+    memcached_result_st results_obj;
+    memcached_result_st *results= memcached_result_create(memc, &results_obj);
+
+    memcached_return_t rc;
+    results= memcached_fetch_result(memc, results, &rc);
+    test_true(results);
+    test_compare(MEMCACHED_SUCCESS, rc);
+
+    memcached_result_free(&results_obj);
+  }
+
+  // We already have a read happening, lets start up another one.
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, global_keys, global_keys_length, global_count));
+  {
+    memcached_result_st results_obj;
+    memcached_result_st *results= memcached_result_create(memc, &results_obj);
+
+    memcached_return_t rc;
+    while ((results= memcached_fetch_result(memc, &results_obj, &rc)))
+    {
+      test_true(results);
+      test_compare(MEMCACHED_SUCCESS, rc);
+    }
+    test_compare(MEMCACHED_END, rc);
+
+    memcached_result_free(&results_obj);
+  }
+
+  return TEST_SUCCESS;
+}
 
-  memcached_return_t rc= memcached_mget(memc, global_keys, global_keys_length, global_count);
+static test_return_t mget_read_function(memcached_st *memc)
+{
+  test_skip(true, bool(libmemcached_util_version_check(memc, 1, 4, 4)));
 
-  test_true_got(memcached_success(rc), memcached_strerror(NULL, rc));
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, global_keys, global_keys_length, global_count));
 
   memcached_execute_fn callbacks[]= { &callback_counter };
   size_t counter= 0;
-  rc= memcached_fetch_execute(memc, callbacks, (void *)&counter, 1);
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_fetch_execute(memc, callbacks, (void *)&counter, 1));
 
   return TEST_SUCCESS;
 }
@@ -3575,7 +3648,7 @@ static test_return_t pre_nonblock_binary(memcached_st *memc)
   {
     memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, 0);
     rc = memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
     test_true(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL) == 1);
   }
   else
@@ -3663,7 +3736,7 @@ static test_return_t pre_hash_fnv1a_32(memcached_st *memc)
 static test_return_t pre_behavior_ketama(memcached_st *memc)
 {
   memcached_return_t rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA, 1);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   uint64_t value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA);
   test_true(value == 1);
@@ -3674,13 +3747,13 @@ static test_return_t pre_behavior_ketama(memcached_st *memc)
 static test_return_t pre_behavior_ketama_weighted(memcached_st *memc)
 {
   memcached_return_t rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED, 1);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   uint64_t value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED);
   test_true(value == 1);
 
   rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_HASH, MEMCACHED_HASH_MD5);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_HASH);
   test_true(value == MEMCACHED_HASH_MD5);
@@ -3698,7 +3771,7 @@ static test_return_t pre_binary(memcached_st *memc)
   if (libmemcached_util_version_check(memc, 1, 4, 4))
   {
     rc = memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
     test_true(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL) == 1);
   }
 
@@ -3722,7 +3795,7 @@ static test_return_t pre_sasl(memcached_st *memc)
     test_true(memcached_server_push(memc, servers) == MEMCACHED_SUCCESS);
     memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1);
     rc= memcached_set_sasl_auth_data(memc, user, pass);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
   }
 #else
   (void)memc;
@@ -3733,7 +3806,7 @@ static test_return_t pre_sasl(memcached_st *memc)
 
 static test_return_t pre_replication(memcached_st *memc)
 {
-  test_true(TEST_SUCCESS == pre_binary(memc));
+  test_skip(TEST_SUCCESS, pre_binary(memc));
 
   /*
    * Make sure that we store the item on all servers
@@ -3741,7 +3814,7 @@ static test_return_t pre_replication(memcached_st *memc)
    */
   memcached_return_t rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS,
                                                 memcached_server_count(memc) - 1);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
   test_true(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS) == memcached_server_count(memc) - 1);
 
   return rc == MEMCACHED_SUCCESS ? TEST_SUCCESS : TEST_SKIPPED;
@@ -3750,7 +3823,7 @@ static test_return_t pre_replication(memcached_st *memc)
 
 static test_return_t pre_replication_noblock(memcached_st *memc)
 {
-  test_compare(TEST_SUCCESS, pre_replication(memc));
+  test_skip(TEST_SUCCESS, pre_replication(memc));
 
   return pre_nonblock(memc);
 }
@@ -3844,12 +3917,12 @@ static test_return_t set_prefix(memcached_st *memc)
 
   value= (char*)memcached_callback_get(memc, MEMCACHED_CALLBACK_PREFIX_KEY, &rc);
   test_true(value);
-  test_true(memcmp(value, key, 4) == 0);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_memcmp(value, key, 4);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   /* Test that we can turn it off */
   rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_PREFIX_KEY, NULL);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   value= (char*)memcached_callback_get(memc, MEMCACHED_CALLBACK_PREFIX_KEY, &rc);
   test_false(value);
@@ -3857,12 +3930,12 @@ static test_return_t set_prefix(memcached_st *memc)
 
   /* Now setup for main test */
   rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_PREFIX_KEY, (void *)key);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   value= (char *)memcached_callback_get(memc, MEMCACHED_CALLBACK_PREFIX_KEY, &rc);
   test_true(value);
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(memcmp(value, key, 4) == 0);
+  test_compare(MEMCACHED_SUCCESS, rc);
+  test_memcmp(value, key, 4);
 
   /* Set to Zero, and then Set to something too large */
   {
@@ -3870,7 +3943,7 @@ static test_return_t set_prefix(memcached_st *memc)
     memset(long_key, 0, 255);
 
     rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_PREFIX_KEY, NULL);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
 
     value= (char*)memcached_callback_get(memc, MEMCACHED_CALLBACK_PREFIX_KEY, &rc);
     test_false(value);
@@ -3881,21 +3954,21 @@ static test_return_t set_prefix(memcached_st *memc)
     /* TODO, extend test to determine based on setting, what result should be */
     strncpy(long_key, "Thisismorethentheallottednumberofcharacters", sizeof(long_key));
     rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_PREFIX_KEY, long_key);
-    //test_true(rc == MEMCACHED_BAD_KEY_PROVIDED);
-    test_true(rc == MEMCACHED_SUCCESS);
+    //test_compare(MEMCACHED_BAD_KEY_PROVIDED, rc);
+    test_compare(MEMCACHED_SUCCESS, rc);
 
     /* Now test a key with spaces (which will fail from long key, since bad key is not set) */
     strncpy(long_key, "This is more then the allotted number of characters", sizeof(long_key));
-    rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_PREFIX_KEY, long_key);
-    test_true(rc == MEMCACHED_BAD_KEY_PROVIDED);
+    test_compare(MEMCACHED_BAD_KEY_PROVIDED,
+                 memcached_callback_set(memc, MEMCACHED_CALLBACK_PREFIX_KEY, long_key));
 
     /* Test for a bad prefix, but with a short key */
-    rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_VERIFY_KEY, 1);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_VERIFY_KEY, 1));
 
     strncpy(long_key, "dog cat", sizeof(long_key));
-    rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_PREFIX_KEY, long_key);
-    test_true(rc == MEMCACHED_BAD_KEY_PROVIDED);
+    test_compare(MEMCACHED_BAD_KEY_PROVIDED,
+                 memcached_callback_set(memc, MEMCACHED_CALLBACK_PREFIX_KEY, long_key));
   }
 
   return TEST_SUCCESS;
@@ -3913,10 +3986,10 @@ static test_return_t deprecated_set_memory_alloc(memcached_st *memc)
     cb_ptr= *(void **)&malloc_cb;
     memcached_return_t rc;
 
-    rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_MALLOC_FUNCTION, cb_ptr);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_callback_set(memc, MEMCACHED_CALLBACK_MALLOC_FUNCTION, cb_ptr));
     test_ptr= memcached_callback_get(memc, MEMCACHED_CALLBACK_MALLOC_FUNCTION, &rc);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
     test_true(test_ptr == cb_ptr);
   }
 
@@ -3926,10 +3999,10 @@ static test_return_t deprecated_set_memory_alloc(memcached_st *memc)
     cb_ptr= *(void **)&realloc_cb;
     memcached_return_t rc;
 
-    rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_REALLOC_FUNCTION, cb_ptr);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_callback_set(memc, MEMCACHED_CALLBACK_REALLOC_FUNCTION, cb_ptr));
     test_ptr= memcached_callback_get(memc, MEMCACHED_CALLBACK_REALLOC_FUNCTION, &rc);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
     test_true(test_ptr == cb_ptr);
   }
 
@@ -3939,10 +4012,10 @@ static test_return_t deprecated_set_memory_alloc(memcached_st *memc)
     cb_ptr= *(void **)&free_cb;
     memcached_return_t rc;
 
-    rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_FREE_FUNCTION, cb_ptr);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_callback_set(memc, MEMCACHED_CALLBACK_FREE_FUNCTION, cb_ptr));
     test_ptr= memcached_callback_get(memc, MEMCACHED_CALLBACK_FREE_FUNCTION, &rc);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
     test_true(test_ptr == cb_ptr);
   }
 
@@ -3953,13 +4026,13 @@ static test_return_t deprecated_set_memory_alloc(memcached_st *memc)
 
 static test_return_t set_memory_alloc(memcached_st *memc)
 {
-  memcached_return_t rc;
-  rc= memcached_set_memory_allocators(memc, NULL, my_free,
-                                      my_realloc, my_calloc, NULL);
-  test_true(rc == MEMCACHED_FAILURE);
+  test_compare(MEMCACHED_FAILURE,
+               memcached_set_memory_allocators(memc, NULL, my_free,
+                                               my_realloc, my_calloc, NULL));
 
-  rc= memcached_set_memory_allocators(memc, my_malloc, my_free,
-                                      my_realloc, my_calloc, NULL);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_set_memory_allocators(memc, my_malloc, my_free,
+                                               my_realloc, my_calloc, NULL));
 
   memcached_malloc_fn mem_malloc;
   memcached_free_fn mem_free;
@@ -4080,15 +4153,13 @@ static test_return_t pre_settimer(memcached_st *memc)
 
 static test_return_t poll_timeout(memcached_st *memc)
 {
-  size_t timeout;
-
-  timeout= 100;
+  size_t timeout= 100; // Not using, just checking that it sets
 
   memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_POLL_TIMEOUT, timeout);
 
   timeout= (size_t)memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_POLL_TIMEOUT);
 
-  test_true(timeout == 100);
+  test_compare(100, timeout);
 
   return TEST_SUCCESS;
 }
@@ -4239,11 +4310,11 @@ static test_return_t analyzer_test(memcached_st *memc)
   memcached_analysis_st *report;
 
   memc_stat= memcached_stat(memc, NULL, &rc);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
   test_true(memc_stat);
 
   report= memcached_analyze(memc, memc_stat, &rc);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
   test_true(report);
 
   free(report);
@@ -4270,20 +4341,16 @@ static test_return_t dump_test(memcached_st *memc)
 {
   size_t counter= 0;
   memcached_dump_fn callbacks[1];
-  test_return_t main_rc;
 
   callbacks[0]= &callback_dump_counter;
 
   /* No support for Binary protocol yet */
-  if (memc->flags.binary_protocol)
-    return TEST_SUCCESS;
-
-  main_rc= set_test3(memc);
+  test_skip(false, memc->flags.binary_protocol);
 
-  test_true (main_rc == TEST_SUCCESS);
+  test_compare(TEST_SUCCESS, set_test3(memc));
 
-  memcached_return_t rc= memcached_dump(memc, callbacks, (void *)&counter, 1);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_dump(memc, callbacks, (void *)&counter, 1));
 
   /* We may have more then 32 if our previous flush has not completed */
   test_true(counter >= 32);
@@ -4304,7 +4371,7 @@ static void* connection_release(void *arg)
 
   usleep(250);
   // Release all of the memc we are holding
-  assert(memcached_pool_push(resource->pool, resource->mmc) == MEMCACHED_SUCCESS);
+  assert(memcached_success(memcached_pool_push(resource->pool, resource->mmc)));
   return arg;
 }
 
@@ -4321,40 +4388,40 @@ static test_return_t connection_pool_test(memcached_st *memc)
   {
     mmc[x]= memcached_pool_pop(pool, false, &rc);
     test_true(mmc[x] != NULL);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, rc);
   }
 
   // All memc should be gone
   test_true(memcached_pool_pop(pool, false, &rc) == NULL);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   pthread_t tid;
   test_pool_context_st item= { pool, mmc[9] };
 
   pthread_create(&tid, NULL, connection_release, &item);
   mmc[9]= memcached_pool_pop(pool, true, &rc);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
   pthread_join(tid, NULL);
   test_true(mmc[9]);
   const char *key= "key";
   size_t keylen= strlen(key);
 
   // verify that I can do ops with all connections
-  rc= memcached_set(mmc[0], key, keylen, "0", 1, 0, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_set(mmc[0], key, keylen, "0", 1, 0, 0));
 
   for (size_t x= 0; x < POOL_SIZE; ++x)
   {
     uint64_t number_value;
-    rc= memcached_increment(mmc[x], key, keylen, 1, &number_value);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(number_value == (x+1));
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_increment(mmc[x], key, keylen, 1, &number_value));
+    test_compare(number_value, (x+1));
   }
 
   // Release them..
   for (size_t x= 0; x < POOL_SIZE; ++x)
   {
-    test_true(memcached_pool_push(pool, mmc[x]) == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, memcached_pool_push(pool, mmc[x]));
   }
 
 
@@ -4363,21 +4430,21 @@ static test_return_t connection_pool_test(memcached_st *memc)
    * when I push the item into the pool
    */
   mmc[0]= memcached_pool_pop(pool, false, &rc);
-  test_true(mmc[0] != NULL);
+  test_true(mmc[0]);
 
   rc= memcached_pool_behavior_set(pool, MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK, 9999);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   mmc[1]= memcached_pool_pop(pool, false, &rc);
-  test_true(mmc[1] != NULL);
+  test_true(mmc[1]);
 
-  test_true(memcached_behavior_get(mmc[1], MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK) == 9999);
-  test_true(memcached_pool_push(pool, mmc[1]) == MEMCACHED_SUCCESS);
-  test_true(memcached_pool_push(pool, mmc[0]) == MEMCACHED_SUCCESS);
+  test_compare(9999, memcached_behavior_get(mmc[1], MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK));
+  test_compare(MEMCACHED_SUCCESS, memcached_pool_push(pool, mmc[1]));
+  test_compare(MEMCACHED_SUCCESS, memcached_pool_push(pool, mmc[0]));
 
   mmc[0]= memcached_pool_pop(pool, false, &rc);
-  test_true(memcached_behavior_get(mmc[0], MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK) == 9999);
-  test_true(memcached_pool_push(pool, mmc[0]) == MEMCACHED_SUCCESS);
+  test_compare(9999, memcached_behavior_get(mmc[0], MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK));
+  test_compare(MEMCACHED_SUCCESS, memcached_pool_push(pool, mmc[0]));
 
   test_true(memcached_pool_destroy(pool) == memc);
 
@@ -4386,10 +4453,8 @@ static test_return_t connection_pool_test(memcached_st *memc)
 
 static test_return_t util_version_test(memcached_st *memc)
 {
-  bool if_successful;
-
-  if_successful= libmemcached_util_version_check(memc, 0, 0, 0);
-  test_true(if_successful == true);
+  bool if_successful= libmemcached_util_version_check(memc, 0, 0, 0);
+  test_true(if_successful);
 
   if_successful= libmemcached_util_version_check(memc, 9, 9, 9);
 
@@ -4449,7 +4514,7 @@ static test_return_t ping_test(memcached_st *memc)
   test_true(libmemcached_util_ping(memcached_server_name(instance),
                                    memcached_server_port(instance), &rc));
 
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   return TEST_SUCCESS;
 }
@@ -4771,7 +4836,6 @@ static test_return_t memcached_get_MEMCACHED_ERRNO(memcached_st *memc)
 {
   (void)memc;
   memcached_st *tl_memc_h;
-  memcached_server_st *servers;
 
   const char *key= "MemcachedLives";
   size_t len;
@@ -4781,7 +4845,8 @@ static test_return_t memcached_get_MEMCACHED_ERRNO(memcached_st *memc)
 
   // Create a handle.
   tl_memc_h= memcached_create(NULL);
-  servers= memcached_servers_parse("localhost:9898,localhost:9899"); // This server should not exist
+  memcached_server_st *servers= memcached_servers_parse("localhost:9898,localhost:9899"); // This server should not exist
+  test_true(servers);
   memcached_server_push(tl_memc_h, servers);
   memcached_server_list_free(servers);
 
@@ -4789,8 +4854,8 @@ static test_return_t memcached_get_MEMCACHED_ERRNO(memcached_st *memc)
   value= memcached_get(tl_memc_h, key, strlen(key), &len, &flags, &rc);
 
   test_false(value);
-  test_true(len == 0);
-  test_false(rc == MEMCACHED_SUCCESS);
+  test_compare(0, len);
+  test_true(memcached_failed(rc));
 
   memcached_free(tl_memc_h);
 
@@ -4812,8 +4877,8 @@ static test_return_t memcached_get_MEMCACHED_NOTFOUND(memcached_st *memc)
   value= memcached_get(memc, key, strlen(key), &len, &flags, &rc);
 
   test_false(value);
-  test_true(len == 0);
-  test_true(rc == MEMCACHED_NOTFOUND);
+  test_compare(0, len);
+  test_compare(MEMCACHED_NOTFOUND, rc);
 
   return TEST_SUCCESS;
 }
@@ -4846,8 +4911,8 @@ static test_return_t memcached_get_by_key_MEMCACHED_ERRNO(memcached_st *memc)
   value= memcached_get_by_key(tl_memc_h, key, strlen(key), key, strlen(key), &len, &flags, &rc);
 
   test_false(value);
-  test_true(len == 0);
-  test_false(rc == MEMCACHED_SUCCESS);
+  test_compare(0, len);
+  test_true(memcached_failed(rc));
 
   memcached_free(tl_memc_h);
 
@@ -4869,50 +4934,42 @@ static test_return_t memcached_get_by_key_MEMCACHED_NOTFOUND(memcached_st *memc)
   value= memcached_get_by_key(memc, key, strlen(key), key, strlen(key), &len, &flags, &rc);
 
   test_false(value);
-  test_true(len == 0);
-  test_true(rc == MEMCACHED_NOTFOUND);
+  test_compare(0, len);
+  test_compare(MEMCACHED_NOTFOUND, rc);
 
   return TEST_SUCCESS;
 }
 
 
-static test_return_t ketama_compatibility_libmemcached(memcached_st *trash)
+static test_return_t ketama_compatibility_libmemcached(memcached_st *)
 {
-  memcached_return_t rc;
-  uint64_t value;
-  int x;
-  memcached_server_st *server_pool;
-  memcached_st *memc;
-
-  (void)trash;
-
-  memc= memcached_create(NULL);
+  memcached_st *memc= memcached_create(NULL);
   test_true(memc);
 
-  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED, 1);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED, 1));
 
-  value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED);
-  test_true(value == 1);
+  uint64_t value;
+  test_compare(1, value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED));
 
-  test_true(memcached_behavior_set_distribution(memc, MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA) == MEMCACHED_SUCCESS);
-  test_true(memcached_behavior_get_distribution(memc) == MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA);
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set_distribution(memc, MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA));
+  test_compare(MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA, memcached_behavior_get_distribution(memc));
 
 
-  server_pool = memcached_servers_parse("10.0.1.1:11211 600,10.0.1.2:11211 300,10.0.1.3:11211 200,10.0.1.4:11211 350,10.0.1.5:11211 1000,10.0.1.6:11211 800,10.0.1.7:11211 950,10.0.1.8:11211 100");
+  memcached_server_st *server_pool= memcached_servers_parse("10.0.1.1:11211 600,10.0.1.2:11211 300,10.0.1.3:11211 200,10.0.1.4:11211 350,10.0.1.5:11211 1000,10.0.1.6:11211 800,10.0.1.7:11211 950,10.0.1.8:11211 100");
   memcached_server_push(memc, server_pool);
 
   /* verify that the server list was parsed okay. */
-  test_true(memcached_server_count(memc) == 8);
+  test_compare(8, memcached_server_count(memc));
   test_strcmp(server_pool[0].hostname, "10.0.1.1");
-  test_true(server_pool[0].port == 11211);
-  test_true(server_pool[0].weight == 600);
+  test_compare(11211, server_pool[0].port);
+  test_compare(600, server_pool[0].weight);
   test_strcmp(server_pool[2].hostname, "10.0.1.3");
-  test_true(server_pool[2].port == 11211);
-  test_true(server_pool[2].weight == 200);
+  test_compare(11211, server_pool[2].port);
+  test_compare(200, server_pool[2].weight);
   test_strcmp(server_pool[7].hostname, "10.0.1.8");
-  test_true(server_pool[7].port == 11211);
-  test_true(server_pool[7].weight == 100);
+  test_compare(11211, server_pool[7].port);
+  test_compare(100, server_pool[7].weight);
 
   /* VDEAAAAA hashes to fffcd1b5, after the last continuum point, and lets
    * us test the boundary wraparound.
@@ -4920,7 +4977,7 @@ static test_return_t ketama_compatibility_libmemcached(memcached_st *trash)
   test_true(memcached_generate_hash(memc, (char *)"VDEAAAAA", 8) == memc->ketama.continuum[0].index);
 
   /* verify the standard ketama set. */
-  for (x= 0; x < 99; x++)
+  for (uint32_t x= 0; x < 99; x++)
   {
     uint32_t server_idx = memcached_generate_hash(memc, ketama_test_cases[x].key, strlen(ketama_test_cases[x].key));
     memcached_server_instance_st instance=
@@ -4936,42 +4993,36 @@ static test_return_t ketama_compatibility_libmemcached(memcached_st *trash)
   return TEST_SUCCESS;
 }
 
-static test_return_t ketama_compatibility_spymemcached(memcached_st *trash)
+static test_return_t ketama_compatibility_spymemcached(memcached_st *)
 {
-  memcached_return_t rc;
   uint64_t value;
-  memcached_server_st *server_pool;
-  memcached_st *memc;
-
-  (void)trash;
 
-  memc= memcached_create(NULL);
+  memcached_st *memc= memcached_create(NULL);
   test_true(memc);
 
-  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED, 1);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED, 1));
 
-  value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED);
-  test_true(value == 1);
+  test_compare(1, value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED));
 
-  test_true(memcached_behavior_set_distribution(memc, MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY) == MEMCACHED_SUCCESS);
-  test_true(memcached_behavior_get_distribution(memc) == MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY);
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set_distribution(memc, MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY));
+  test_compare(MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY, memcached_behavior_get_distribution(memc));
 
-  server_pool = memcached_servers_parse("10.0.1.1:11211 600,10.0.1.2:11211 300,10.0.1.3:11211 200,10.0.1.4:11211 350,10.0.1.5:11211 1000,10.0.1.6:11211 800,10.0.1.7:11211 950,10.0.1.8:11211 100");
-  assert(server_pool);
+  memcached_server_st *server_pool= memcached_servers_parse("10.0.1.1:11211 600,10.0.1.2:11211 300,10.0.1.3:11211 200,10.0.1.4:11211 350,10.0.1.5:11211 1000,10.0.1.6:11211 800,10.0.1.7:11211 950,10.0.1.8:11211 100");
+  test_true(server_pool);
   memcached_server_push(memc, server_pool);
 
   /* verify that the server list was parsed okay. */
-  test_true(memcached_server_count(memc) == 8);
+  test_compare(8, memcached_server_count(memc));
   test_strcmp(server_pool[0].hostname, "10.0.1.1");
-  test_true(server_pool[0].port == 11211);
-  test_true(server_pool[0].weight == 600);
+  test_compare(11211, server_pool[0].port);
+  test_compare(600, server_pool[0].weight);
   test_strcmp(server_pool[2].hostname, "10.0.1.3");
-  test_true(server_pool[2].port == 11211);
-  test_true(server_pool[2].weight == 200);
+  test_compare(11211, server_pool[2].port);
+  test_compare(200, server_pool[2].weight);
   test_strcmp(server_pool[7].hostname, "10.0.1.8");
-  test_true(server_pool[7].port == 11211);
-  test_true(server_pool[7].weight == 100);
+  test_compare(11211, server_pool[7].port);
+  test_compare(100, server_pool[7].weight);
 
   /* VDEAAAAA hashes to fffcd1b5, after the last continuum point, and lets
    * us test the boundary wraparound.
@@ -5009,13 +5060,13 @@ static test_return_t regression_bug_434484(memcached_st *memc)
   size_t keylen= strlen(key);
 
   memcached_return_t ret= memcached_append(memc, key, keylen, key, keylen, 0, 0);
-  test_true(ret == MEMCACHED_NOTSTORED);
+  test_compare(MEMCACHED_NOTSTORED, ret);
 
   size_t size= 2048 * 1024;
   char *data= (char*)calloc(1, size);
   test_true(data);
-  ret= memcached_set(memc, key, keylen, data, size, 0, 0);
-  test_true(ret == MEMCACHED_E2BIG);
+  test_compare(MEMCACHED_E2BIG,
+               memcached_set(memc, key, keylen, data, size, 0, 0));
   free(data);
 
   return TEST_SUCCESS;
@@ -5051,7 +5102,7 @@ static test_return_t regression_bug_434843(memcached_st *memc)
 
      key_length[x]= (size_t)snprintf(k, sizeof(k), "0200%lu", (unsigned long)x);
      keys[x]= strdup(k);
-     test_true(keys[x] != NULL);
+     test_true(keys[x]);
   }
 
   /*
@@ -5060,16 +5111,18 @@ static test_return_t regression_bug_434843(memcached_st *memc)
    */
   for (size_t y= 0; y < 2; y++)
   {
-    rc= memcached_mget(memc, (const char**)keys, key_length, max_keys);
-    test_true(rc == MEMCACHED_SUCCESS);
-    rc= memcached_fetch_execute(memc, callbacks, (void *)&counter, 1);
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_mget(memc, (const char**)keys, key_length, max_keys));
+
+    test_compare(y ?  MEMCACHED_SUCCESS : MEMCACHED_NOTFOUND, 
+                 memcached_fetch_execute(memc, callbacks, (void *)&counter, 1));
 
     if (y == 0)
     {
       /* The first iteration should give me a 100% cache miss. verify that*/
       char blob[1024]= { 0 };
 
-      test_true(counter == 0);
+      test_false(counter);
 
       for (size_t x= 0; x < max_keys; ++x)
       {
@@ -5081,7 +5134,7 @@ static test_return_t regression_bug_434843(memcached_st *memc)
     else
     {
       /* Verify that we received all of the key/value pairs */
-       test_true(counter == max_keys);
+       test_compare(counter, max_keys);
     }
   }
 
@@ -5102,7 +5155,7 @@ static test_return_t regression_bug_434843_buffered(memcached_st *memc)
 {
   memcached_return_t rc;
   rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, 1);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   return regression_bug_434843(memc);
 }
@@ -5111,28 +5164,32 @@ static test_return_t regression_bug_421108(memcached_st *memc)
 {
   memcached_return_t rc;
   memcached_stat_st *memc_stat= memcached_stat(memc, NULL, &rc);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
-  char *bytes= memcached_stat_get_value(memc, memc_stat, "bytes", &rc);
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(bytes != NULL);
-  char *bytes_read= memcached_stat_get_value(memc, memc_stat,
-                                             "bytes_read", &rc);
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(bytes_read != NULL);
+  char *bytes_str= memcached_stat_get_value(memc, memc_stat, "bytes", &rc);
+  test_compare(MEMCACHED_SUCCESS, rc);
+  test_true(bytes_str);
+  char *bytes_read_str= memcached_stat_get_value(memc, memc_stat,
+                                                 "bytes_read", &rc);
+  test_compare(MEMCACHED_SUCCESS, rc);
+  test_true(bytes_read_str);
 
-  char *bytes_written= memcached_stat_get_value(memc, memc_stat,
-                                                "bytes_written", &rc);
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(bytes_written != NULL);
+  char *bytes_written_str= memcached_stat_get_value(memc, memc_stat,
+                                                    "bytes_written", &rc);
+  test_compare(MEMCACHED_SUCCESS, rc);
+  test_true(bytes_written_str);
 
-  test_true(strcmp(bytes, bytes_read) != 0);
-  test_true(strcmp(bytes, bytes_written) != 0);
+  unsigned long long bytes= strtoull(bytes_str, 0, 10);
+  unsigned long long bytes_read= strtoull(bytes_read_str, 0, 10);
+  unsigned long long bytes_written= strtoull(bytes_written_str, 0, 10);
+
+  test_true(bytes != bytes_read);
+  test_true(bytes != bytes_written);
 
   /* Release allocated resources */
-  free(bytes);
-  free(bytes_read);
-  free(bytes_written);
+  free(bytes_str);
+  free(bytes_read_str);
+  free(bytes_written_str);
   memcached_stat_free(NULL, memc_stat);
 
   return TEST_SUCCESS;
@@ -5151,9 +5208,7 @@ static test_return_t regression_bug_421108(memcached_st *memc)
  */
 static test_return_t regression_bug_442914(memcached_st *memc)
 {
-  memcached_return_t rc;
-  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NOREPLY, 1);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_skip(MEMCACHED_SUCCESS,  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NOREPLY, 1));
   memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, 1);
 
   uint32_t number_of_hosts= memcached_server_count(memc);
@@ -5165,20 +5220,18 @@ static test_return_t regression_bug_442914(memcached_st *memc)
   for (uint32_t x= 0; x < 250; ++x)
   {
      len= (size_t)snprintf(k, sizeof(k), "%0250u", x);
-     rc= memcached_delete(memc, k, len, 0);
+     memcached_return_t rc= memcached_delete(memc, k, len, 0);
      test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
   }
 
   (void)snprintf(k, sizeof(k), "%037u", 251U);
   len= strlen(k);
 
-  rc= memcached_delete(memc, k, len, 0);
+  memcached_return_t rc= memcached_delete(memc, k, len, 0);
   test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
 
-  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NOREPLY, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
-  rc= memcached_delete(memc, k, len, 0);
-  test_true(rc == MEMCACHED_NOTFOUND);
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NOREPLY, 0));
+  test_compare(MEMCACHED_NOTFOUND, memcached_delete(memc, k, len, 0));
 
   memc->number_of_hosts= number_of_hosts;
 
@@ -5190,13 +5243,11 @@ static test_return_t regression_bug_447342(memcached_st *memc)
   memcached_server_instance_st instance_one;
   memcached_server_instance_st instance_two;
 
-  if (memcached_server_count(memc) < 3 || pre_replication(memc) != TEST_SUCCESS)
+  if (memcached_server_count(memc) < 3 or pre_replication(memc) != TEST_SUCCESS)
     return TEST_SKIPPED;
 
-  memcached_return_t rc;
-
-  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS, 2);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS, 2));
 
   const size_t max_keys= 100;
   char **keys= (char**)calloc(max_keys, sizeof(char*));
@@ -5208,9 +5259,9 @@ static test_return_t regression_bug_447342(memcached_st *memc)
 
     key_length[x]= (size_t)snprintf(k, sizeof(k), "0200%lu", (unsigned long)x);
     keys[x]= strdup(k);
-    test_true(keys[x] != NULL);
-    rc= memcached_set(memc, k, key_length[x], k, key_length[x], 0, 0);
-    test_true(rc == MEMCACHED_SUCCESS);
+    test_true(keys[x]);
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_set(memc, k, key_length[x], k, key_length[x], 0, 0));
   }
 
   /*
@@ -5231,14 +5282,18 @@ static test_return_t regression_bug_447342(memcached_st *memc)
   /* Verify that all messages are stored, and we didn't stuff too much
    * into the servers
    */
-  rc= memcached_mget(memc, (const char* const *)keys, key_length, max_keys);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, (const char* const *)keys, key_length, max_keys));
 
   size_t counter= 0;
   memcached_execute_fn callbacks[]= { &callback_counter };
-  rc= memcached_fetch_execute(memc, callbacks, (void *)&counter, 1);
+  memcached_return_t rc;
+  test_compare_got(MEMCACHED_SUCCESS, 
+                   rc= memcached_fetch_execute(memc, callbacks, (void *)&counter, 1),
+                   memcached_strerror(NULL, rc));
+
   /* Verify that we received all of the key/value pairs */
-  test_true(counter == max_keys);
+  test_compare(counter, max_keys);
 
   memcached_quit(memc);
   /*
@@ -5255,12 +5310,13 @@ static test_return_t regression_bug_447342(memcached_st *memc)
   ((memcached_server_write_instance_st)instance_one)->port= 0;
   ((memcached_server_write_instance_st)instance_two)->port= 0;
 
-  rc= memcached_mget(memc, (const char* const *)keys, key_length, max_keys);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, (const char* const *)keys, key_length, max_keys));
 
   counter= 0;
-  rc= memcached_fetch_execute(memc, callbacks, (void *)&counter, 1);
-  test_true(counter == (unsigned int)max_keys);
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_fetch_execute(memc, callbacks, (void *)&counter, 1));
+  test_compare(counter, (unsigned int)max_keys);
 
   /* restore the memc handle */
   ((memcached_server_write_instance_st)instance_one)->port= port0;
@@ -5273,8 +5329,8 @@ static test_return_t regression_bug_447342(memcached_st *memc)
   {
     if (x & 1)
     {
-      rc= memcached_delete(memc, keys[x], key_length[x], 0);
-      test_true(rc == MEMCACHED_SUCCESS);
+      test_compare(MEMCACHED_SUCCESS,
+                   memcached_delete(memc, keys[x], key_length[x], 0));
     }
   }
 
@@ -5283,12 +5339,14 @@ static test_return_t regression_bug_447342(memcached_st *memc)
   ((memcached_server_write_instance_st)instance_two)->port= 0;
 
   /* now retry the command, this time we should have cache misses */
-  rc= memcached_mget(memc, (const char* const *)keys, key_length, max_keys);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, (const char* const *)keys, key_length, max_keys));
 
   counter= 0;
-  rc= memcached_fetch_execute(memc, callbacks, (void *)&counter, 1);
-  test_true(counter == (unsigned int)(max_keys >> 1));
+  test_compare_got(MEMCACHED_SUCCESS, 
+                   rc= memcached_fetch_execute(memc, callbacks, (void *)&counter, 1),
+                   memcached_strerror(NULL, rc));
+  test_compare(counter, (unsigned int)(max_keys >> 1));
 
   /* Release allocated resources */
   for (size_t x= 0; x < max_keys; ++x)
@@ -5308,7 +5366,7 @@ static test_return_t regression_bug_447342(memcached_st *memc)
 static test_return_t regression_bug_463297(memcached_st *memc)
 {
   memcached_st *memc_clone= memcached_clone(NULL, memc);
-  test_true(memc_clone != NULL);
+  test_true(memc_clone);
   test_true(memcached_version(memc_clone) == MEMCACHED_SUCCESS);
 
   memcached_server_instance_st instance=
@@ -5320,16 +5378,16 @@ static test_return_t regression_bug_463297(memcached_st *memc)
   {
     /* Binary protocol doesn't support deferred delete */
     memcached_st *bin_clone= memcached_clone(NULL, memc);
-    test_true(bin_clone != NULL);
-    test_true(memcached_behavior_set(bin_clone, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1) == MEMCACHED_SUCCESS);
-    test_true(memcached_delete(bin_clone, "foo", 3, 1) == MEMCACHED_INVALID_ARGUMENTS);
+    test_true(bin_clone);
+    test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(bin_clone, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1));
+    test_compare(MEMCACHED_INVALID_ARGUMENTS, memcached_delete(bin_clone, "foo", 3, 1));
     memcached_free(bin_clone);
 
     memcached_quit(memc_clone);
 
     /* If we know the server version, deferred delete should fail
      * with invalid arguments */
-    test_true(memcached_delete(memc_clone, "foo", 3, 1) == MEMCACHED_INVALID_ARGUMENTS);
+    test_compare(MEMCACHED_INVALID_ARGUMENTS, memcached_delete(memc_clone, "foo", 3, 1));
 
     /* If we don't know the server version, we should get a protocol error */
     memcached_return_t rc= memcached_delete(memc, "foo", 3, 1);
@@ -5345,20 +5403,20 @@ static test_return_t regression_bug_463297(memcached_st *memc)
     test_true_got(rc == MEMCACHED_PROTOCOL_ERROR || rc == MEMCACHED_NOTFOUND || rc == MEMCACHED_CLIENT_ERROR || rc == MEMCACHED_INVALID_ARGUMENTS, memcached_strerror(NULL, rc));
 
     /* Same goes for noreply... */
-    test_true(memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NOREPLY, 1) == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NOREPLY, 1));
     rc= memcached_delete(memc, "foo", 3, 1);
     test_true_got(rc == MEMCACHED_PROTOCOL_ERROR || rc == MEMCACHED_NOTFOUND || rc == MEMCACHED_CLIENT_ERROR || rc == MEMCACHED_INVALID_ARGUMENTS, memcached_strerror(NULL, rc));
 
     /* but a normal request should go through (and be buffered) */
-    test_true((rc= memcached_delete(memc, "foo", 3, 0)) == MEMCACHED_BUFFERED);
-    test_true(memcached_flush_buffers(memc) == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_BUFFERED, (rc= memcached_delete(memc, "foo", 3, 0)));
+    test_compare(MEMCACHED_SUCCESS, memcached_flush_buffers(memc));
 
-    test_true(memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, 0) == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, 0));
     /* unbuffered noreply should be success */
-    test_true(memcached_delete(memc, "foo", 3, 0) == MEMCACHED_SUCCESS);
+    test_compare(MEMCACHED_SUCCESS, memcached_delete(memc, "foo", 3, 0));
     /* unbuffered with reply should be not found... */
-    test_true(memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NOREPLY, 0) == MEMCACHED_SUCCESS);
-    test_true(memcached_delete(memc, "foo", 3, 0) == MEMCACHED_NOTFOUND);
+    test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NOREPLY, 0));
+    test_compare(MEMCACHED_NOTFOUND, memcached_delete(memc, "foo", 3, 0));
   }
 
   memcached_free(memc_clone);
@@ -5399,7 +5457,7 @@ static test_return_t test_get_last_disconnect(memcached_st *memc)
   test_true(servers);
   mine= memcached_create(NULL);
   rc= memcached_server_push(mine, servers);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
   memcached_server_list_free(servers);
   test_true(mine);
 
@@ -5411,7 +5469,7 @@ static test_return_t test_get_last_disconnect(memcached_st *memc)
   disconnected_server= memcached_server_get_last_disconnect(mine);
   test_true_got(disconnected_server, memcached_strerror(mine, rc));
   test_compare(9, memcached_server_port(disconnected_server));
-  test_true(strncmp(memcached_server_name(disconnected_server),"localhost",9) == 0);
+  test_false(strncmp(memcached_server_name(disconnected_server),"localhost",9));
 
   memcached_quit(mine);
   memcached_free(mine);
@@ -5440,7 +5498,7 @@ static test_return_t test_multiple_get_last_disconnect(memcached_st *)
     {
       const char *msg=  memcached_strerror(memc, memcached_return_t(x));
       memcached_return_t ret= memcached_set(memc, msg, strlen(msg), NULL, 0, (time_t)0, (uint32_t)0);
-      test_compare_got(MEMCACHED_WRITE_FAILURE, ret, memcached_strerror(NULL, ret));
+      test_compare_got(MEMCACHED_CONNECTION_FAILURE, ret, memcached_last_error_message(memc));
 
       memcached_server_instance_st disconnected_server= memcached_server_get_last_disconnect(memc);
       test_true(disconnected_server);
@@ -5468,33 +5526,32 @@ static test_return_t test_verbosity(memcached_st *memc)
 
 static test_return_t test_server_failure(memcached_st *memc)
 {
-  memcached_st *local_memc;
   memcached_server_instance_st instance= memcached_server_instance_by_position(memc, 0);
 
-  local_memc= memcached_create(NULL);
+  memcached_st *local_memc= memcached_create(NULL);
 
   memcached_server_add(local_memc, memcached_server_name(instance), memcached_server_port(instance));
   memcached_behavior_set(local_memc, MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT, 2);
 
   uint32_t server_count= memcached_server_count(local_memc);
-
-  test_true(server_count == 1);
+  test_compare(1, server_count);
 
   // Disable the server
   instance= memcached_server_instance_by_position(local_memc, 0);
   ((memcached_server_write_instance_st)instance)->server_failure_counter= 2;
 
   memcached_return_t rc;
-  rc= memcached_set(local_memc, "foo", strlen("foo"),
-                    NULL, 0,
-                    (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SERVER_MARKED_DEAD);
+  test_compare_got(MEMCACHED_SERVER_MARKED_DEAD,
+                   rc= memcached_set(local_memc, "foo", strlen("foo"), NULL, 0, (time_t)0, (uint32_t)0),
+                   memcached_last_error_message(local_memc));
 
   ((memcached_server_write_instance_st)instance)->server_failure_counter= 0;
-  rc= memcached_set(local_memc, "foo", strlen("foo"),
-                    NULL, 0,
-                    (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare_got(MEMCACHED_SUCCESS,
+                   rc= memcached_set(local_memc, "foo", strlen("foo"), NULL, 0, (time_t)0, (uint32_t)0),
+                   memcached_strerror(NULL, rc));
+#if 0
+                   memcached_last_error_message(local_memc));
+#endif
 
 
   memcached_free(local_memc);
@@ -5511,7 +5568,7 @@ static test_return_t test_cull_servers(memcached_st *memc)
   memc->state.is_time_for_rebuild= true;
 
   uint32_t new_count= memcached_server_count(memc);
-  test_true(count == new_count);
+  test_compare(count, new_count);
 
 #if 0
   test_true(count == new_count + 1 );
@@ -5539,16 +5596,16 @@ static memcached_return_t stat_printer(memcached_server_instance_st server,
 static test_return_t memcached_stat_execute_test(memcached_st *memc)
 {
   memcached_return_t rc= memcached_stat_execute(memc, NULL, stat_printer, NULL);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   rc= memcached_stat_execute(memc, "slabs", stat_printer, NULL);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   rc= memcached_stat_execute(memc, "items", stat_printer, NULL);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   rc= memcached_stat_execute(memc, "sizes", stat_printer, NULL);
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS, rc);
 
   return TEST_SUCCESS;
 }
@@ -5594,7 +5651,7 @@ static test_return_t wrong_failure_counter_test(memcached_st *memc)
    * Please note that this isn't bullet proof, because an error could
    * occur...
    */
-  test_true(instance->server_failure_counter == 0);
+  test_compare(0, instance->server_failure_counter);
 
   /* restore the instance */
   memc->number_of_hosts= number_of_hosts;
@@ -5628,23 +5685,23 @@ static test_return_t wrong_failure_counter_two_test(memcached_st *memc)
 
 
   /* put failure limit to 1 */
-  rc= memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT, 1);
-  assert(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT, 1));
 
   /* Put a retry timeout to effectively activate failure_limit effect */
-  rc= memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_RETRY_TIMEOUT, 1);
-  assert(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_RETRY_TIMEOUT, 1));
 
   /* change behavior that triggers memcached_quit()*/
-  rc= memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_TCP_NODELAY, 1);
-  assert(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_TCP_NODELAY, 1));
 
 
   /* Check if we still are connected */
   string= memcached_get(memc_clone, key, strlen(key),
                         &string_length, &flags, &rc);
 
-  test_true_got(rc == MEMCACHED_SUCCESS, memcached_strerror(NULL, rc));
+  test_compare_got(MEMCACHED_SUCCESS, rc, memcached_strerror(NULL, rc));
   test_true(string);
   free(string);
   memcached_free(memc_clone);
@@ -5683,47 +5740,26 @@ static test_return_t regression_bug_490486(memcached_st *memc)
   size_t *key_length= (size_t *)calloc(max_keys, sizeof(size_t));
 
   /* First add all of the items.. */
-  bool slept= false;
   char blob[1024]= { 0 };
-  memcached_return rc;
   for (size_t x= 0; x < max_keys; ++x)
   {
     char k[251];
     key_length[x]= (size_t)snprintf(k, sizeof(k), "0200%lu", (unsigned long)x);
     keys[x]= strdup(k);
-    assert(keys[x] != NULL);
-    rc= memcached_set(memc, keys[x], key_length[x], blob, sizeof(blob), 0, 0);
-#ifdef __APPLE__
-    if (rc == MEMCACHED_SERVER_MARKED_DEAD)
-    {
-      break; // We are out of business
-    }
-#endif
-    test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED || rc == MEMCACHED_TIMEOUT); // MEMCACHED_TIMEOUT <-- only observed on OSX
-
-    if (rc == MEMCACHED_TIMEOUT && slept == false)
-    {
-      x++;
-      sleep(1);// We will try to sleep
-      slept= true;
-    }
-    else if (rc == MEMCACHED_TIMEOUT && slept == true)
-    {
-      // We failed to send everything.
-      break;
-    }
+    test_true(keys[x]);
+    memcached_return rc= memcached_set(memc, keys[x], key_length[x], blob, sizeof(blob), 0, 0);
+    test_true(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED); // MEMCACHED_TIMEOUT <-- hash been observed on OSX
   }
 
-  if (rc != MEMCACHED_SERVER_MARKED_DEAD)
   {
 
     /* Try to get all of them with a large multiget */
     size_t counter= 0;
     memcached_execute_function callbacks[]= { &callback_counter };
-    rc= memcached_mget_execute(memc, (const char**)keys, key_length,
-                               (size_t)max_keys, callbacks, &counter, 1);
+    memcached_return_t rc= memcached_mget_execute(memc, (const char**)keys, key_length,
+                                                  (size_t)max_keys, callbacks, &counter, 1);
+    test_compare(MEMCACHED_SUCCESS, rc);
 
-    assert(rc == MEMCACHED_SUCCESS);
     char* the_value= NULL;
     char the_key[MEMCACHED_MAX_KEY];
     size_t the_key_length;
@@ -5742,10 +5778,10 @@ static test_return_t regression_bug_490486(memcached_st *memc)
     } while ( (the_value!= NULL) && (rc == MEMCACHED_SUCCESS));
 
 
-    assert(rc == MEMCACHED_END);
+    test_compare(MEMCACHED_END, rc);
 
     /* Verify that we got all of the items */
-    assert(counter == max_keys);
+    test_compare(counter, max_keys);
   }
 
   /* Release all allocated resources */
@@ -5765,7 +5801,7 @@ static test_return_t regression_bug_583031(memcached_st *)
 {
   memcached_st *memc= memcached_create(NULL);
   test_true(memc);
-  test_true(memcached_success(memcached_server_add(memc, "10.2.3.4", 11211)));
+  test_compare(MEMCACHED_SUCCESS, memcached_server_add(memc, "10.2.3.4", 11211));
 
   memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT, 1000);
   memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_RETRY_TIMEOUT, 1000);
@@ -5782,7 +5818,7 @@ static test_return_t regression_bug_583031(memcached_st *)
   test_false(value);
   test_compare(0, length);
 
-  test_true_got(rc == MEMCACHED_TIMEOUT || rc == MEMCACHED_ERRNO || rc == MEMCACHED_FAILURE, memcached_strerror(memc, rc));
+  test_compare_got(MEMCACHED_TIMEOUT, rc, memcached_strerror(memc, rc));
 
   memcached_free(memc);
 
@@ -5801,6 +5837,131 @@ static test_return_t regression_bug_581030(memcached_st *)
   return TEST_SUCCESS;
 }
 
+#define regression_bug_655423_COUNT 6000
+static test_return_t regression_bug_655423(memcached_st *memc)
+{
+  memcached_st *clone= memcached_clone(NULL, memc);
+  memc= NULL; // Just to make sure it is not used
+  test_true(clone);
+  char payload[100];
+
+  test_skip(MEMCACHED_SUCCESS, memcached_behavior_set(clone, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1));
+  test_skip(MEMCACHED_SUCCESS, memcached_behavior_set(clone, MEMCACHED_BEHAVIOR_SUPPORT_CAS, 1));
+  test_skip(MEMCACHED_SUCCESS, memcached_behavior_set(clone, MEMCACHED_BEHAVIOR_TCP_NODELAY, 1));
+  test_skip(MEMCACHED_SUCCESS, memcached_behavior_set(clone, MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH, 1));
+
+  memset(payload, int('x'), sizeof(payload));
+
+  for (uint32_t x= 0; x < regression_bug_655423_COUNT; x++)
+  {
+    char key[1024];
+    snprintf(key, sizeof(key), "%u", x);
+
+    test_compare(MEMCACHED_SUCCESS, memcached_set(clone, key, strlen(key), payload, sizeof(payload), 0, 0));
+  }
+
+  for (uint32_t x= 0; x < regression_bug_655423_COUNT; x++)
+  {
+    char key[1024];
+    snprintf(key, sizeof(key), "%u", x);
+
+    size_t value_length;
+    memcached_return_t rc;
+    char *value= memcached_get(clone, key, strlen(key), &value_length, NULL, &rc);
+
+    if (rc == MEMCACHED_NOTFOUND)
+    {
+      test_false(value);
+      test_compare(0, value_length);
+      continue;
+    }
+
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_true(value);
+    test_compare(100, value_length);
+    free(value);
+  }
+
+  char **keys= (char**)calloc(regression_bug_655423_COUNT, sizeof(char*));
+  size_t *key_length= (size_t *)calloc(regression_bug_655423_COUNT, sizeof(size_t));
+  for (uint32_t x= 0; x < regression_bug_655423_COUNT; x++)
+  {
+    char key[1024];
+    snprintf(key, sizeof(key), "%u", x);
+
+    keys[x]= strdup(key);
+    key_length[x]= strlen(key);
+  }
+
+  memcached_return_t rc;
+  test_compare_got(MEMCACHED_SUCCESS,
+                   rc= memcached_mget(clone, (const char* const *)keys, key_length, regression_bug_655423_COUNT),
+                   memcached_strerror(NULL, rc));
+
+  uint32_t count= 0;
+  memcached_result_st *result= NULL;
+  while ((result= memcached_fetch_result(clone, result, NULL)))
+  {
+    test_compare(100, memcached_result_length(result));
+    count++;
+  }
+
+  test_true(count > 100); // If we don't get back atleast this, something is up
+
+  /* Release all allocated resources */
+  for (size_t x= 0; x < regression_bug_655423_COUNT; ++x)
+  {
+    free(keys[x]);
+  }
+  free(keys);
+  free(key_length);
+
+
+  memcached_free(clone);
+
+  return TEST_SUCCESS;
+}
+
+/*
+ * Test that ensures that buffered set to not trigger problems during io_flush
+ */
+#define regression_bug_490520_COUNT 200480
+static test_return_t regression_bug_490520(memcached_st *memc)
+{
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK,1);
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS,1);
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_POLL_TIMEOUT, 1000);
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT,1);
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_RETRY_TIMEOUT, 3600);
+
+  memc->number_of_hosts= 1;
+
+  char **keys= (char **)calloc(regression_bug_490520_COUNT, sizeof(char*));
+  size_t *key_length= (size_t *)calloc(regression_bug_490520_COUNT, sizeof(size_t));
+
+  /* First add all of the items.. */
+  char blob[3333] = {0};
+  for (uint32_t x= 0; x < regression_bug_490520_COUNT; ++x)
+  {
+    char k[251];
+    key_length[x]= (size_t)snprintf(k, sizeof(k), "0200%u", x);
+    keys[x]= strdup(k);
+    test_true(keys[x]);
+
+    memcached_return rc= memcached_set(memc, keys[x], key_length[x], blob, sizeof(blob), 0, 0);
+    test_true(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED);
+  }
+
+  for (uint32_t x= 0; x < regression_bug_490520_COUNT; ++x)
+  {
+    free(keys[x]);
+  }
+  free(keys);
+  free(key_length);
+
+  return TEST_SUCCESS;
+}
+
 static void memcached_die(memcached_st* mc, memcached_return error, const char* what, uint32_t it)
 {
   fprintf(stderr, "Iteration #%u: ", it);
@@ -5918,24 +6079,21 @@ static test_return_t regression_bug_(memcached_st *memc)
 static test_return_t sasl_auth_test(memcached_st *memc)
 {
 #ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
-  memcached_return_t rc;
-
-  rc= memcached_set(memc, "foo", 3, "bar", 3, (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true((rc= memcached_delete(memc, "foo", 3, 0)) == MEMCACHED_SUCCESS);
-  test_true((rc= memcached_destroy_sasl_auth_data(memc)) == MEMCACHED_SUCCESS);
-  test_true((rc= memcached_destroy_sasl_auth_data(memc)) == MEMCACHED_FAILURE);
-  test_true((rc= memcached_destroy_sasl_auth_data(NULL)) == MEMCACHED_FAILURE);
+  test_compare(MEMCACHED_SUCCESS, memcached_set(memc, "foo", 3, "bar", 3, (time_t)0, (uint32_t)0));
+  test_compare(MEMCACHED_SUCCESS, memcached_delete(memc, "foo", 3, 0));
+  test_compare(MEMCACHED_SUCCESS, memcached_destroy_sasl_auth_data(memc));
+  test_compare(MEMCACHED_FAILURE, memcached_destroy_sasl_auth_data(memc));
+  test_compare(MEMCACHED_FAILURE, memcached_destroy_sasl_auth_data(NULL));
   memcached_quit(memc);
 
-  rc= memcached_set_sasl_auth_data(memc,
-                                   getenv("LIBMEMCACHED_TEST_SASL_USERNAME"),
-                                   getenv("LIBMEMCACHED_TEST_SASL_SERVER"));
-  test_true(rc == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_set_sasl_auth_data(memc,
+                                            getenv("LIBMEMCACHED_TEST_SASL_USERNAME"),
+                                            getenv("LIBMEMCACHED_TEST_SASL_SERVER")));
 
-  rc= memcached_set(memc, "foo", 3, "bar", 3, (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_AUTH_FAILURE);
-  test_true(memcached_destroy_sasl_auth_data(memc) == MEMCACHED_SUCCESS);
+  test_compare(MEMCACHED_AUTH_FAILURE, 
+               memcached_set(memc, "foo", 3, "bar", 3, (time_t)0, (uint32_t)0));
+  test_compare(MEMCACHED_SUCCESS, memcached_destroy_sasl_auth_data(memc));
 
   memcached_quit(memc);
   return TEST_SUCCESS;
@@ -5966,6 +6124,7 @@ test_st tests[] ={
   {"set3", 0, (test_callback_fn)set_test3 },
   {"dump", 1, (test_callback_fn)dump_test},
   {"add", 1, (test_callback_fn)add_test },
+  {"memcached_fetch_result(MEMCACHED_NOTFOUND)", 1, (test_callback_fn)memcached_fetch_result_NOT_FOUND },
   {"replace", 1, (test_callback_fn)replace_test },
   {"delete", 1, (test_callback_fn)delete_test },
   {"get", 1, (test_callback_fn)get_test },
@@ -6074,11 +6233,15 @@ test_st version_1_2_3[] ={
   {0, 0, (test_callback_fn)0}
 };
 
+test_st haldenbrand_tests[] ={
+  {"memcached_set", 0, (test_callback_fn)user_supplied_bug1 },
+  {"memcached_get()", 0, (test_callback_fn)user_supplied_bug2 },
+  {"memcached_mget()", 0, (test_callback_fn)user_supplied_bug3 },
+  {0, 0, (test_callback_fn)0}
+};
+
 test_st user_tests[] ={
-  {"user_supplied_bug1", 0, (test_callback_fn)user_supplied_bug1 },
-  {"user_supplied_bug2", 0, (test_callback_fn)user_supplied_bug2 },
-  {"user_supplied_bug3", 0, (test_callback_fn)user_supplied_bug3 },
-  {"user_supplied_bug4", 0, (test_callback_fn)user_supplied_bug4 },
+  {"user_supplied_bug4", true, (test_callback_fn)user_supplied_bug4 },
   {"user_supplied_bug5", 1, (test_callback_fn)user_supplied_bug5 },
   {"user_supplied_bug6", 1, (test_callback_fn)user_supplied_bug6 },
   {"user_supplied_bug7", 1, (test_callback_fn)user_supplied_bug7 },
@@ -6116,6 +6279,7 @@ test_st replication_tests[]= {
   {"mget", 0, (test_callback_fn)replication_mget_test },
   {"delete", 0, (test_callback_fn)replication_delete_test },
   {"rand_mget", 0, (test_callback_fn)replication_randomize_mget_test },
+  {"fail", 0, (test_callback_fn)replication_randomize_mget_fail_test },
   {0, 0, (test_callback_fn)0}
 };
 
@@ -6138,6 +6302,10 @@ test_st regression_tests[]= {
   {"lp:?", 1, (test_callback_fn)regression_bug_ },
   {"lp:728286", 1, (test_callback_fn)regression_bug_728286 },
   {"lp:581030", 1, (test_callback_fn)regression_bug_581030 },
+  {"lp:71231153 connect()", 1, (test_callback_fn)regression_bug_71231153_connect },
+  {"lp:71231153 poll()", 1, (test_callback_fn)regression_bug_71231153_poll },
+  {"lp:655423", 1, (test_callback_fn)regression_bug_655423 },
+  {"lp:490520", 1, (test_callback_fn)regression_bug_490520 },
   {0, 0, (test_callback_fn)0}
 };
 
@@ -6162,6 +6330,8 @@ test_st generate_tests[] ={
   {"generate_data", 1, (test_callback_fn)generate_data },
   {"mget_read", 0, (test_callback_fn)mget_read },
   {"mget_read_result", 0, (test_callback_fn)mget_read_result },
+  {"memcached_fetch_result() use internal result", 0, (test_callback_fn)mget_read_internal_result },
+  {"memcached_fetch_result() partial read", 0, (test_callback_fn)mget_read_partial_result },
   {"mget_read_function", 0, (test_callback_fn)mget_read_function },
   {"cleanup", 1, (test_callback_fn)cleanup_pairs },
   {"generate_large_pairs", 1, (test_callback_fn)generate_large_pairs },
@@ -6299,6 +6469,7 @@ collection_st collection[] ={
   {"result", 0, 0, result_tests},
   {"async", (test_callback_fn)pre_nonblock, 0, async_tests},
   {"async_binary", (test_callback_fn)pre_nonblock_binary, 0, async_tests},
+  {"Cal Haldenbrand's tests", 0, 0, haldenbrand_tests},
   {"user", 0, 0, user_tests},
   {"generate", 0, 0, generate_tests},
   {"generate_hsieh", (test_callback_fn)pre_hsieh, 0, generate_tests},
index 7a8b869070a8a64a08742dabb22d975c440696be..bb2de83f3ba3be786184a1e8df7c34ca74dbe405 100644 (file)
@@ -46,6 +46,7 @@
 #define BUILDING_LIBMEMCACHED
 // !NEVER use common.h, always use memcached.h in your own apps
 #include <libmemcached/common.h>
+#include <libmemcached/util.h>
 
 #include "tests/parser.h"
 #include "tests/print.h"
@@ -545,3 +546,54 @@ test_return_t test_hostname_port_weight(memcached_st *)
 
   return TEST_SUCCESS;
 }
+
+/*
+  By setting the timeout value to zero, we force poll() to return immediatly.
+*/
+test_return_t regression_bug_71231153_connect(memcached_st *)
+{
+  if (libmemcached_util_ping("10.0.2.252", 0, NULL)) // If for whatever reason someone has a host at this address, skip
+    return TEST_SKIPPED;
+
+  { // Test the connect-timeout, on a bad host we should get MEMCACHED_CONNECTION_FAILURE
+    memcached_st *memc= memcached(memcached_literal_param("--SERVER=10.0.2.252 --CONNECT-TIMEOUT=0"));
+    test_true(memc);
+    test_compare(0, memc->connect_timeout);
+    test_compare(MEMCACHED_DEFAULT_TIMEOUT, memc->poll_timeout);
+
+    memcached_return_t rc;
+    size_t value_len;
+    char *value= memcached_get(memc, memcached_literal_param("test"), &value_len, NULL, &rc);
+    test_false(value);
+    test_compare(0, value_len);
+    test_compare_got(MEMCACHED_TIMEOUT, rc, memcached_strerror(NULL, rc));
+
+    memcached_free(memc);
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t regression_bug_71231153_poll(memcached_st *)
+{
+  if (libmemcached_util_ping("10.0.2.252", 0, NULL)) // If for whatever reason someone has a host at this address, skip
+    return TEST_SKIPPED;
+
+  { // Test the poll timeout, on a bad host we should get MEMCACHED_CONNECTION_FAILURE
+    memcached_st *memc= memcached(memcached_literal_param("--SERVER=10.0.2.252 --POLL-TIMEOUT=0"));
+    test_true(memc);
+    test_compare(MEMCACHED_DEFAULT_CONNECT_TIMEOUT, memc->connect_timeout);
+    test_compare(0, memc->poll_timeout);
+
+    memcached_return_t rc;
+    size_t value_len;
+    char *value= memcached_get(memc, memcached_literal_param("test"), &value_len, NULL, &rc);
+    test_false(value);
+    test_compare(0, value_len);
+    test_compare_got(MEMCACHED_TIMEOUT, rc, memcached_strerror(NULL, rc));
+
+    memcached_free(memc);
+  }
+
+  return TEST_SUCCESS;
+}
index dba9bc59ca55b97142cf9a4d6d2060a9edebeb36..15d57a64683317cb2d7c55dc8a8e5b7a4cd5bcdd 100644 (file)
@@ -100,6 +100,12 @@ test_return_t server_with_weight_test(memcached_st *);
 LIBTEST_INTERNAL_API
 test_return_t test_hostname_port_weight(memcached_st *);
 
+LIBTEST_INTERNAL_API
+test_return_t regression_bug_71231153_connect(memcached_st *);
+
+LIBTEST_INTERNAL_API
+test_return_t regression_bug_71231153_poll(memcached_st *);
+
 #ifdef __cplusplus
 }
 #endif
index c4b671153269ea9724082dec199549172c3d4504..59ebf555def8193c44df885be73403de1c4eb429 100644 (file)
@@ -164,26 +164,24 @@ test_return_t mget_test(memcached_st *original)
   vector<char> return_value;
 
   /* We need to empty the server before we continue the test */
-  test_true(memc.flush(0));
+  test_true(memc.flush());
 
   test_true(memc.mget(keys));
 
-  while ((mc_rc= memc.fetch(return_key, return_value)) != MEMCACHED_END)
-  {
-    test_true(return_value.size());
-    return_value.clear();
-  }
-  test_compare(mc_rc, MEMCACHED_END);
+  test_compare(MEMCACHED_NOTFOUND, 
+               memc.fetch(return_key, return_value));
 
   test_true(memc.setAll(keys, values, 50, 9));
 
   test_true(memc.mget(keys));
-
-  while ((mc_rc= memc.fetch(return_key, return_value)) != MEMCACHED_END)
+  size_t count= 0;
+  while ((mc_rc= memc.fetch(return_key, return_value)) == MEMCACHED_SUCCESS)
   {
     test_compare(return_key.length(), return_value.size());
     test_memcmp(&return_value[0], return_key.c_str(), return_value.size());
+    count++;
   }
+  test_compare(values.size(), count);
 
   return TEST_SUCCESS;
 }
index 3034c6a44c1cdeca36dd5861b925e43832828e51..92d68066626add88befe75171eec4895349f7544 100644 (file)
@@ -294,3 +294,41 @@ test_return_t replication_delete_test(memcached_st *memc)
 
   return TEST_SUCCESS;
 }
+
+test_return_t replication_randomize_mget_fail_test(memcached_st *memc)
+{
+  memcached_st *memc_clone= memcached_clone(NULL, memc);
+  memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS, 3);
+
+  for (int x= int(MEMCACHED_SUCCESS); x < int(MEMCACHED_MAXIMUM_RETURN); ++x)
+  {
+    const char *key= memcached_strerror(NULL, memcached_return_t(x));
+    memcached_return_t rc= memcached_set(memc,
+                                         key, strlen(key),
+                                         key, strlen(key), 0, 0);
+    test_true(rc == MEMCACHED_SUCCESS);
+  }
+
+  memcached_flush_buffers(memc);
+
+  // We need to now cause a failure in one server, never do this in your own
+  // code.
+  close(memc_clone->servers[1].fd);
+  memc_clone->servers[1].port= 1;
+  memc_clone->servers[1].address_info_next= NULL;
+
+  for (int x= int(MEMCACHED_SUCCESS); x < int(MEMCACHED_MAXIMUM_RETURN); ++x)
+  {
+    const char *key= memcached_strerror(NULL, memcached_return_t(x));
+    memcached_return_t rc;
+    uint32_t flags;
+    size_t value_length;
+    char *value= memcached_get(memc_clone, key, strlen(key), &value_length, &flags, &rc);
+    test_true(rc == MEMCACHED_SUCCESS);
+    test_compare(strlen(key), value_length);
+    test_strcmp(key, value);
+    free(value);
+  }
+  memcached_free(memc_clone);
+  return TEST_SUCCESS;
+}
index d7eba14aac24fcff8623d83f5889c833ec4a005e..980be82880e46715e118f8a2560acbd91d5f9318 100644 (file)
@@ -56,6 +56,9 @@ test_return_t replication_delete_test(memcached_st *memc);
 LIBTEST_INTERNAL_API
 test_return_t replication_randomize_mget_test(memcached_st *memc);
 
+LIBTEST_INTERNAL_API
+test_return_t replication_randomize_mget_fail_test(memcached_st *memc);
+
 #ifdef __cplusplus
 }
 #endif