aboutsummaryrefslogtreecommitdiff
path: root/src/netbase.h
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2017-10-02 16:37:36 -0400
committerCory Fields <cory-nospam-@coryfields.com>2017-12-12 15:25:25 -0500
commitdf3bcf89e49ec951baa3778a2452c0d1237ec053 (patch)
tree0af136d9b3eca5554799df19171567e2b6118085 /src/netbase.h
parent9e3b2f576bb368a0857e808dcbd24b2dcb8bef2d (diff)
net: pass socket closing responsibility up to caller for outgoing connections
This allows const references to be passed around, making it clear where the socket may and may not be invalidated.
Diffstat (limited to 'src/netbase.h')
-rw-r--r--src/netbase.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/netbase.h b/src/netbase.h
index 59945ea97d..52e920b3d8 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -52,8 +52,8 @@ bool Lookup(const char *pszName, std::vector<CService>& vAddr, int portDefault,
CService LookupNumeric(const char *pszName, int portDefault = 0);
bool LookupSubNet(const char *pszName, CSubNet& subnet);
SOCKET CreateSocket(const CService &addrConnect);
-bool ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRet, int nTimeout);
-bool ConnectThroughProxy(const proxyType &proxy, const std::string& strDest, int port, SOCKET& hSocketRet, int nTimeout, bool *outProxyConnectionFailed);
+bool ConnectSocketDirectly(const CService &addrConnect, const SOCKET& hSocketRet, int nTimeout);
+bool ConnectThroughProxy(const proxyType &proxy, const std::string& strDest, int port, const SOCKET& hSocketRet, int nTimeout, bool *outProxyConnectionFailed);
/** Return readable error string for a network error code */
std::string NetworkErrorString(int err);
/** Close socket and set hSocket to INVALID_SOCKET */