3 memcached_server_list_free, memcached_server_list_append,
4 memcached_server_list_count, memcached_servers_parse - Manage server list
8 C Client Library for memcached (libmemcached, -lmemcached)
12 #include <memcached.h>
14 const memcached_server_instance_st
15 memcached_server_list (memcached_st *ptr);
17 void memcached_server_list_free (memcached_server_list_st list);
19 memcached_server_list_st
20 memcached_server_list_append (memcached_server_list_st list,
23 memcached_return_t *error);
25 uint32_t memcached_server_list_count (memcached_server_list_st list);
27 memcached_server_list_st memcached_servers_parse (const char *server_strings);
29 const char *memcached_server_error (memcached_server_instance_st instance);
32 void memcached_server_error_reset (memcached_server_instance_st list);
36 libmemcached(3) operates on a list of hosts which are stored in
37 memcached_server_st structures. You should not modify these structures
38 directly. Functions are provided to modify these structures (and more can be
41 memcached_server_list() is used to provide an array of all defined hosts.
42 This was incorrectly documented as "requiring free()" up till version 0.39.
44 memcached_server_list_free() deallocates all memory associated with the array
45 of memcached_server_st that you passed to it.
47 memcached_server_list_append() adds a server to the end of a
48 memcached_server_st array. On error null will be returned and the
49 memcached_return_t pointer you passed into the function will be set with the
50 appropriate error. If the value of port is zero, it is set to the default
51 port of a memcached server.
53 memcached_servers_parse() takes a string, the type that is used for the
54 command line applications, and parse it to an array of memcached_server_st.
55 The example is "localhost, foo:555, foo, bar". All hosts except foo:555 will
56 be set to the default port, while that host will have a port of 555.
58 memcached_server_error() can be used to look at the text of the last error
59 message sent by the server to to the client.
61 Before version 0.39 theses functions used a memcache_server_st *. In 0.39
62 memcached_server_st * was aliased to memcached_server_list_st. This was
63 done for a style reason/to help clean up some concepts in the code.
68 Varies, see particular functions.
72 To find out more information please check:
73 L<https://launchpad.net/libmemcached>
77 Brian Aker, E<lt>brian@tangent.orgE<gt>
81 memcached(1) libmemcached(3) memcached_strerror(3)