25#ifndef MYSQL_HARNESS_NET_TS_IMPL_SOCKET_ERROR_H_
26#define MYSQL_HARNESS_NET_TS_IMPL_SOCKET_ERROR_H_
28#include <system_error>
51 class category_impl :
public std::error_category {
53 const char *
name()
const noexcept override {
return "socket"; }
54 std::string message(
int ev)
const override {
57 return "already_open";
67 static category_impl instance;
83 return WSAGetLastError();
97 return {errcode, std::system_category()};
99 return {errcode, std::generic_category()};
Definition: authentication.cc:35
std::error_code make_error_code(int errcode)
make proper std::error_code for socket errno's
Definition: socket_error.h:95
stdx::expected< native_handle_type, error_type > socket(int family, int sock_type, int protocol)
Definition: socket.h:62
std::error_code last_error_code()
get last std::error_code for socket-errors.
Definition: socket_error.h:106
int last_error()
get last socket error.
Definition: socket_error.h:81
socket_errc
Definition: socket_error.h:38
const std::error_category & socket_category() noexcept
Definition: socket_error.h:50
std::error_code make_error_code(net::stream_errc e) noexcept
Definition: buffer.h:102
Definition: varlen_sort.h:174
case opt name
Definition: sslopt-case.h:32