X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fnetbase.h;h=26c2140155255c60345434d3ee38b16ba533a775;hb=ea22a380de824500644db6fd6f33d0465b34f7a1;hp=04ced1826065b58061d60955d1bfb55e3cb0df18;hpb=c981d768b3cb0cf0879b3d70d3b548692fff0882;p=novacoin.git diff --git a/src/netbase.h b/src/netbase.h index 04ced18..26c2140 100644 --- a/src/netbase.h +++ b/src/netbase.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Bitcoin developers +// Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_NETBASE_H @@ -19,8 +19,6 @@ #include #include #include -#endif -#ifdef BSD #include #endif @@ -30,7 +28,7 @@ extern int nConnectTimeout; -// IP address (IPv6, or IPv4 using mapped IPv6 range (::FFFF:0:0/96)) +/** IP address (IPv6, or IPv4 using mapped IPv6 range (::FFFF:0:0/96)) */ class CNetAddr { protected: @@ -81,6 +79,7 @@ class CNetAddr ) }; +/** A combnation of a network address (CNetAddr) and a (TCP) port */ class CService : public CNetAddr { protected: @@ -125,10 +124,10 @@ class CService : public CNetAddr ) }; -bool LookupHost(const char *pszName, std::vector& vIP, int nMaxSolutions = 0, bool fAllowLookup = true); -bool LookupHostNumeric(const char *pszName, std::vector& vIP, int nMaxSolutions = 0); +bool LookupHost(const char *pszName, std::vector& vIP, unsigned int nMaxSolutions = 0, bool fAllowLookup = true); +bool LookupHostNumeric(const char *pszName, std::vector& vIP, unsigned int nMaxSolutions = 0); bool Lookup(const char *pszName, CService& addr, int portDefault = 0, bool fAllowLookup = true); -bool Lookup(const char *pszName, std::vector& vAddr, int portDefault = 0, bool fAllowLookup = true, int nMaxSolutions = 0); +bool Lookup(const char *pszName, std::vector& vAddr, int portDefault = 0, bool fAllowLookup = true, unsigned int nMaxSolutions = 0); bool LookupNumeric(const char *pszName, CService& addr, int portDefault = 0); bool ConnectSocket(const CService &addr, SOCKET& hSocketRet, int nTimeout = nConnectTimeout);