c36384b2aafc170654a8e3a19d90577c7bdeccfb
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"
41 #include "p9y/socket.hpp"
43 #ifdef HAVE_SYS_TIME_H
44 # include <sys/time.h>
57 #include "libmemcached-1.0/memcached.h"
58 #include "libmemcached/watchpoint.h"
59 #include "libmemcached/is.h"
60 typedef struct memcached_st Memcached
;
63 memcached_instance_st
*memcached_instance_fetch(memcached_st
*ptr
, uint32_t server_key
);
66 /* These are private not to be installed headers */
67 #include "libmemcached/error.hpp"
68 #include "libmemcached/memory.h"
69 #include "libmemcached/io.h"
71 # include "libmemcached/string.hpp"
72 # include "libmemcachedprotocol-0.0/binary.h"
73 # include "libmemcached/io.hpp"
74 # include "libmemcached/udp.hpp"
75 # include "libmemcached/do.hpp"
76 # include "libmemcached/connect.hpp"
77 # include "libmemcached/allocators.hpp"
78 # include "libmemcached/hash.hpp"
79 # include "libmemcached/quit.hpp"
80 # include "libmemcached/instance.hpp"
81 # include "libmemcached/server_instance.h"
82 # include "libmemcached/server.hpp"
83 # include "libmemcached/flag.hpp"
84 # include "libmemcached/behavior.hpp"
85 # include "libmemcached/sasl.hpp"
86 # include "libmemcached/server_list.hpp"
89 #include "libmemcached/internal.h"
90 #include "libmemcached/array.h"
91 #include "libmemcached/libmemcached_probes.h"
92 #include "libmemcached/byteorder.h"
93 #include "libmemcached/initialize_query.h"
96 # include "libmemcached/response.h"
97 # include "libmemcached/namespace.h"
99 # include "libmemcached/virtual_bucket.h"
103 # include "libmemcached/backtrace.hpp"
104 # include "libmemcached/assert.hpp"
105 # include "libmemcached/server.hpp"
106 # include "libmemcached/key.hpp"
107 # include "libmemcached/result.h"
108 # include "libmemcached/version.hpp"
111 #include "libmemcached/continuum.hpp"
113 #if !defined(__GNUC__) || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
115 # define likely(x) if ((x))
116 # define unlikely(x) if ((x))
120 # define likely(x) if (__builtin_expect((x) != 0, 1))
121 # define unlikely(x) if (__builtin_expect((x) != 0, 0))
124 #define MEMCACHED_BLOCK_SIZE 1024
125 #define MEMCACHED_DEFAULT_COMMAND_SIZE 350
126 #define SMALL_STRING_LEN 1024
127 #define HUGE_STRING_LEN 8196
133 memcached_return_t
run_distribution(memcached_st
*ptr
);
136 # include "p9y/poll.hpp"
137 static inline void memcached_server_response_increment(memcached_instance_st
*instance
) {
138 instance
->events(POLLIN
);
139 instance
->cursor_active_
++;
143 #define memcached_server_response_decrement(A) (A)->cursor_active_--
144 #define memcached_server_response_reset(A) (A)->cursor_active_ = 0
146 #define memcached_instance_response_increment(A) (A)->cursor_active_++
147 #define memcached_instance_response_decrement(A) (A)->cursor_active_--
148 #define memcached_instance_response_reset(A) (A)->cursor_active_ = 0
155 bool memcached_purge(memcached_instance_st
*);
156 memcached_instance_st
*memcached_instance_by_position(const memcached_st
*ptr
, uint32_t server_key
);