26#ifndef MYSQLROUTER_HTTP_COMMON_INCLUDED
27#define MYSQLROUTER_HTTP_COMMON_INCLUDED
37#include <event2/util.h>
45#include <system_error>
68 static bool initialize_threads();
73 static bool has_ssl();
92using Bitset = std::bitset<Pos::_LAST + 1>;
148 bool loop_exit(
const struct timeval *tv);
164 EventBase(std::unique_ptr<impl> &&pImpl);
183using Bitset = std::bitset<Pos::_LAST + 1>;
203 enum class SslState { Open = 0, Connecting = 1, Accepting = 2 };
A simple bitset wrapper class, whose size can be specified after the object has been defined.
Definition: ut0bitset.h:39
Main event registration and dispatch engine
Definition: http_common.h:115
EventBaseSocket SocketHandle
Definition: http_common.h:117
void(*)(SocketHandle, short, void *) CallbackEvent
Definition: http_common.h:118
std::unique_ptr< impl > pImpl_
Definition: http_common.h:166
Enables bufforing of I/O for a socket.
Definition: http_common.h:200
SslState
Definition: http_common.h:203
EventBaseSocket SocketHandle
Definition: http_common.h:204
std::unique_ptr< impl > pImpl_
Definition: http_common.h:221
Http server build on top of EventBase.
Definition: http_request.h:525
libevent global state management
Definition: http_common.h:60
static CallbackLog cbLog_
Definition: http_common.h:75
DebugLogLevel
Definition: http_common.h:63
void(*)(const Log log, const char *message) CallbackLog
Definition: http_common.h:64
wraps SSL_CTX.
Definition: tls_context.h:85
Class representing a warning.
Definition: warning.h:41
evutil_socket_t EventBaseSocket
Definition: http_common.h:99
const int kEventBaseInvalidSocket
Definition: http_common.h:107
#define HTTP_COMMON_EXPORT
Definition: http_common_export.h:40
Header for compiler-dependent features.
#define MY_COMPILER_MSVC_DIAGNOSTIC_IGNORE(X)
Definition: my_compiler.h:266
#define MY_COMPILER_DIAGNOSTIC_PUSH()
save the compiler's diagnostic (enabled warnings, errors, ...) state
Definition: my_compiler.h:296
#define MY_COMPILER_DIAGNOSTIC_POP()
restore the compiler's diagnostic (enabled warnings, errors, ...) state
Definition: my_compiler.h:297
Common #defines and includes for file and socket I/O.
#define INVALID_SOCKET
Definition: my_io.h:190
constexpr pos_type CloseOnFree
Definition: http_common.h:176
constexpr pos_type DeferCallbacks
Definition: http_common.h:178
constexpr pos_type _LAST
Definition: http_common.h:181
constexpr pos_type UnlockCallbacks
Definition: http_common.h:179
constexpr pos_type ThreadSafe
Definition: http_common.h:177
Flags that represents different bufferevent options.
Definition: http_common.h:172
std::bitset< Pos::_LAST+1 > Bitset
Definition: http_common.h:183
int type
Definition: http_common.h:173
unsigned pos_type
Definition: http_common.h:174
constexpr type UnlockCallbacks
Definition: http_common.h:188
constexpr type DeferCallbacks
Definition: http_common.h:187
constexpr type ThreadSafe
Definition: http_common.h:186
constexpr type CloseOnFree
Definition: http_common.h:185
constexpr pos_type Write
Definition: http_common.h:87
constexpr pos_type Timeout
Definition: http_common.h:85
constexpr pos_type Read
Definition: http_common.h:86
constexpr pos_type Signal
Definition: http_common.h:88
constexpr pos_type _LAST
Definition: http_common.h:90
Flags that represents which I/O events should be monitored.
Definition: http_common.h:81
constexpr type Signal
Definition: http_common.h:97
std::bitset< Pos::_LAST+1 > Bitset
Definition: http_common.h:92
constexpr type Write
Definition: http_common.h:96
unsigned pos_type
Definition: http_common.h:83
constexpr type Timeout
Definition: http_common.h:94
constexpr type Read
Definition: http_common.h:95
int type
Definition: http_common.h:82
Message
Definition: histogram.h:83
Definition: authentication.cc:36
stdx::expected< native_handle_type, error_type > socket(int family, int sock_type, int protocol)
Definition: socket.h:63
stdx::expected< void, error_type > shutdown(native_handle_type fd, int how)
Definition: socket.h:663
auto dispatch(CompletionToken &&token)
Definition: executor.h:718
Definition: options.cc:49
MY_COMPILER_CLANG_DIAGNOSTIC_IGNORE("-Winconsistent-missing-destructor-override") extern "C"
Definition: protobuf_plugin.cc:32
required string event
Definition: replication_group_member_actions.proto:32