40c41b70f734a10e4b2e7a996230ad50288c3e08
[awesomized/libmemcached] / docs / source / libmemcached / memcached_version.rst
1 =======================================================
2 Getting version information about the client and server
3 =======================================================
4
5 --------
6 SYNOPSIS
7 --------
8
9 #include <libmemcached/memcached.h>
10
11 .. function:: const char * memcached_lib_version (void)
12
13 .. function:: memcached_return_t memcached_version (memcached_st *ptr)
14
15 Compile and link with -lmemcached
16
17 -----------
18 DESCRIPTION
19 -----------
20
21 :func:`memcached_lib_version` is used to return a simple version string representing the libmemcached version (client library version, not server version)
22
23 :func:`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.
24
25 ------
26 RETURN
27 ------
28
29 :func:`memcached_lib_version` returns a string with the version of the libmemcached driver.
30
31 A value of :type:`memcached_return_t` is returned from :func:'memcached_version'
32
33 On success that value will be `MEMCACHED_SUCCESS`.
34
35 If called with the `MEMCACHED_BEHAVIOR_USE_UDP` behavior set, the value
36 `MEMCACHED_NOT_SUPPORTED` will be returned.
37
38 Use :func:`memcached_strerror` to translate this value to
39 a printable string.
40
41 --------
42 SEE ALSO
43 --------
44
45 .. only:: man
46
47 :manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)`
48