diff options
author | B Stack <bgstack15@gmail.com> | 2019-07-28 22:11:18 +0000 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2019-07-28 22:11:18 +0000 |
commit | d55d83514b81127e53ebcaaaf261c40c6bd265b1 (patch) | |
tree | 3e1ab2d39bea9777796470da1ee22d8a8591feef /zen/socket.h | |
parent | Merge branch '10.13' into 'master' (diff) | |
parent | Add open_ssl.cpp to CPP_FILES in Makefile (diff) | |
download | FreeFileSync-d55d83514b81127e53ebcaaaf261c40c6bd265b1.tar.gz FreeFileSync-d55d83514b81127e53ebcaaaf261c40c6bd265b1.tar.bz2 FreeFileSync-d55d83514b81127e53ebcaaaf261c40c6bd265b1.zip |
Merge branch '10.14' into 'master'10.14
10.14
See merge request opensource-tracking/FreeFileSync!11
Diffstat (limited to 'zen/socket.h')
-rw-r--r-- | zen/socket.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/zen/socket.h b/zen/socket.h index 0b4c823d..7ca0c93f 100644 --- a/zen/socket.h +++ b/zen/socket.h @@ -105,7 +105,7 @@ size_t tryReadSocket(SocketType socket, void* buffer, size_t bytesToRead) //thro THROW_LAST_SYS_ERROR_WSA(L"recv"); if (static_cast<size_t>(bytesReceived) > bytesToRead) //better safe than sorry - throw SysError(L"HttpInputStream::tryRead: buffer overflow."); + throw SysError(L"recv: buffer overflow."); return bytesReceived; //"zero indicates end of file" } @@ -138,10 +138,11 @@ size_t tryWriteSocket(SocketType socket, const void* buffer, size_t bytesToWrite } +//initiate termination of connection by sending TCP FIN package inline void shutdownSocketSend(SocketType socket) //throw SysError { - if (::shutdown(socket, SHUT_WR) != 0) + if (::shutdown(socket, SHUT_WR) != 0) THROW_LAST_SYS_ERROR_WSA(L"shutdown"); } |