From 695b8a4d3023339c420e3de6f4d709b73707440e Mon Sep 17 00:00:00 2001 From: Peter Thorson Date: Tue, 6 Dec 2011 08:44:34 -0600 Subject: [PATCH] adds get_port_str to URI --- src/uri.cpp | 6 ++++++ src/uri.hpp | 1 + 2 files changed, 7 insertions(+) diff --git a/src/uri.cpp b/src/uri.cpp index 28070b969b..e3c8a0ec32 100644 --- a/src/uri.cpp +++ b/src/uri.cpp @@ -122,6 +122,12 @@ uint16_t uri::get_port() const { return m_port; } +std::string uri::get_port_str() const { + std::stringstream p; + p << m_port; + return p.str(); +} + std::string uri::get_resource() const { return m_resource; } diff --git a/src/uri.hpp b/src/uri.hpp index 6061303abf..935c65cc99 100644 --- a/src/uri.hpp +++ b/src/uri.hpp @@ -65,6 +65,7 @@ public: bool get_secure() const; std::string get_host() const; uint16_t get_port() const; + std::string get_port_str() const; std::string get_resource() const; std::string str() const;