Url Class
The Url extends ipaddress to store extra information like port, protocol etc. More...
Header: | #include <OSAPI/Network/IpAddress.h> |
Inherits: | IpAddress |
Public Functions
Url() | |
Url(const char *url) | |
const char * | Path() const |
int | Port() const |
const char * | Protocol() const |
Url & | operator=(const char *url) |
- 31 public functions inherited from IpAddress
Detailed Description
The Url extends ipaddress to store extra information like port, protocol etc.
Has methods to decode typical urls like 'http://www.icd.no', 'www.icd.no:80' etc.
Usage, f.ex to get Google's ip-address: Url google = "http://www.google.com";
If a protocol is specified, but no port, the default port for that protocol is used (e.g port 80 for http).
Throws exception if:
- the hostname cannot be determined
- the hostname cannot be looked up
- neither a known protocol nor port is specified
See also IpAddress.
Member Function Documentation
Url::Url()
Constructs an Url.
Url::Url(const char *url)
Constructs an Url with input url.
const char *Url::Path() const
Returns the path of the url.
int Url::Port() const
Returns the port number of the url.
const char *Url::Protocol() const
Returns the protocol of the url.
Url &Url::operator=(const char *url)
Assigns and constructs the class based on url given.
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.