Functions | |
| bool | hasInternetConnection () |
| Checks if there is an internet connection. | |
| std::tuple< bool, std::string, std::optional< TimePoint_System_Millisecond > > | checkInternetConnectionAndGetGMTTime (bool forceRefresh=false) |
| Checks internet connection and gets GMT time. | |
| std::vector< uint8_t > | curlDownloadNoBody (const std::string &url, uint32_t timeout_ms=0, long *httpResponseCode=nullptr) |
| Downloads data from a URL without the body. | |
| std::vector< uint8_t > | curlDownload (const std::string &url, uint32_t timeout_ms=0, long *httpResponseCode=nullptr) |
| Downloads data from a URL. | |
| std::string | curlDownloadContentAsString (const std::string &url, uint32_t timeout_ms=0, long *httpResponseCode=nullptr) |
| Downloads content from a URL as a string. | |
| int | udpSendData (const std::string &sessionName, const uint8_t *data, uint32_t bufferLength, const std::string &targetIP, uint16_t targetPoint, std::optional< uint16_t > sourcePort=std::nullopt) |
| Sends data over UDP. | |
| std::tuple< bool, std::string, std::optional< TimePoint_System_Millisecond > > SystemTools::Net::checkInternetConnectionAndGetGMTTime | ( | bool | forceRefresh = false | ) |
Checks internet connection and gets GMT time.
| forceRefresh | Whether to force refresh the connection check. |
| std::vector< uint8_t > SystemTools::Net::curlDownload | ( | const std::string & | url, |
| uint32_t | timeout_ms = 0, |
||
| long * | httpResponseCode = nullptr |
||
| ) |
Downloads data from a URL.
| url | The URL to download from. |
| timeout_ms | The timeout in milliseconds. |
| httpResponseCode | Optional pointer to store the HTTP response code. |
| std::string SystemTools::Net::curlDownloadContentAsString | ( | const std::string & | url, |
| uint32_t | timeout_ms = 0, |
||
| long * | httpResponseCode = nullptr |
||
| ) |
Downloads content from a URL as a string.
| url | The URL to download from. |
| timeout_ms | The timeout in milliseconds. |
| httpResponseCode | Optional pointer to store the HTTP response code. |
| std::vector< uint8_t > SystemTools::Net::curlDownloadNoBody | ( | const std::string & | url, |
| uint32_t | timeout_ms = 0, |
||
| long * | httpResponseCode = nullptr |
||
| ) |
Downloads data from a URL without the body.
| url | The URL to download from. |
| timeout_ms | The timeout in milliseconds. |
| httpResponseCode | Optional pointer to store the HTTP response code. |
| bool SystemTools::Net::hasInternetConnection | ( | ) |
Checks if there is an internet connection.
| int SystemTools::Net::udpSendData | ( | const std::string & | sessionName, |
| const uint8_t * | data, | ||
| uint32_t | bufferLength, | ||
| const std::string & | targetIP, | ||
| uint16_t | targetPoint, | ||
| std::optional< uint16_t > | sourcePort = std::nullopt |
||
| ) |
Sends data over UDP.
| sessionName | The session name. |
| data | The data to send. |
| bufferLength | The length of the data buffer. |
| targetIP | The target IP address. |
| targetPoint | The target port number. |
| sourcePort | Optional source port number. |