1#ifndef UPnPsdk_SOCKET_HPP
2#define UPnPsdk_SOCKET_HPP
87#define EBADFP WSAENOTSOCK
88#define ENOTCONNP WSAENOTCONN
89#define EINTRP WSAEINTR
90#define EFAULTP WSAEFAULT
91#define ENOMEMP WSA_NOT_ENOUGH_MEMORY
92#define EINVALP WSAEINVAL
93#define EACCESP WSAEACCES
94#define ENOBUFSP WSAENOBUFS
97#define ENOTCONNP ENOTCONN
100#define ENOMEMP ENOMEM
101#define EINVALP EINVAL
102#define EACCESP EACCES
103#define ENOBUFSP ENOBUFS
194 operator SOCKET()
const;
272 int socktype()
const;
291 bool is_reuse_addr()
const;
297 SOCKET m_sfd{INVALID_SOCKET};
300 mutable ::pthread_mutex_t m_socket_mutex = PTHREAD_MUTEX_INITIALIZER;
304 bool local_saddr_protected(
SSockaddr* a_saddr)
const;
309 const SOCKET m_sfd_hint{INVALID_SOCKET};
462 const int a_socktype,
465 const SSockaddr*
const a_saddr =
nullptr,
474 const int a_flags = 0);
497 bool is_listen()
const;
501 bool m_listen{
false};
546 operator const int&();
550 std::string error_str()
const;
Class for portable handling of network socket errors.
Get information from a raw network socket file descriptor.
Manage all aspects of a network socket.
Reengineered Object Oriented UPnP+ program code.
Declaration of the Sockaddr class and some free helper functions.
Trivial ::sockaddr structures enhanced with methods.
Define macro for synced logging to the console for detailed info and debug.