diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2017-06-22 14:01:04 -0400 |
---|---|---|
committer | Cory Fields <cory-nospam-@coryfields.com> | 2017-09-18 13:47:47 -0400 |
commit | 2416dd7cc94e765efbbf9069dbf0f6fb71404ebb (patch) | |
tree | 7f66d156ebf5c4e1b4253277abc688c26edd2338 /src/netbase.cpp | |
parent | 44e1fd926cfb0df0fbd8c41de8cd65ed8d5d6e18 (diff) |
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.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/netbase.cpp b/src/netbase.cpp index 05f9f6961c..d4a91da1f0 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 |