summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/Url.h
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-01-31 23:14:49 +0000
committerAlan Conway <aconway@apache.org>2008-01-31 23:14:49 +0000
commitd4ccea4185f111970d8bb6144040caa0402720d9 (patch)
treeea1aee1f35b47bd03d99b754a65d2fe7589fcc65 /cpp/src/qpid/Url.h
parentf1ba7709347e5282438dbec5bed5e55c861092cd (diff)
downloadqpid-python-d4ccea4185f111970d8bb6144040caa0402720d9.tar.gz
Generate URLs for local host.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@617286 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/Url.h')
-rw-r--r--cpp/src/qpid/Url.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/cpp/src/qpid/Url.h b/cpp/src/qpid/Url.h
index 0cf54c493e..5cdd30399b 100644
--- a/cpp/src/qpid/Url.h
+++ b/cpp/src/qpid/Url.h
@@ -52,6 +52,14 @@ typedef boost::variant<TcpAddress> Address;
/** An AMQP URL contains a list of addresses */
struct Url : public std::vector<Address> {
+
+ /** Url with the hostname as returned by gethostname(2) */
+ static Url getHostnameUrl(uint16_t port);
+
+ /** Url with local IP address(es), may be more than one address
+ * on a multi-homed host. */
+ static Url getIpAddressesUrl(uint16_t port);
+
struct InvalidUrl : public Exception {
InvalidUrl(const std::string& s) : Exception(s) {}
};