【原】cocos2d-x 2.0.4 不支持https协议 CURLE_UNSUPPORTED_PROTOCOL - Androider123

Datetime:2017-02-03 09:35:38         Topic: Cocos2d-X          Share        Original >>
Here to See The Original Article!!!

bool configureCURL(CURL *handle)
{
	if (!handle) {
		return false;
	}
	
	int32_t code;
	code = curl_easy_setopt(handle, CURLOPT_ERRORBUFFER, s_errorBuffer);
	if (code != CURLE_OK) {
		return false;
	}
	code = curl_easy_setopt(handle, CURLOPT_TIMEOUT, CCHttpClient::getInstance()->getTimeoutForRead());
	if (code != CURLE_OK) {
		return false;
	}
	code = curl_easy_setopt(handle, CURLOPT_CONNECTTIMEOUT, CCHttpClient::getInstance()->getTimeoutForConnect());
	if (code != CURLE_OK) {
		return false;
	}
	
	//@TODO: gy
	code = curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 0L);
	if (code != CURLE_OK) {
		return false;
	}
	
	return true;
}







New