Helper class to initialize and cleanup sockets (RAII).
More...
#include <SocketInitializer.hpp>
Helper class to initialize and cleanup sockets (RAII).
On Windows, calls WSAStartup/WSACleanup. On Linux/POSIX, does nothing. Throws SocketException on failure.
◆ SocketInitializer() [1/2]
jsocketpp::SocketInitializer::SocketInitializer |
( |
| ) |
|
|
inline |
Initialize socket system (WSAStartup on Windows).
- Exceptions
-
◆ ~SocketInitializer()
jsocketpp::SocketInitializer::~SocketInitializer |
( |
| ) |
|
|
inlinenoexcept |
Clean up socket system (WSACleanup on Windows).
- Note
- Will log any cleanup failures to stderr but not throw.
◆ SocketInitializer() [2/2]
Deleted copy constructor (non-copyable).
◆ operator=()
Deleted copy assignment operator (non-copyable).
The documentation for this class was generated from the following file: