26#ifndef MYSQL_HARNESS_NET_TS_IMPL_SOCKET_SERVICE_H_
27#define MYSQL_HARNESS_NET_TS_IMPL_SOCKET_SERVICE_H_
41 int family,
int sock_type,
int protocol)
const override {
46 socketpair(
int family,
int sock_type,
int protocol)
const override {
57 void *data)
const override {
72 int backlog)
const override {
77 int level,
int optname,
79 socklen_t optlen)
const override {
85 socklen_t *optlen)
const override {
103 size_t addr_len)
const override {
109 size_t addr_len)
const override {
115 socklen_t *addr_len)
const override {
123 socklen_t *addr_len,
int flags = 0)
const override {
129 size_t *addr_len)
const override {
135 size_t *addr_len)
const override {
143 int flags)
const override {
144 return socket::splice(fd_in, fd_out, len,
flags);
150 int flags)
const override {
156 int flags)
const override {
166 int how)
const override {
173 const addrinfo *hints)
const override {
Definition: socket_service_base.h:48
Definition: socket_service.h:38
stdx::expected< void, error_type > getsockopt(native_handle_type native_handle, int level, int optname, void *optval, socklen_t *optlen) const override
Definition: socket_service.h:83
stdx::expected< void, error_type > connect(native_handle_type native_handle, const struct sockaddr *addr, size_t addr_len) const override
Definition: socket_service.h:107
stdx::expected< native_handle_type, error_type > socket(int family, int sock_type, int protocol) const override
Definition: socket_service.h:40
stdx::expected< void, error_type > listen(native_handle_type native_handle, int backlog) const override
Definition: socket_service.h:71
stdx::expected< void, error_type > wait(native_handle_type fd, wait_type wt) const override
Definition: socket_service.h:160
stdx::expected< void, error_type > bind(native_handle_type native_handle, const struct sockaddr *addr, size_t addr_len) const override
Definition: socket_service.h:101
stdx::expected< void, error_type > shutdown(native_handle_type fd, int how) const override
Definition: socket_service.h:165
stdx::expected< void, error_type > setsockopt(native_handle_type native_handle, int level, int optname, const void *optval, socklen_t optlen) const override
Definition: socket_service.h:76
stdx::expected< size_t, error_type > sendmsg(native_handle_type native_handle, msghdr_base &msg, message_flags flags) const override
Definition: socket_service.h:95
stdx::expected< size_t, error_type > recvmsg(native_handle_type native_handle, msghdr_base &msg, message_flags flags) const override
Definition: socket_service.h:89
stdx::expected< void, std::error_code > close(native_handle_type native_handle) const override
Definition: socket_service.h:50
stdx::expected< void, error_type > getpeername(native_handle_type native_handle, struct sockaddr *addr, size_t *addr_len) const override
Definition: socket_service.h:133
stdx::expected< native_handle_type, error_type > accept(native_handle_type native_handle, struct sockaddr *addr, socklen_t *addr_len) const override
Definition: socket_service.h:113
stdx::expected< void, error_type > getsockname(native_handle_type native_handle, struct sockaddr *addr, size_t *addr_len) const override
Definition: socket_service.h:127
stdx::expected< std::unique_ptr< struct addrinfo, void(*)(struct addrinfo *)>, std::error_code > getaddrinfo(const char *node, const char *service, const addrinfo *hints) const override
Definition: socket_service.h:172
stdx::expected< bool, error_type > native_non_blocking(native_handle_type native_handle) const override
Definition: socket_service.h:61
stdx::expected< native_handle_type, error_type > accept4(native_handle_type native_handle, struct sockaddr *addr, socklen_t *addr_len, int flags=0) const override
Definition: socket_service.h:121
stdx::expected< size_t, error_type > splice_from_pipe(impl::file::file_handle_type fd_in, native_handle_type fd_out, size_t len, int flags) const override
Definition: socket_service.h:154
stdx::expected< void, error_type > native_non_blocking(native_handle_type native_handle, bool on) const override
Definition: socket_service.h:66
stdx::expected< void, error_type > ioctl(native_handle_type native_handle, unsigned long cmd, void *data) const override
Definition: socket_service.h:55
stdx::expected< std::pair< native_handle_type, native_handle_type >, error_type > socketpair(int family, int sock_type, int protocol) const override
Definition: socket_service.h:46
stdx::expected< size_t, error_type > splice_to_pipe(native_handle_type fd_in, impl::file::file_handle_type fd_out, size_t len, int flags) const override
Definition: socket_service.h:148
Definition: expected.h:944
static int flags[50]
Definition: hp_test1.cc:40
Definition: authentication.cc:36
int file_handle_type
Definition: file.h:53
stdx::expected< std::unique_ptr< struct addrinfo, void(*)(struct addrinfo *)>, std::error_code > getaddrinfo(const char *node, const char *service, const struct addrinfo *hints)
Definition: resolver.h:229
stdx::expected< size_t, error_type > sendmsg(native_handle_type native_handle, msghdr_base &msg, message_flags flags)
Definition: socket.h:310
stdx::expected< void, error_type > listen(native_handle_type native_handle, int backlog)
Definition: socket.h:149
stdx::expected< void, error_type > getsockname(native_handle_type native_handle, struct sockaddr *addr, size_t *addr_len)
Definition: socket.h:403
stdx::expected< native_handle_type, error_type > socket(int family, int sock_type, int protocol)
Definition: socket.h:63
stdx::expected< std::pair< native_handle_type, native_handle_type >, error_type > socketpair(int family, int sock_type, int protocol)
socketpair().
Definition: socket.h:453
stdx::expected< void, error_type > bind(native_handle_type native_handle, const struct sockaddr *addr, size_t addr_len)
wrap bind() in a portable way.
Definition: socket.h:339
stdx::expected< void, error_type > ioctl(native_handle_type native_handle, unsigned long cmd, void *data)
Definition: socket.h:89
stdx::expected< size_t, error_type > recvmsg(native_handle_type native_handle, msghdr_base &msg, message_flags flags)
Definition: socket.h:235
stdx::expected< size_t, error_type > splice_to_pipe(native_handle_type fd_in, impl::file::file_handle_type fd_out, size_t len, int flags)
Definition: socket.h:604
stdx::expected< void, error_type > getpeername(native_handle_type native_handle, struct sockaddr *addr, size_t *addr_len)
Definition: socket.h:424
stdx::expected< native_handle_type, error_type > accept(native_handle_type native_handle, struct sockaddr *addr, socklen_t *addr_len)
wrap accept() in a portable way.
Definition: socket.h:367
stdx::expected< void, std::error_code > close(native_handle_type native_handle)
Definition: socket.h:75
stdx::expected< native_handle_type, error_type > accept4(native_handle_type native_handle, struct sockaddr *addr, socklen_t *addr_len, int flags=0)
Definition: socket.h:380
wait_type
Definition: socket_constants.h:86
stdx::expected< void, error_type > setsockopt(native_handle_type native_handle, int level, int optname, const void *optval, socklen_t optlen)
Definition: socket.h:158
stdx::expected< bool, error_type > native_non_blocking(native_handle_type native_handle)
Definition: socket.h:106
::msghdr msghdr_base
Definition: socket_constants.h:60
stdx::expected< void, error_type > connect(native_handle_type native_handle, const struct sockaddr *addr, size_t addr_len)
wrap connect() in a portable way.
Definition: socket.h:353
std::error_code error_type
Definition: socket_constants.h:55
std::bitset< 31 > message_flags
Definition: socket_constants.h:64
stdx::expected< void, error_type > shutdown(native_handle_type fd, int how)
Definition: socket.h:663
int native_handle_type
Definition: socket_constants.h:51
stdx::expected< void, error_type > wait(native_handle_type fd, wait_type wt)
Definition: socket.h:636
stdx::expected< void, error_type > getsockopt(native_handle_type native_handle, int level, int optname, void *optval, socklen_t *optlen)
Definition: socket.h:174
stdx::expected< size_t, error_type > splice_from_pipe(impl::file::file_handle_type fd_in, native_handle_type fd_out, size_t len, int flags)
Definition: socket.h:620
native_handle_type native_handle()
Definition: process.h:56
std::conditional_t< !std::is_array< T >::value, std::unique_ptr< T, detail::Deleter< T > >, std::conditional_t< detail::is_unbounded_array_v< T >, std::unique_ptr< T, detail::Array_deleter< std::remove_extent_t< T > > >, void > > unique_ptr
The following is a common type that is returned by all the ut::make_unique (non-aligned) specializati...
Definition: ut0new.h:2439
struct sockaddr sockaddr
Definition: sock_probe_win32.h:63