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