aboutsummaryrefslogtreecommitdiff
path: root/src/netbase.cpp
diff options
context:
space:
mode:
authorCory Fields <[email protected]>2017-06-22 14:01:04 -0400
committerCory Fields <[email protected]>2017-09-18 13:47:47 -0400
commit2416dd7cc94e765efbbf9069dbf0f6fb71404ebb (patch)
tree7f66d156ebf5c4e1b4253277abc688c26edd2338 /src/netbase.cpp
parentMerge #11345: [tests] Check connectivity before sending in assumevalid.py (diff)
downloaddiscoin-2416dd7cc94e765efbbf9069dbf0f6fb71404ebb.tar.xz
discoin-2416dd7cc94e765efbbf9069dbf0f6fb71404ebb.zip
net: separate resolving and conecting
ConnectSocketByName handled resolves as necessary, obscuring the connection process. With them separated, each can be handled asynchronously. Also, since proxies must be considered now anyway, go ahead and eliminate the ConnectSocket wrapper and use ConnectSocketDirectly... directly.
Diffstat (limited to 'src/netbase.cpp')
-rw-r--r--src/netbase.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/netbase.cpp b/src/netbase.cpp
index 05f9f6961..d4a91da1f 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -399,7 +399,7 @@ static bool Socks5(const std::string& strDest, int port, const ProxyCredentials
return true;
}
-bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRet, int nTimeout)
+bool ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRet, int nTimeout)
{
hSocketRet = INVALID_SOCKET;
@@ -534,7 +534,7 @@ bool IsProxy(const CNetAddr &addr) {
return false;
}
-static bool ConnectThroughProxy(const proxyType &proxy, const std::string& strDest, int port, SOCKET& hSocketRet, int nTimeout, bool *outProxyConnectionFailed)
+bool ConnectThroughProxy(const proxyType &proxy, const std::string& strDest, int port, SOCKET& hSocketRet, int nTimeout, bool *outProxyConnectionFailed)
{
SOCKET hSocket = INVALID_SOCKET;
// first connect to proxy server