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