diff options
author | Thilo Cestonaro <thilo@cestona.ro> | 2011-04-14 08:25:33 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-04-18 19:11:45 (GMT) |
commit | 427db871922a028bb299dd66c37f3cca4010fd47 (patch) | |
tree | 95c0c4bb407a5fd3ec49c138ec5fbff8cf3a7d7a /Swiften/Network/HostAddressPort.h | |
parent | 0b0164a4cdae89afc254bd7aa6f14af81c6b9196 (diff) | |
download | swift-contrib-427db871922a028bb299dd66c37f3cca4010fd47.zip swift-contrib-427db871922a028bb299dd66c37f3cca4010fd47.tar.bz2 |
Support for SOCKS5 and HTTPConnect proxies.
automatic proxy settings detection;
SOCKS5 proxied connection;
HTTPConnect proxied connection;
License: This patch is BSD-licensed, see http://www.opensource.org/licenses/bsd-license.php
Diffstat (limited to 'Swiften/Network/HostAddressPort.h')
-rw-r--r-- | Swiften/Network/HostAddressPort.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Swiften/Network/HostAddressPort.h b/Swiften/Network/HostAddressPort.h index c99ca65..5655f4d 100644 --- a/Swiften/Network/HostAddressPort.h +++ b/Swiften/Network/HostAddressPort.h @@ -7,6 +7,7 @@ #pragma once #include <boost/asio/ip/tcp.hpp> +#include <boost/lexical_cast.hpp> #include "Swiften/Network/HostAddress.h" @@ -37,6 +38,10 @@ namespace Swift { bool isValid() const { return address_.isValid() && port_ > 0; } + + std::string toString() const { + return getAddress().toString() + ":" + boost::lexical_cast<std::string>(getPort()); + } private: HostAddress address_; |