diff options
author | B. Stack <bgstack15@gmail.com> | 2022-10-11 11:16:39 -0400 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2022-10-11 11:16:39 -0400 |
commit | cab22f2dc3c5f41b5163f74cbb233e390edff6ff (patch) | |
tree | a49cfd729d9793681a57fa6f7409b0f0848e9ede /zen/socket.h | |
parent | Merge branch 'b11.25' into 'master' (diff) | |
download | FreeFileSync-cab22f2dc3c5f41b5163f74cbb233e390edff6ff.tar.gz FreeFileSync-cab22f2dc3c5f41b5163f74cbb233e390edff6ff.tar.bz2 FreeFileSync-cab22f2dc3c5f41b5163f74cbb233e390edff6ff.zip |
add upstream 11.26
Diffstat (limited to 'zen/socket.h')
-rw-r--r-- | zen/socket.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/zen/socket.h b/zen/socket.h index d9517bd8..8e92b616 100644 --- a/zen/socket.h +++ b/zen/socket.h @@ -24,6 +24,7 @@ namespace zen using SocketType = int; const SocketType invalidSocket = -1; inline void closeSocket(SocketType s) { ::close(s); } +warn_static("log on error!") //Winsock needs to be initialized before calling any of these functions! (WSAStartup/WSACleanup) @@ -58,7 +59,7 @@ public: THROW_LAST_SYS_ERROR_WSA("socket"); ZEN_ON_SCOPE_FAIL(closeSocket(testSocket)); - + warn_static("support timeout! https://stackoverflow.com/questions/2597608/c-socket-connection-timeout") if (::connect(testSocket, ai.ai_addr, static_cast<int>(ai.ai_addrlen)) != 0) THROW_LAST_SYS_ERROR_WSA("connect"); |