docs: ws
[awesomized/libmemcached] / docs / source / libmemcached / memcached_quit.rst
1 ====================================
2 Disconnecting a client from a server
3 ====================================
4
5 .. index:: object: memcached_st
6
7 --------
8 SYNOPSIS
9 --------
10
11 #include <libmemcached/memcached.h>
12
13 .. function:: void memcached_quit (memcached_st *ptr)
14
15 Compile and link with -lmemcached
16
17 -----------
18 DESCRIPTION
19 -----------
20
21 :func:`memcached_quit` will disconnect you from all currently connected
22 servers. It will also reset the state of the connection (ie, any :func:`memcached_fetch` you are in the middle of will be terminated). This function is
23 called automatically when you call :func:`memcached_free` on the :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 ------
31 RETURN
32 ------
33
34 A value of type :type:`memcached_return_t` is returned On success that value
35 will be `MEMCACHED_SUCCESS`. Use :func:`memcached_strerror` to
36 translate this value to a printable string.
37
38 --------
39 SEE ALSO
40 --------
41
42 .. only:: man
43
44 :manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)`