@@ -558,47 +558,6 @@ bool ConnectThroughProxy(const proxyType &proxy, const std::string& strDest, int
558
558
hSocketRet = hSocket;
559
559
return true ;
560
560
}
561
-
562
- bool ConnectSocket (const CService &addrDest, SOCKET& hSocketRet, int nTimeout, bool *outProxyConnectionFailed)
563
- {
564
- proxyType proxy;
565
- if (outProxyConnectionFailed)
566
- *outProxyConnectionFailed = false ;
567
-
568
- if (GetProxy (addrDest.GetNetwork (), proxy))
569
- return ConnectThroughProxy (proxy, addrDest.ToStringIP (), addrDest.GetPort (), hSocketRet, nTimeout, outProxyConnectionFailed);
570
- else // no proxy needed (none set for target network)
571
- return ConnectSocketDirectly (addrDest, hSocketRet, nTimeout);
572
- }
573
-
574
- bool ConnectSocketByName (CService &addr, SOCKET& hSocketRet, const char *pszDest, int portDefault, int nTimeout, bool *outProxyConnectionFailed)
575
- {
576
- std::string strDest;
577
- int port = portDefault;
578
-
579
- if (outProxyConnectionFailed)
580
- *outProxyConnectionFailed = false ;
581
-
582
- SplitHostPort (std::string (pszDest), port, strDest);
583
-
584
- proxyType proxy;
585
- GetNameProxy (proxy);
586
-
587
- std::vector<CService> addrResolved;
588
- if (Lookup (strDest.c_str (), addrResolved, port, fNameLookup && !HaveNameProxy (), 256 )) {
589
- if (addrResolved.size () > 0 ) {
590
- addr = addrResolved[GetRand (addrResolved.size ())];
591
- return ConnectSocket (addr, hSocketRet, nTimeout);
592
- }
593
- }
594
-
595
- addr = CService ();
596
-
597
- if (!HaveNameProxy ())
598
- return false ;
599
- return ConnectThroughProxy (proxy, strDest, port, hSocketRet, nTimeout, outProxyConnectionFailed);
600
- }
601
-
602
561
bool LookupSubNet (const char * pszName, CSubNet& ret)
603
562
{
604
563
std::string strSubnet (pszName);
0 commit comments