diff options
author | B Stack <bgstack15@gmail.com> | 2019-07-15 08:13:44 -0400 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2019-07-15 08:13:44 -0400 |
commit | e195d3217826d61ab0d7ca7e2032271f5066a7df (patch) | |
tree | 222d90397f9ee1cf91de443fedc97fdaf5f33d14 /zen/socket.h | |
parent | Merge branch '10.13' into 'master' (diff) | |
download | FreeFileSync-e195d3217826d61ab0d7ca7e2032271f5066a7df.tar.gz FreeFileSync-e195d3217826d61ab0d7ca7e2032271f5066a7df.tar.bz2 FreeFileSync-e195d3217826d61ab0d7ca7e2032271f5066a7df.zip |
add upstream 10.14
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"); } |