diff options
author | Marko Bencun <marko.bencun@monetas.net> | 2017-06-01 12:34:02 +0200 |
---|---|---|
committer | Marko Bencun <marko.bencun@monetas.net> | 2017-06-15 23:07:14 +0200 |
commit | 07b2afef10bb6366a270e325fd41a8bc526c9ef3 (patch) | |
tree | a8395c86f903e74fc5e039efb2e8f99c27961045 /src/net.h | |
parent | ce79f3251851f6177f38009341802e6065cb70af (diff) |
add Binds, WhiteBinds to CConnman::Options
Part of a series of changes to clean up the instantiation of connman
by decoupling the command line arguments.
We also now abort with an error when explicit binds are set with
-listen=0.
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -145,13 +145,13 @@ public: uint64_t nMaxOutboundLimit = 0; std::vector<std::string> vSeedNodes; std::vector<CSubNet> vWhitelistedRange; + std::vector<CService> vBinds, vWhiteBinds; }; CConnman(uint64_t seed0, uint64_t seed1); ~CConnman(); - bool Start(CScheduler& scheduler, std::string& strNodeError, Options options); + bool Start(CScheduler& scheduler, Options options); void Stop(); void Interrupt(); - bool BindListenPort(const CService &bindAddr, std::string& strError, bool fWhitelisted = false); bool GetNetworkActive() const { return fNetworkActive; }; void SetNetworkActive(bool active); bool OpenNetworkConnection(const CAddress& addrConnect, bool fCountFailure, CSemaphoreGrant *grantOutbound = NULL, const char *strDest = NULL, bool fOneShot = false, bool fFeeler = false, bool fAddnode = false); @@ -288,6 +288,9 @@ private: ListenSocket(SOCKET socket_, bool whitelisted_) : socket(socket_), whitelisted(whitelisted_) {} }; + bool BindListenPort(const CService &bindAddr, std::string& strError, bool fWhitelisted = false); + bool Bind(const CService &addr, unsigned int flags); + bool InitBinds(const std::vector<CService>& binds, const std::vector<CService>& whiteBinds); void ThreadOpenAddedConnections(); void AddOneShot(const std::string& strDest); void ProcessOneShot(); |