From afdab77790e8db165b43e9ab34cb26313b067856 Mon Sep 17 00:00:00 2001 From: Erik Prabowo Kamal Date: Tue, 27 Aug 2019 08:28:24 +0800 Subject: Added rtclient module --- rtclient.c | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 rtclient.c (limited to 'rtclient.c') diff --git a/rtclient.c b/rtclient.c deleted file mode 100644 index 1be0579..0000000 --- a/rtclient.c +++ /dev/null @@ -1,33 +0,0 @@ -#ifdef DEBUG -#ifdef ANDROID -#include -#else -#include -#endif // ANDROID -#endif // DEBUG -#include -#include -#include "rtclient.h" - -static CURL *handle = NULL; - -bool rtclient_init() -{ - curl_global_init(CURL_GLOBAL_SSL); - handle = curl_easy_init(); - if (handle) { - curl_easy_setopt(handle, CURLOPT_FOLLOWLOCATION, 1L); -#ifdef DEBUG - curl_easy_setopt(handle, CURLOPT_VERBOSE, 1L); -#endif - } - - return (bool)handle; -} - -void rtclient_cleanup() -{ - if (handle) - curl_easy_cleanup(handle); - curl_global_cleanup(); -} -- cgit v1.2.3