26#ifndef MYSQL_HARNESS_NET_TS_IMPL_SOCKET_SERVICE_BASE_H_
27#define MYSQL_HARNESS_NET_TS_IMPL_SOCKET_SERVICE_BASE_H_
31#include <system_error>
53 int family,
int sock_type,
int protocol)
const = 0;
57 socketpair(
int family,
int sock_type,
int protocol)
const = 0;
64 void *data)
const = 0;
77 const void *optval, socklen_t optlen)
const = 0;
81 socklen_t *optlen)
const = 0;
93 size_t addr_len)
const = 0;
97 size_t addr_len)
const = 0;
101 socklen_t *addr_len)
const = 0;
107 socklen_t *addr_len,
int flags = 0)
const = 0;
111 size_t *addr_len)
const = 0;
114 size_t *addr_len)
const = 0;
120 int flags)
const = 0;
125 int flags)
const = 0;
129 int flags)
const = 0;
141 const addrinfo *hints)
const = 0;
Definition: socket_service_base.h:48
virtual stdx::expected< void, error_type > ioctl(native_handle_type native_handle, unsigned long cmd, void *data) const =0
virtual stdx::expected< size_t, error_type > sendmsg(native_handle_type native_handle, msghdr_base &msg, message_flags flags) const =0
virtual stdx::expected< void, error_type > bind(native_handle_type native_handle, const struct sockaddr *addr, size_t addr_len) const =0
virtual ~SocketServiceBase()=default
virtual stdx::expected< void, error_type > getsockopt(native_handle_type native_handle, int level, int optname, void *optval, socklen_t *optlen) const =0
virtual stdx::expected< void, error_type > getsockname(native_handle_type native_handle, struct sockaddr *addr, size_t *addr_len) const =0
virtual stdx::expected< native_handle_type, error_type > socket(int family, int sock_type, int protocol) const =0
virtual stdx::expected< void, error_type > close(native_handle_type native_handle) const =0
virtual stdx::expected< void, error_type > getpeername(native_handle_type native_handle, struct sockaddr *addr, size_t *addr_len) const =0
virtual stdx::expected< native_handle_type, error_type > accept(native_handle_type native_handle, struct sockaddr *addr, socklen_t *addr_len) const =0
virtual stdx::expected< native_handle_type, error_type > accept4(native_handle_type native_handle, struct sockaddr *addr, socklen_t *addr_len, int flags=0) const =0
virtual 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 =0
virtual stdx::expected< size_t, error_type > recvmsg(native_handle_type native_handle, msghdr_base &msg, message_flags flags) const =0
virtual stdx::expected< void, error_type > native_non_blocking(native_handle_type native_handle, bool on) const =0
virtual stdx::expected< std::pair< native_handle_type, native_handle_type >, error_type > socketpair(int family, int sock_type, int protocol) const =0
virtual stdx::expected< void, error_type > setsockopt(native_handle_type native_handle, int level, int optname, const void *optval, socklen_t optlen) const =0
virtual stdx::expected< bool, error_type > native_non_blocking(native_handle_type native_handle) const =0
virtual 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 =0
virtual stdx::expected< void, error_type > listen(native_handle_type native_handle, int backlog) const =0
virtual stdx::expected< std::unique_ptr< struct addrinfo, void(*)(struct addrinfo *)>, std::error_code > getaddrinfo(const char *node, const char *service, const addrinfo *hints) const =0
virtual stdx::expected< void, error_type > connect(native_handle_type native_handle, const struct sockaddr *addr, size_t addr_len) const =0
virtual stdx::expected< void, error_type > wait(native_handle_type fd, wait_type wt) const =0
virtual stdx::expected< void, error_type > shutdown(native_handle_type fd, int how) const =0
Definition: expected.h:286
static int flags[50]
Definition: hp_test1.cc:40
Definition: http_server_component.cc:34
int file_handle_type
Definition: file.h:53
stdx::expected< native_handle_type, error_type > socket(int family, int sock_type, int protocol)
Definition: socket.h:63
wait_type
Definition: socket_constants.h:86
::msghdr msghdr_base
Definition: socket_constants.h:60
std::error_code error_type
Definition: socket_constants.h:55
std::bitset< 31 > message_flags
Definition: socket_constants.h:64
int native_handle_type
Definition: socket_constants.h:51
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:2440
struct sockaddr sockaddr
Definition: sock_probe_win32.h:63