Singleton guard for WinSock initialization.
More...
#include <wsa_guard.hpp>
|
bool | success () const noexcept |
| Returns whether WSAStartup was successful.
|
|
int | ret_code () const noexcept |
| Returns the result code from WSAStartup.
|
|
const WSADATA & | data () const noexcept |
| Returns the WSAData structure (valid only if successful).
|
|
|
static const WsaGuard & | instance () |
| Returns the singleton instance, initializing WSA if needed.
|
|
Singleton guard for WinSock initialization.
Definition at line 19 of file wsa_guard.hpp.
◆ WsaGuard() [1/2]
time_shield::WsaGuard::WsaGuard |
( |
| ) |
|
|
inlineprivate |
◆ ~WsaGuard()
time_shield::WsaGuard::~WsaGuard |
( |
| ) |
|
|
privatedefault |
◆ WsaGuard() [2/2]
time_shield::WsaGuard::WsaGuard |
( |
const WsaGuard & | | ) |
|
|
privatedelete |
◆ data()
const WSADATA & time_shield::WsaGuard::data |
( |
| ) |
const |
|
inlinenoexcept |
Returns the WSAData structure (valid only if successful).
Definition at line 38 of file wsa_guard.hpp.
◆ instance()
static const WsaGuard & time_shield::WsaGuard::instance |
( |
| ) |
|
|
inlinestatic |
Returns the singleton instance, initializing WSA if needed.
Definition at line 22 of file wsa_guard.hpp.
◆ operator=()
◆ ret_code()
int time_shield::WsaGuard::ret_code |
( |
| ) |
const |
|
inlinenoexcept |
Returns the result code from WSAStartup.
Definition at line 33 of file wsa_guard.hpp.
◆ success()
bool time_shield::WsaGuard::success |
( |
| ) |
const |
|
inlinenoexcept |
Returns whether WSAStartup was successful.
Definition at line 28 of file wsa_guard.hpp.
◆ m_ret_code
int time_shield::WsaGuard::m_ret_code = -1 |
|
private |
◆ m_wsa_data
WSADATA time_shield::WsaGuard::m_wsa_data {} |
|
private |
The documentation for this class was generated from the following file: