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"
45 #ifdef HAVE_SYS_TIME_H
46 # include <sys/time.h>
50 #include <sys/types.h>
56 #ifdef HAVE_SYS_SOCKET_H
57 # include <sys/socket.h>
68 #include "libmemcached-1.0/memcached.h"
69 #include "libmemcached/watchpoint.h"
70 #include "libmemcached/is.h"
71 typedef struct memcached_st Memcached
;
74 memcached_instance_st
*memcached_instance_fetch(memcached_st
*ptr
, uint32_t server_key
);
77 /* These are private not to be installed headers */
78 #include "libmemcached/error.hpp"
79 #include "libmemcached/memory.h"
80 #include "libmemcached/io.h"
82 # include "libmemcached/string.hpp"
83 # include "libmemcachedprotocol-0.0/binary.h"
84 # include "libmemcached/io.hpp"
85 # include "libmemcached/udp.hpp"
86 # include "libmemcached/do.hpp"
87 # include "libmemcached/connect.hpp"
88 # include "libmemcached/allocators.hpp"
89 # include "libmemcached/hash.hpp"
90 # include "libmemcached/quit.hpp"
91 # include "libmemcached/instance.hpp"
92 # include "libmemcached/server_instance.h"
93 # include "libmemcached/server.hpp"
94 # include "libmemcached/flag.hpp"
95 # include "libmemcached/behavior.hpp"
96 # include "libmemcached/sasl.hpp"
97 # include "libmemcached/server_list.hpp"
100 #include "libmemcached/internal.h"
101 #include "libmemcached/array.h"
102 #include "libmemcached/libmemcached_probes.h"
103 #include "libmemcached/byteorder.h"
104 #include "libmemcached/initialize_query.h"
107 # include "libmemcached/response.h"
108 # include "libmemcached/namespace.h"
110 # include "libmemcached/virtual_bucket.h"
114 # include "libmemcached/backtrace.hpp"
115 # include "libmemcached/assert.hpp"
116 # include "libmemcached/server.hpp"
117 # include "libmemcached/key.hpp"
118 # include "libmemcached/result.h"
119 # include "libmemcached/version.hpp"
122 #include "libmemcached/continuum.hpp"
124 #if !defined(__GNUC__) || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
126 # define likely(x) if ((x))
127 # define unlikely(x) if ((x))
131 # define likely(x) if (__builtin_expect((x) != 0, 1))
132 # define unlikely(x) if (__builtin_expect((x) != 0, 0))
135 #define MEMCACHED_BLOCK_SIZE 1024
136 #define MEMCACHED_DEFAULT_COMMAND_SIZE 350
137 #define SMALL_STRING_LEN 1024
138 #define HUGE_STRING_LEN 8196
144 memcached_return_t
run_distribution(memcached_st
*ptr
);
147 # include "p9y/poll.hpp"
148 static inline void memcached_server_response_increment(memcached_instance_st
*instance
) {
149 instance
->events(POLLIN
);
150 instance
->cursor_active_
++;
154 #define memcached_server_response_decrement(A) (A)->cursor_active_--
155 #define memcached_server_response_reset(A) (A)->cursor_active_ = 0
157 #define memcached_instance_response_increment(A) (A)->cursor_active_++
158 #define memcached_instance_response_decrement(A) (A)->cursor_active_--
159 #define memcached_instance_response_reset(A) (A)->cursor_active_ = 0
166 bool memcached_purge(memcached_instance_st
*);
167 memcached_instance_st
*memcached_instance_by_position(const memcached_st
*ptr
, uint32_t server_key
);