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"
43 #ifdef HAVE_SYS_TIME_H
44 # include <sys/time.h>
48 #include <sys/types.h>
54 #ifdef HAVE_SYS_SOCKET_H
55 # include <sys/socket.h>
67 # include "libmemcached/windows.hpp"
70 #include "libmemcached-1.0/memcached.h"
71 #include "libmemcached/watchpoint.h"
72 #include "libmemcached/is.h"
73 typedef struct memcached_st Memcached
;
78 # include "libmemcached/poll.h"
82 memcached_instance_st
*memcached_instance_fetch(memcached_st
*ptr
, uint32_t server_key
);
85 /* These are private not to be installed headers */
86 #include "libmemcached/error.hpp"
87 #include "libmemcached/memory.h"
88 #include "libmemcached/io.h"
90 # include "libmemcached/string.hpp"
91 # include "libmemcachedprotocol-0.0/binary.h"
92 # include "libmemcached/io.hpp"
93 # include "libmemcached/udp.hpp"
94 # include "libmemcached/do.hpp"
95 # include "libmemcached/socket.hpp"
96 # include "libmemcached/connect.hpp"
97 # include "libmemcached/allocators.hpp"
98 # include "libmemcached/hash.hpp"
99 # include "libmemcached/quit.hpp"
100 # include "libmemcached/instance.hpp"
101 # include "libmemcached/server_instance.h"
102 # include "libmemcached/server.hpp"
103 # include "libmemcached/flag.hpp"
104 # include "libmemcached/behavior.hpp"
105 # include "libmemcached/sasl.hpp"
106 # include "libmemcached/server_list.hpp"
109 #include "libmemcached/internal.h"
110 #include "libmemcached/array.h"
111 #include "libmemcached/libmemcached_probes.h"
112 #include "libmemcached/byteorder.h"
113 #include "libmemcached/initialize_query.h"
116 # include "libmemcached/response.h"
117 # include "libmemcached/namespace.h"
119 # include "libmemcached/virtual_bucket.h"
123 # include "libmemcached/backtrace.hpp"
124 # include "libmemcached/assert.hpp"
125 # include "libmemcached/server.hpp"
126 # include "libmemcached/key.hpp"
127 # include "libmemcached/result.h"
128 # include "libmemcached/version.hpp"
131 #include "libmemcached/continuum.hpp"
133 #if !defined(__GNUC__) || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
135 # define likely(x) if ((x))
136 # define unlikely(x) if ((x))
140 # define likely(x) if (__builtin_expect((x) != 0, 1))
141 # define unlikely(x) if (__builtin_expect((x) != 0, 0))
144 #define MEMCACHED_BLOCK_SIZE 1024
145 #define MEMCACHED_DEFAULT_COMMAND_SIZE 350
146 #define SMALL_STRING_LEN 1024
147 #define HUGE_STRING_LEN 8196
153 memcached_return_t
run_distribution(memcached_st
*ptr
);
156 static inline void memcached_server_response_increment(memcached_instance_st
*instance
) {
157 instance
->events(POLLIN
);
158 instance
->cursor_active_
++;
162 #define memcached_server_response_decrement(A) (A)->cursor_active_--
163 #define memcached_server_response_reset(A) (A)->cursor_active_ = 0
165 #define memcached_instance_response_increment(A) (A)->cursor_active_++
166 #define memcached_instance_response_decrement(A) (A)->cursor_active_--
167 #define memcached_instance_response_reset(A) (A)->cursor_active_ = 0
174 bool memcached_purge(memcached_instance_st
*);
175 memcached_instance_st
*memcached_instance_by_position(const memcached_st
*ptr
, uint32_t server_key
);