aboutsummaryrefslogtreecommitdiff
path: root/src/netbase.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-07-10 12:13:03 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-07-17 15:46:25 +0200
commit43f510d37d680ca4347878d2fb6f8b97b54e7611 (patch)
tree137cb51c1953826cd595584e8371d5fbd4b2ccb3 /src/netbase.h
parentc4f11ca9c32a90c57bd26eb38e5a264a95baba41 (diff)
Convert closesocket 'compat wrapper' to function in netbase
Simpler alternative to #4348. The current setup with closesocket() is strange. It poses as a compatibility wrapper but adds functionality. Rename it and make it a documented utility function in netbase. Code movement only, zero effect on the functionality.
Diffstat (limited to 'src/netbase.h')
-rw-r--r--src/netbase.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/netbase.h b/src/netbase.h
index ad1e230834..05221a5fde 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -178,5 +178,7 @@ bool ConnectSocket(const CService &addr, SOCKET& hSocketRet, int nTimeout = nCon
bool ConnectSocketByName(CService &addr, SOCKET& hSocketRet, const char *pszDest, int portDefault = 0, int nTimeout = nConnectTimeout);
/** Return readable error string for a network error code */
std::string NetworkErrorString(int err);
+/** Close socket and set hSocket to INVALID_SOCKET */
+bool CloseSocket(SOCKET& hSocket);
#endif