4 This closes all connections (forces flush of input as well).
6 Maybe add a host specific, or key specific version?
8 The reason we send "quit" is that in case we have buffered IO, this
9 will force data to be completed.
12 void memcached_quit_server(memcached_server_st
*ptr
, uint8_t io_death
)
19 rc
= memcached_do(ptr
, "quit\r\n", 6, 1);
20 WATCHPOINT_ASSERT(rc
== MEMCACHED_SUCCESS
|| rc
== MEMCACHED_FETCH_NOTFINISHED
);
22 memcached_io_close(ptr
);
26 ptr
->write_buffer_offset
= 0;
27 ptr
->read_buffer_length
= 0;
28 ptr
->read_ptr
= ptr
->read_buffer
;
29 memcached_server_response_reset(ptr
);
33 void memcached_quit(memcached_st
*ptr
)
37 if (ptr
->hosts
== NULL
||
38 ptr
->number_of_hosts
== 0)
41 if (ptr
->hosts
&& ptr
->number_of_hosts
)
43 for (x
= 0; x
< ptr
->number_of_hosts
; x
++)
44 memcached_quit_server(&ptr
->hosts
[x
], 0);