| 585 | } |
| 586 | |
| 587 | bool ConnectSocket(const CService &addrDest, SOCKET& hSocketRet, int nTimeout, bool *outProxyConnectionFailed) |
| 588 | { |
| 589 | proxyType proxy; |
| 590 | if (outProxyConnectionFailed) |
| 591 | *outProxyConnectionFailed = false; |
| 592 | |
| 593 | if (GetProxy(addrDest.GetNetwork(), proxy)) |
| 594 | return ConnectThroughProxy(proxy, addrDest.ToStringIP(), addrDest.GetPort(), hSocketRet, nTimeout, outProxyConnectionFailed); |
| 595 | else // no proxy needed (none set for target network) |
| 596 | return ConnectSocketDirectly(addrDest, hSocketRet, nTimeout); |
| 597 | } |
| 598 | |
| 599 | bool ConnectSocketByName(CService &addr, SOCKET& hSocketRet, const char *pszDest, int portDefault, int nTimeout, bool *outProxyConnectionFailed) |
| 600 | { |
no test coverage detected