docs: flush libmemcached progress
[awesomized/libmemcached] / docs / source / libmemcached / memcached_quit.rst
1 Disconnecting a client from a server
2 ====================================
3
4 .. index:: object: memcached_st
5
6 SYNOPSIS
7 --------
8
9 #include <libmemcached/memcached.h>
10 Compile and link with -lmemcached
11
12 .. function:: void memcached_quit (memcached_st *ptr)
13
14 :param ptr: pointer to initialized `memcached_st` struct
15
16 DESCRIPTION
17 -----------
18
19 :func:`memcached_quit` will disconnect you from all currently connected
20 servers. It will also reset the state of the connection (i.e., any
21 :func:`memcached_fetch` you are in the middle of will be terminated). This
22 function is called automatically when you call :func:`memcached_free` on the
23 :type:`memcached_st` structure.
24
25 You do not need to call this on your own. All operations to change server
26 hashes and parameters will handle connections to the server for you. This
27 function is provided mainly so that you can timeout your connections or
28 reset connections during the middle of a :func:`memcached_fetch`.
29
30 RETURN VALUE
31 ------------
32
33 A value of type :type:`memcached_return_t` is returned On success that value
34 will be `MEMCACHED_SUCCESS`. Use :func:`memcached_strerror` to
35 translate this value to a printable string.
36
37 SEE ALSO
38 --------
39
40 .. only:: man
41
42 :manpage:`memcached(1)`
43 :manpage:`libmemcached(3)`
44 :manpage:`memcached_strerror(3)`
45
46 .. only:: html
47
48 * :manpage:`memcached(1)`
49 * :doc:`../libmemcached`
50 * :doc:`memcached_strerror`