1..::docs::memcached_servers(3)   libmemcached   ..::docs::memcached_servers(3)
2
3
4

NAME

6       memcached_server_count, memcached_server_list, memcached_server_add,
7       memcached_server_push - Manage server list
8

LIBRARY

10       C Client Library for memcached (libmemcached, -lmemcached)
11

SYNOPSIS

13         #include <memcached.h>
14
15         unsigned int memcached_server_count (memcached_st *ptr);
16
17         memcached_server_st *
18           memcached_server_list (memcached_st *ptr);
19
20         memcached_return
21           memcached_server_add (memcached_st *ptr,
22                                 const char *hostname,
23                                 unsigned int port);
24
25         memcached_return
26           memcached_server_add_udp (memcached_st *ptr,
27                                 const char *hostname,
28                                 unsigned int port);
29
30         memcached_return
31           memcached_server_add_unix_socket (memcached_st *ptr,
32                                             const char *socket);
33
34         memcached_return
35           memcached_server_push (memcached_st *ptr,
36                                  memcached_server_st *list);
37
38         memcached_server_st *
39           memcached_server_by_key (memcached_st *ptr,
40                                    const char *key, size_t key_length,
41                                    memcached_return *error);
42

DESCRIPTION

44       libmemcached(3) performs operations on a list of hosts. The order of
45       these hosts determine routing to keys. Functions are provided to add
46       keys to memcached_st structures. To manipulate lists of servers see
47       memcached_server_st(3).
48
49       memcached_server_count() provides you a count of the current number of
50       servers being used by a "memcached_st" structure.
51
52       memcached_server_list() is used to provide an array of all defined
53       hosts.  You are responsible for freeing this list (aka it is not a
54       pointer to the currently used structure).
55
56       memcached_server_add() pushes a single TCP server into the
57       "memcached_st" structure. This server will be placed at the end.
58       Duplicate servers are allowed, so duplication is not checked. Executing
59       this function with the "MEMCACHED_BEHAVIOR_USE_UDP" behavior set will
60       result in a "MEMCACHED_INVALID_HOST_PROTOCOL".
61
62       memcached_server_add_udp() pushes a single UDP server into the
63       "memcached_st" structure. This server will be placed at the end.
64       Duplicate servers are allowed, so duplication is not checked. Executing
65       this function with out setting the "MEMCACHED_BEHAVIOR_USE_UDP"
66       behavior will result in a "MEMCACHED_INVALID_HOST_PROTOCOL".
67
68       memcached_server_add_unix_socket() pushes a single UNIX socket into the
69       "memcached_st" structure. This UNIX socket will be placed at the end.
70       Duplicate servers are allowed, so duplication is not checked. The
71       length of the filename must be one character less then
72       MEMCACHED_MAX_HOST_LENGTH.
73
74       memcached_server_push() pushes an array of "memcached_server_st" into
75       the "memcached_st" structure. These servers will be placed at the end.
76       Duplicate servers are allowed, so duplication is not checked. A copy is
77       made of structure so the list provided (and any operations on the list)
78       are not saved.
79
80       memcached_server_by_key() allows you to provide a key and retrieve the
81       server which would be used for assignment. This structure is cloned
82       from its original structure and must be freed. If NULL is returned you
83       should consult *error. The returning structure should be freed with
84       memcached_server_free().
85

RETURN

87       Varies, see particular functions.
88

HOME

90       To find out more information please check:
91       <http://tangent.org/552/libmemcached.html>
92

AUTHOR

94       Brian Aker, <brian@tangent.org>
95

SEE ALSO

97       memcached(1) libmemcached(3) memcached_strerror(3)
98
99
100
101                                  2009-05-20    ..::docs::memcached_servers(3)
Impressum