diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2017-06-23 11:53:45 -0400 |
---|---|---|
committer | Cory Fields <cory-nospam-@coryfields.com> | 2017-09-18 13:47:47 -0400 |
commit | b887676e1b86ce03181b5876cf6203d617750d0a (patch) | |
tree | d7b26f4b56d1960c144f7eaf4abe4104ff012f2f /src/netbase.cpp | |
parent | 45fd75453e59868471572907db237630ca2b7afd (diff) |
net: remove now-unused functions
Diffstat (limited to 'src/netbase.cpp')
-rw-r--r-- | src/netbase.cpp | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/netbase.cpp b/src/netbase.cpp index d4a91da1f0..9212be9816 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -558,47 +558,6 @@ bool ConnectThroughProxy(const proxyType &proxy, const std::string& strDest, int hSocketRet = hSocket; return true; } - -bool ConnectSocket(const CService &addrDest, SOCKET& hSocketRet, int nTimeout, bool *outProxyConnectionFailed) -{ - proxyType proxy; - if (outProxyConnectionFailed) - *outProxyConnectionFailed = false; - - if (GetProxy(addrDest.GetNetwork(), proxy)) - return ConnectThroughProxy(proxy, addrDest.ToStringIP(), addrDest.GetPort(), hSocketRet, nTimeout, outProxyConnectionFailed); - else // no proxy needed (none set for target network) - return ConnectSocketDirectly(addrDest, hSocketRet, nTimeout); -} - -bool ConnectSocketByName(CService &addr, SOCKET& hSocketRet, const char *pszDest, int portDefault, int nTimeout, bool *outProxyConnectionFailed) -{ - std::string strDest; - int port = portDefault; - - if (outProxyConnectionFailed) - *outProxyConnectionFailed = false; - - SplitHostPort(std::string(pszDest), port, strDest); - - proxyType proxy; - GetNameProxy(proxy); - - std::vector<CService> addrResolved; - if (Lookup(strDest.c_str(), addrResolved, port, fNameLookup && !HaveNameProxy(), 256)) { - if (addrResolved.size() > 0) { - addr = addrResolved[GetRand(addrResolved.size())]; - return ConnectSocket(addr, hSocketRet, nTimeout); - } - } - - addr = CService(); - - if (!HaveNameProxy()) - return false; - return ConnectThroughProxy(proxy, strDest, port, hSocketRet, nTimeout, outProxyConnectionFailed); -} - bool LookupSubNet(const char* pszName, CSubNet& ret) { std::string strSubnet(pszName); |