25#ifndef MYSQLROUTER_HTTP_COMMON_INCLUDED
26#define MYSQLROUTER_HTTP_COMMON_INCLUDED
36#include <event2/util.h>
44#include <system_error>
67 static bool initialize_threads();
72 static bool has_ssl();
91using Bitset = std::bitset<Pos::_LAST + 1>;
147 bool loop_exit(
const struct timeval *tv);
163 EventBase(std::unique_ptr<impl> &&pImpl);
182using Bitset = std::bitset<Pos::_LAST + 1>;
202 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:38
Main event registration and dispatch engine
Definition: http_common.h:114
EventBaseSocket SocketHandle
Definition: http_common.h:116
void(*)(SocketHandle, short, void *) CallbackEvent
Definition: http_common.h:117
std::unique_ptr< impl > pImpl_
Definition: http_common.h:165
Enables bufforing of I/O for a socket.
Definition: http_common.h:199
SslState
Definition: http_common.h:202
EventBaseSocket SocketHandle
Definition: http_common.h:203
std::unique_ptr< impl > pImpl_
Definition: http_common.h:220
Http server build on top of EventBase.
Definition: http_request.h:524
libevent global state management
Definition: http_common.h:59
static CallbackLog cbLog_
Definition: http_common.h:74
DebugLogLevel
Definition: http_common.h:62
void(*)(const Log log, const char *message) CallbackLog
Definition: http_common.h:63
wraps SSL_CTX.
Definition: tls_context.h:84
Class representing a warning.
Definition: warning.h:40
evutil_socket_t EventBaseSocket
Definition: http_common.h:98
const int kEventBaseInvalidSocket
Definition: http_common.h:106
#define HTTP_COMMON_EXPORT
Definition: http_common_export.h:39
Header for compiler-dependent features.
#define MY_COMPILER_MSVC_DIAGNOSTIC_IGNORE(X)
Definition: my_compiler.h:254
#define MY_COMPILER_DIAGNOSTIC_PUSH()
save the compiler's diagnostic (enabled warnings, errors, ...) state
Definition: my_compiler.h:284
#define MY_COMPILER_DIAGNOSTIC_POP()
restore the compiler's diagnostic (enabled warnings, errors, ...) state
Definition: my_compiler.h:285
Common #defines and includes for file and socket I/O.
#define INVALID_SOCKET
Definition: my_io.h:189
constexpr pos_type CloseOnFree
Definition: http_common.h:175
constexpr pos_type DeferCallbacks
Definition: http_common.h:177
constexpr pos_type _LAST
Definition: http_common.h:180
constexpr pos_type UnlockCallbacks
Definition: http_common.h:178
constexpr pos_type ThreadSafe
Definition: http_common.h:176
Flags that represents different bufferevent options.
Definition: http_common.h:171
std::bitset< Pos::_LAST+1 > Bitset
Definition: http_common.h:182
int type
Definition: http_common.h:172
unsigned pos_type
Definition: http_common.h:173
constexpr type UnlockCallbacks
Definition: http_common.h:187
constexpr type DeferCallbacks
Definition: http_common.h:186
constexpr type ThreadSafe
Definition: http_common.h:185
constexpr type CloseOnFree
Definition: http_common.h:184
constexpr pos_type Write
Definition: http_common.h:86
constexpr pos_type Timeout
Definition: http_common.h:84
constexpr pos_type Read
Definition: http_common.h:85
constexpr pos_type Signal
Definition: http_common.h:87
constexpr pos_type _LAST
Definition: http_common.h:89
Flags that represents which I/O events should be monitored.
Definition: http_common.h:80
constexpr type Signal
Definition: http_common.h:96
std::bitset< Pos::_LAST+1 > Bitset
Definition: http_common.h:91
constexpr type Write
Definition: http_common.h:95
unsigned pos_type
Definition: http_common.h:82
constexpr type Timeout
Definition: http_common.h:93
constexpr type Read
Definition: http_common.h:94
int type
Definition: http_common.h:81
Message
Definition: histogram.h:82
Definition: authentication.cc:35
MYSQL_STRINGS_EXPORT void shutdown()
Shutdown character set/collation library.
Definition: collations.cc:104
stdx::expected< native_handle_type, error_type > socket(int family, int sock_type, int protocol)
Definition: socket.h:62
auto dispatch(CompletionToken &&token)
Definition: executor.h:717
Definition: options.cc:56
MY_COMPILER_CLANG_DIAGNOSTIC_IGNORE("-Winconsistent-missing-destructor-override") extern "C"
Definition: protobuf_plugin.cc:31
required string event
Definition: replication_group_member_actions.proto:31