implement cloud browser
This commit is contained in:
@@ -4,13 +4,6 @@
|
||||
|
||||
LogRemote LogRemote::I;
|
||||
|
||||
static size_t data_handler(void *contents, size_t size, size_t nmemb, void *userp)
|
||||
{
|
||||
auto buffer = reinterpret_cast<std::string*>(userp);
|
||||
buffer->append((char*)contents, size * nmemb);
|
||||
return size * nmemb;
|
||||
}
|
||||
|
||||
void LogRemote::start()
|
||||
{
|
||||
if (m_running || m_error)
|
||||
@@ -43,7 +36,7 @@ void LogRemote::net_init()
|
||||
return;
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &this->readBuffer);
|
||||
//curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, data_handler);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_data_handler);
|
||||
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 5L);
|
||||
}
|
||||
std::string LogRemote::net_request(std::string cmd, std::string data /*= ""*/)
|
||||
|
||||
Reference in New Issue
Block a user