diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2012-05-30 22:44:23 +0200 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2012-06-14 17:37:15 +0200 |
commit | 1e8aeae15a300eca107752d6ef52fa0f5c2410c3 (patch) | |
tree | b9c8e59dc0756bfb386ddb82b20a4648c0216c6e /src/netbase.h | |
parent | d59bce21e5dbb0a15051e40d5dd717fd7bf982d8 (diff) |
Improve parsing of IPv6 addresses
Implement the following rules:
* Interpret [X]:Y as host=X port=Y, if Y is an integer
* Interpret X:Y as host=X port=Y, if Y is an integer and X contains no colon
* Interpret X:Y as host=X:Y port=default otherwise
Diffstat (limited to 'src/netbase.h')
-rw-r--r-- | src/netbase.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/netbase.h b/src/netbase.h index 0f6fc9b499..878ac986b6 100644 --- a/src/netbase.h +++ b/src/netbase.h @@ -133,6 +133,7 @@ class CService : public CNetAddr }; enum Network ParseNetwork(std::string net); +void SplitHostPort(std::string in, int &portOut, std::string &hostOut); bool SetProxy(enum Network net, CService addrProxy, int nSocksVersion = 5); bool GetProxy(enum Network net, CService &addrProxy); bool IsProxy(const CNetAddr &addr); |