 |
PRCYCoin
2.0.0.7rc1
P2P Digital Currency
|
Go to the documentation of this file.
5 #ifndef BITCOIN_NETBASE_H
6 #define BITCOIN_NETBASE_H
8 #if defined(HAVE_CONFIG_H)
24 static const int DEFAULT_CONNECT_TIMEOUT = 5000;
26 static const int DEFAULT_NAME_LOOKUP =
true;
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);
67 #endif // BITCOIN_NETBASE_H
A combination of a network address (CNetAddr) and a (TCP) port.
bool ConnectSocket(const CService &addr, SOCKET &hSocketRet, int nTimeout, bool *outProxyConnectionFailed=0)
enum Network ParseNetwork(std::string net)
bool Lookup(const char *pszName, CService &addr, int portDefault, bool fAllowLookup)
IP address (IPv6, or IPv4 using mapped IPv6 range (::FFFF:0:0/96))
bool ConnectSocketByName(CService &addr, SOCKET &hSocketRet, const char *pszDest, int portDefault, int nTimeout, bool *outProxyConnectionFailed=0)
struct timeval MillisToTimeval(int64_t nTimeout)
Convert milliseconds to a struct timeval for e.g.
bool IsProxy(const CNetAddr &addr)
void SplitHostPort(std::string in, int &portOut, std::string &hostOut)
bool SetSocketNonBlocking(SOCKET &hSocket, bool fNonBlocking)
Disable or enable blocking-mode for a socket.
bool LookupSubNet(const char *pszName, CSubNet &subnet)
bool SetNameProxy(const proxyType &addrProxy)
bool LookupHost(const char *pszName, std::vector< CNetAddr > &vIP, unsigned int nMaxSolutions, bool fAllowLookup)
bool GetProxy(enum Network net, proxyType &proxyInfoOut)
bool randomize_credentials
proxyType(const CService &proxy, bool randomize_credentials=false)
CService LookupNumeric(const char *pszName, int portDefault=0)
std::string NetworkErrorString(int err)
Return readable error string for a network error code.
bool CloseSocket(SOCKET &hSocket)
Close socket and set hSocket to INVALID_SOCKET.
bool SetProxy(enum Network net, const proxyType &addrProxy)
std::string GetNetworkName(enum Network net)