bool fBound = false;
if (!fNoListen)
{
- std::string strError;
if (mapArgs.count("-bind")) {
for(std::string strBind : mapMultiArgs["-bind"]) {
CService addrBind;
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();
uint16_t GetListenPort();
bool BindListenPort(const CService &bindAddr, string& strError=REF(string()));
void StartNode(void* parg);
return ToStringIPPort();
}
-void CService::SetPort(uint16_t portIn)
+void CService::SetupPort(uint16_t portIn)
{
port = portIn;
}
extern int nConnectTimeout;
-#ifdef WIN32
-// In MSVC, this is defined as a macro, undefine it to prevent a compile and link error
-#undef SetPort
-#endif
-
enum Network
{
NET_UNROUTABLE,
explicit CService(const std::string& strIpPort, uint16_t portDefault, bool fAllowLookup = false);
explicit CService(const std::string& strIpPort, bool fAllowLookup = false);
void Init();
- void SetPort(uint16_t portIn);
+ void SetupPort(uint16_t portIn);
uint16_t GetPort() const;
bool GetSockAddr(struct sockaddr* paddr, socklen_t *addrlen) const;
bool SetSockAddr(const struct sockaddr* paddr);
proxy.first = CService("127.0.0.1", nSocksDefault);
GetProxy(NET_IPV4, proxy);
- proxy.first.SetPort(value.toInt());
+ proxy.first.SetupPort(value.toInt());
settings.setValue("addrProxy", proxy.first.ToStringIPPort().c_str());
successful = ApplyProxySettings();
}
proxy.first = CService("127.0.0.1", nSocksDefault);
GetProxy(NET_TOR, proxy);
- proxy.first.SetPort((uint16_t)value.toUInt());
+ proxy.first.SetupPort((uint16_t)value.toUInt());
settings.setValue("addrTor", proxy.first.ToStringIPPort().c_str());
successful = ApplyTorSettings();
}