26#ifndef MYSQL_HARNESS_NET_TS_IMPL_SOCKET_ERROR_H_
27#define MYSQL_HARNESS_NET_TS_IMPL_SOCKET_ERROR_H_
29#include <system_error>
52 class category_impl :
public std::error_category {
54 const char *
name()
const noexcept override {
return "socket"; }
55 std::string message(
int ev)
const override {
58 return "already_open";
68 static category_impl instance;
84 return WSAGetLastError();
98 return {errcode, std::system_category()};
100 return {errcode, std::generic_category()};
Definition: http_server_component.cc:34
std::error_code make_error_code(int errcode)
make proper std::error_code for socket errno's
Definition: socket_error.h:96
stdx::expected< native_handle_type, error_type > socket(int family, int sock_type, int protocol)
Definition: socket.h:63
std::error_code last_error_code()
get last std::error_code for socket-errors.
Definition: socket_error.h:107
int last_error()
get last socket error.
Definition: socket_error.h:82
socket_errc
Definition: socket_error.h:39
const std::error_category & socket_category() noexcept
Definition: socket_error.h:51
std::error_code make_error_code(net::stream_errc e) noexcept
Definition: buffer.h:103
Definition: gcs_xcom_synode.h:64
case opt name
Definition: sslopt-case.h:29