5 #ifndef BITCOIN_NETBASE_H 6 #define BITCOIN_NETBASE_H 8 #if defined(HAVE_CONFIG_H) 42 void SplitHostPort(std::string in,
int &portOut, std::string &hostOut);
48 bool LookupHost(
const char *pszName, std::vector<CNetAddr>& vIP,
unsigned int nMaxSolutions,
bool fAllowLookup);
50 bool Lookup(
const char *pszName,
CService& addr,
int portDefault,
bool fAllowLookup);
51 bool Lookup(
const char *pszName, std::vector<CService>& vAddr,
int portDefault,
bool fAllowLookup,
unsigned int nMaxSolutions);
68 #endif // BITCOIN_NETBASE_H bool CloseSocket(SOCKET &hSocket)
bool SetProxy(enum Network net, const proxyType &addrProxy)
bool randomize_credentials
bool ConnectSocket(const CService &addr, SOCKET &hSocketRet, int nTimeout, bool *outProxyConnectionFailed=0)
bool SetSocketNonBlocking(SOCKET &hSocket, bool fNonBlocking)
enum Network ParseNetwork(std::string net)
void InterruptSocks5(bool interrupt)
bool Lookup(const char *pszName, CService &addr, int portDefault, bool fAllowLookup)
struct timeval MillisToTimeval(int64_t nTimeout)
bool LookupSubNet(const char *pszName, CSubNet &subnet)
bool ConnectSocketByName(CService &addr, SOCKET &hSocketRet, const char *pszDest, int portDefault, int nTimeout, bool *outProxyConnectionFailed=0)
bool IsProxy(const CNetAddr &addr)
void SplitHostPort(std::string in, int &portOut, std::string &hostOut)
bool LookupHost(const char *pszName, std::vector< CNetAddr > &vIP, unsigned int nMaxSolutions, bool fAllowLookup)
bool SetNameProxy(const proxyType &addrProxy)
static const int DEFAULT_NAME_LOOKUP
-dns default
proxyType(const CService &proxy, bool randomize_credentials=false)
CService LookupNumeric(const char *pszName, int portDefault=0)
static const int DEFAULT_CONNECT_TIMEOUT
-timeout default
std::string GetNetworkName(enum Network net)
std::string NetworkErrorString(int err)
bool GetProxy(enum Network net, proxyType &proxyInfoOut)