aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-04-19 17:38:03 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2012-05-04 16:11:54 +0200
commit9bab521df895c149579b9e64931405c56b008afb (patch)
tree18177aabb6eb11265e3500a75abcdd6bf1150c86 /src/net.h
parenta012e2db59585bfa1978615aacade281053e0ae5 (diff)
Support connecting by hostnames passed to proxy (-proxydns)
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/net.h b/src/net.h
index bad49a9f8f..0f48c515b0 100644
--- a/src/net.h
+++ b/src/net.h
@@ -35,7 +35,7 @@ bool GetMyExternalIP(CNetAddr& ipRet);
void AddressCurrentlyConnected(const CService& addr);
CNode* FindNode(const CNetAddr& ip);
CNode* FindNode(const CService& ip);
-CNode* ConnectNode(CAddress addrConnect, int64 nTimeout=0);
+CNode* ConnectNode(CAddress addrConnect, const char *strDest = NULL, int64 nTimeout=0);
void MapPort(bool fMapPort);
bool BindListenPort(std::string& strError=REF(std::string()));
void StartNode(void* parg);
@@ -83,7 +83,6 @@ enum threadId
};
extern bool fClient;
-extern bool fAllowDNS;
extern uint64 nLocalServices;
extern CAddress addrLocalHost;
extern uint64 nLocalHostNonce;
@@ -120,6 +119,7 @@ public:
int nHeaderStart;
unsigned int nMessageStart;
CAddress addr;
+ std::string addrName;
int nVersion;
std::string strSubVer;
bool fClient;
@@ -157,7 +157,7 @@ public:
CCriticalSection cs_inventory;
std::multimap<int64, CInv> mapAskFor;
- CNode(SOCKET hSocketIn, CAddress addrIn, bool fInboundIn=false) : vSend(SER_NETWORK, MIN_PROTO_VERSION), vRecv(SER_NETWORK, MIN_PROTO_VERSION)
+ CNode(SOCKET hSocketIn, CAddress addrIn, std::string addrNameIn = "", bool fInboundIn=false) : vSend(SER_NETWORK, MIN_PROTO_VERSION), vRecv(SER_NETWORK, MIN_PROTO_VERSION)
{
nServices = 0;
hSocket = hSocketIn;
@@ -168,6 +168,7 @@ public:
nHeaderStart = -1;
nMessageStart = -1;
addr = addrIn;
+ addrName = addrNameIn == "" ? addr.ToStringIPPort() : addrNameIn;
nVersion = 0;
strSubVer = "";
fClient = false; // set by version message