2#ifndef _TIME_SHIELD_WSA_GUARD_HPP_INCLUDED
3#define _TIME_SHIELD_WSA_GUARD_HPP_INCLUDED
11#if TIME_SHIELD_HAS_WINSOCK
12# ifndef WIN32_LEAN_AND_MEAN
13# define WIN32_LEAN_AND_MEAN
19# error "WsaGuard requires WinSock support"
47 const WSADATA&
data() const noexcept {
WsaGuard & operator=(const WsaGuard &)=delete
const WSADATA & data() const noexcept
Returns the WSAData structure (valid only if successful).
int ret_code() const noexcept
Returns the result code from WSAStartup.
static const WsaGuard & instance()
Returns the singleton instance, initializing WSA if needed.
bool success() const noexcept
Returns whether WSAStartup was successful.
WsaGuard(const WsaGuard &)=delete
Configuration macros for the library.
Main namespace for the Time Shield library.