|
|
@ -93,7 +93,6 @@ CNode* FindNode(const CSubNet& subNet); |
|
|
|
CNode* FindNode(const std::string& addrName); |
|
|
|
CNode* FindNode(const std::string& addrName); |
|
|
|
CNode* FindNode(const CService& ip); |
|
|
|
CNode* FindNode(const CService& ip); |
|
|
|
CNode* FindNode(const NodeId id); //TODO: Remove this
|
|
|
|
CNode* FindNode(const NodeId id); //TODO: Remove this
|
|
|
|
bool OpenNetworkConnection(const CAddress& addrConnect, bool fCountFailure, CSemaphoreGrant *grantOutbound = NULL, const char *strDest = NULL, bool fOneShot = false, bool fFeeler = false); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CConnman |
|
|
|
class CConnman |
|
|
|
{ |
|
|
|
{ |
|
|
@ -103,6 +102,7 @@ public: |
|
|
|
bool Start(boost::thread_group& threadGroup, std::string& strNodeError); |
|
|
|
bool Start(boost::thread_group& threadGroup, std::string& strNodeError); |
|
|
|
void Stop(); |
|
|
|
void Stop(); |
|
|
|
bool BindListenPort(const CService &bindAddr, std::string& strError, bool fWhitelisted = false); |
|
|
|
bool BindListenPort(const CService &bindAddr, std::string& strError, bool fWhitelisted = false); |
|
|
|
|
|
|
|
bool OpenNetworkConnection(const CAddress& addrConnect, bool fCountFailure, CSemaphoreGrant *grantOutbound = NULL, const char *strDest = NULL, bool fOneShot = false, bool fFeeler = false); |
|
|
|
|
|
|
|
|
|
|
|
private: |
|
|
|
private: |
|
|
|
struct ListenSocket { |
|
|
|
struct ListenSocket { |
|
|
@ -120,6 +120,8 @@ private: |
|
|
|
void ThreadSocketHandler(); |
|
|
|
void ThreadSocketHandler(); |
|
|
|
void ThreadDNSAddressSeed(); |
|
|
|
void ThreadDNSAddressSeed(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CNode* ConnectNode(CAddress addrConnect, const char *pszDest, bool fCountFailure); |
|
|
|
|
|
|
|
|
|
|
|
std::vector<ListenSocket> vhListenSocket; |
|
|
|
std::vector<ListenSocket> vhListenSocket; |
|
|
|
}; |
|
|
|
}; |
|
|
|
extern std::unique_ptr<CConnman> g_connman; |
|
|
|
extern std::unique_ptr<CConnman> g_connman; |
|
|
|