diff options
Diffstat (limited to 'include/Uri')
-rw-r--r-- | include/Uri/Uri.hpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/Uri/Uri.hpp b/include/Uri/Uri.hpp index fb1e5c8..4907aaf 100644 --- a/include/Uri/Uri.hpp +++ b/include/Uri/Uri.hpp @@ -10,6 +10,7 @@ */ #include <memory> +#include <stdint.h> #include <string> #include <vector> @@ -84,6 +85,29 @@ namespace Uri { */ std::vector< std::string > GetPath() const; + /** + * This method returns an indication of whether or not the + * URI includes a port number. + * + * @return + * An indication of whether or not the + * URI includes a port number is returned. + */ + bool HasPort() const; + + /** + * This method returns the port number element of the URI, + * if it has one. + * + * @return + * The port number element of the URI is returned. + * + * @note + * The returned port number is only valid if the + * HasPort method returns true. + */ + uint16_t GetPort() const; + // Private properties private: /** |