![]() |
Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
|
Network functions More...
Functions | |
bool | kodi::network::WakeOnLan (const std::string &mac) |
Send WakeOnLan magic packet. More... | |
std::string | kodi::network::GetIPAddress () |
To the current own ip address as a string. More... | |
std::string | kodi::network::URLEncode (const std::string &url) |
URL encodes the given string. More... | |
bool | kodi::network::DNSLookup (const std::string &hostName, std::string &ipAddress) |
Lookup URL in DNS cache. More... | |
Network functions
The network module offers functions that allow you to control it.
It has the header #include <kodi/Network.h> be included to enjoy it.
|
inline |
Lookup URL in DNS cache.
This test will get DNS record for a domain. The DNS lookup is done directly against the domain's authoritative name server, so changes to DNS Records should show up instantly. By default, the DNS lookup tool will return an IP address if you give it a name (e.g. www.example.com)
[in] | hostName | The code of the message to get. |
[out] | ipAddress | Returned address |
Example:
|
inline |
To the current own ip address as a string.
Example:
|
inline |
URL encodes the given string.
This function converts the given input string to a URL encoded string and returns that as a new allocated string. All input characters that are not a-z, A-Z, 0-9, '-', '.', '_' or '~' are converted to their "URL escaped" version (NN where NN is a two-digit hexadecimal number).
[in] | url | The code of the message to get. |
Example:
For example, the string: François ,would be encoded as: FranC3A7ois
|
inline |
Send WakeOnLan magic packet.
[in] | mac | Network address of the host to wake. |