2 +--------------------------------------------------------------------+
3 | libmemcached - C/C++ Client Library for memcached |
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted under the terms of the BSD license. |
7 | You should have received a copy of the license in a bundled file |
8 | named LICENSE; in case you did not receive a copy you can review |
9 | the terms online at: https://opensource.org/licenses/BSD-3-Clause |
10 +--------------------------------------------------------------------+
11 | Copyright (c) 2006-2014 Brian Aker https://datadifferential.com/ |
12 | Copyright (c) 2020 Michael Wallner <mike@php.net> |
13 +--------------------------------------------------------------------+
18 #include "mem_config.h"
55 #ifdef HAVE_SYS_TIME_H
56 # include <sys/time.h>
63 #ifdef HAVE_SYS_TYPES_H
64 # include <sys/types.h>
71 #ifdef HAVE_SYS_SOCKET_H
72 # include <sys/socket.h>
84 # include "libmemcached/windows.hpp"
87 #include "libmemcached-1.0/memcached.h"
88 #include "libmemcached/watchpoint.h"
89 #include "libmemcached/is.h"
90 typedef struct memcached_st Memcached
;
95 # include "libmemcached/poll.h"
99 memcached_instance_st
*memcached_instance_fetch(memcached_st
*ptr
, uint32_t server_key
);
102 /* These are private not to be installed headers */
103 #include "libmemcached/error.hpp"
104 #include "libmemcached/memory.h"
105 #include "libmemcached/io.h"
107 # include "libmemcached/string.hpp"
108 # include "libmemcachedprotocol-0.0/binary.h"
109 # include "libmemcached/io.hpp"
110 # include "libmemcached/udp.hpp"
111 # include "libmemcached/do.hpp"
112 # include "libmemcached/socket.hpp"
113 # include "libmemcached/connect.hpp"
114 # include "libmemcached/allocators.hpp"
115 # include "libmemcached/hash.hpp"
116 # include "libmemcached/quit.hpp"
117 # include "libmemcached/instance.hpp"
118 # include "libmemcached/server_instance.h"
119 # include "libmemcached/server.hpp"
120 # include "libmemcached/flag.hpp"
121 # include "libmemcached/behavior.hpp"
122 # include "libmemcached/sasl.hpp"
123 # include "libmemcached/server_list.hpp"
126 #include "libmemcached/internal.h"
127 #include "libmemcached/array.h"
128 #include "libmemcached/libmemcached_probes.h"
129 #include "libmemcached/byteorder.h"
130 #include "libmemcached/initialize_query.h"
133 # include "libmemcached/response.h"
134 # include "libmemcached/namespace.h"
136 # include "libmemcached/virtual_bucket.h"
140 # include "libmemcached/backtrace.hpp"
141 # include "libmemcached/assert.hpp"
142 # include "libmemcached/server.hpp"
143 # include "libmemcached/key.hpp"
144 # include "libmemcached/result.h"
145 # include "libmemcached/version.hpp"
148 #include "libmemcached/continuum.hpp"
150 #if !defined(__GNUC__) || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
152 # define likely(x) if ((x))
153 # define unlikely(x) if ((x))
157 # define likely(x) if (__builtin_expect((x) != 0, 1))
158 # define unlikely(x) if (__builtin_expect((x) != 0, 0))
161 #define MEMCACHED_BLOCK_SIZE 1024
162 #define MEMCACHED_DEFAULT_COMMAND_SIZE 350
163 #define SMALL_STRING_LEN 1024
164 #define HUGE_STRING_LEN 8196
170 memcached_return_t
run_distribution(memcached_st
*ptr
);
173 static inline void memcached_server_response_increment(memcached_instance_st
*instance
) {
174 instance
->events(POLLIN
);
175 instance
->cursor_active_
++;
179 #define memcached_server_response_decrement(A) (A)->cursor_active_--
180 #define memcached_server_response_reset(A) (A)->cursor_active_ = 0
182 #define memcached_instance_response_increment(A) (A)->cursor_active_++
183 #define memcached_instance_response_decrement(A) (A)->cursor_active_--
184 #define memcached_instance_response_reset(A) (A)->cursor_active_ = 0
191 bool memcached_purge(memcached_instance_st
*);
192 memcached_instance_st
*memcached_instance_by_position(const memcached_st
*ptr
, uint32_t server_key
);