31 #if defined(LIBWIRE_POSIX)
32 # include <sys/socket.h>
33 # include <netinet/in.h>
35 #if defined(LIBWIRE_WINDOWS)
36 # include <winsock2.h>
37 # include <ws2tcpip.h>
46 namespace libwire::internal_ {
47 endpoint sockaddr_to_endpoint(sockaddr_storage in);
48 sockaddr_storage endpoint_to_sockaddr(
const endpoint& in);
53 template<
typename Func,
typename... Args>
54 auto error_wrapper(
const Func& func, std::error_code& ec, Args&&... args) {
55 ec = std::error_code();
56 decltype(func(std::forward<Args>(args)...)) res;
58 res = func(std::forward<Args>(args)...);
60 ec = last_system_error();
This file defines universal address structure for both IPv4 and IPv6 network addresses.
System call interrupted by signal (POSIX-specific).
This header defines set of enumerations for platform-independent error code handling.