X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fnet.h;h=d1696fc12cef25291f81b9b3f572d341132453f8;hb=3814af1ef1a10f25e7a76929edfd3abdb0ab791d;hp=2d635faefdf4f2d54626680174721189a3824d93;hpb=e3af34101250095febe11520d67c6e0070ef3181;p=novacoin.git diff --git a/src/net.h b/src/net.h index 2d635fa..d1696fc 100644 --- a/src/net.h +++ b/src/net.h @@ -5,6 +5,7 @@ #ifndef BITCOIN_NET_H #define BITCOIN_NET_H +#include #include #ifndef Q_MOC_RUN #include @@ -39,6 +40,7 @@ void AddressCurrentlyConnected(const CService& addr); CNode* FindNode(const CNetAddr& ip); CNode* FindNode(const CService& ip); CNode* ConnectNode(CAddress addrConnect, const char *strDest = NULL, int64_t nTimeout=0); +bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOutbound = NULL, const char *strDest = NULL, bool fOneShot = false); void MapPort(); unsigned short GetListenPort(); bool BindListenPort(const CService &bindAddr, std::string& strError=REF(std::string())); @@ -125,6 +127,8 @@ extern CAddrMan addrman; extern std::vector vNodes; extern CCriticalSection cs_vNodes; +extern std::vector vAddedNodes; +extern CCriticalSection cs_vAddedNodes; extern std::map mapRelay; extern std::deque > vRelayExpiration; extern CCriticalSection cs_mapRelay; @@ -230,7 +234,7 @@ public: nLastSendEmpty = GetTime(); nTimeConnected = GetTime(); nHeaderStart = -1; - nMessageStart = -1; + nMessageStart = std::numeric_limits::max(); addr = addrIn; addrName = addrNameIn == "" ? addr.ToStringIPPort() : addrNameIn; nVersion = 0; @@ -372,7 +376,7 @@ public: return; vSend.resize(nHeaderStart); nHeaderStart = -1; - nMessageStart = -1; + nMessageStart = std::numeric_limits::max(); LEAVE_CRITICAL_SECTION(cs_vSend); if (fDebug) @@ -407,7 +411,7 @@ public: } nHeaderStart = -1; - nMessageStart = -1; + nMessageStart = std::numeric_limits::max(); LEAVE_CRITICAL_SECTION(cs_vSend); }