IPv6-only的问题

我用的是域名访问,是不是除了80端口不能访问,我看了苹果的截图,能过我用curl访问第三方服务器进行登陆是可以的,但是用http登陆我的服务器,好像是连接超时或错误。我是2000端口。

可以确定了,和引擎没关系,2000端口苹果审核网络不能访问!改了端口就进去了

大神,是不是直接【cocos2d-x-3rd-party-libs-bin-2-deps-7】文件夹下面的文件夹,合并到原来的目录?
合并以后出错啊
Undefined symbols for architecture arm64:
“_MD4_Update”, referenced from:
_Curl_ntlm_core_mk_nt_hash in libcurl.a(libcurl_la-curl_ntlm_core.o)
“_MD4_Final”, referenced from:
_Curl_ntlm_core_mk_nt_hash in libcurl.a(libcurl_la-curl_ntlm_core.o)
“_DES_set_key”, referenced from:
_Curl_ntlm_core_lm_resp in libcurl.a(libcurl_la-curl_ntlm_core.o)
_Curl_ntlm_core_mk_lm_hash in libcurl.a(libcurl_la-curl_ntlm_core.o)
“_DES_ecb_encrypt”, referenced from:
_Curl_ntlm_core_lm_resp in libcurl.a(libcurl_la-curl_ntlm_core.o)
_Curl_ntlm_core_mk_lm_hash in libcurl.a(libcurl_la-curl_ntlm_core.o)
“_UI_method_get_writer”, referenced from:
_ssl_ui_writer in libcurl.a(libcurl_la-openssl.o)
“_UI_get_string_type”, referenced from:
_ssl_ui_reader in libcurl.a(libcurl_la-openssl.o)
_ssl_ui_writer in libcurl.a(libcurl_la-openssl.o)
“_UI_get0_user_data”, referenced from:
_ssl_ui_reader in libcurl.a(libcurl_la-openssl.o)

typedef struct _AsyncHttpQueueItem
{
int LuaHandle;
int error;
int whichThread;
std::string url;
std::string param;
std::string respond;
bool removeRef;

_AsyncHttpQueueItem()
	:LuaHandle(0)
	,error(0)
	,whichThread(0)
	,url("")
	,param("")
	,respond("")
    ,removeRef(true)
{

};
~_AsyncHttpQueueItem()
{

}

}AsyncHttpQueueItem;

void* asyncPostFunction(void* data)
{
CCThread thread;
thread.createAutoreleasePool();

AsyncHttpQueueItem* item = (AsyncHttpQueueItem*) data;

int error = -1;
CURL*		curl;
curl = curl_easy_init();
std::string httpContent;
if (curl && !item->url.empty()) 
{
	curl_easy_setopt(curl, CURLOPT_URL, item->url.c_str());
	curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &getHttpContent);
	curl_easy_setopt(curl, CURLOPT_WRITEDATA, &httpContent);
	curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, g_curlTimeOut);
	curl_easy_setopt(curl, CURLOPT_POST, 1L);
	curl_easy_setopt(curl, CURLOPT_POSTFIELDS, item->param.c_str());
	curl_easy_setopt(curl, CURLOPT_TIMEOUT_MS, g_curlOperationTimeOut);
	curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1L);
	curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION,1L);
	error = curl_easy_perform(curl);
	if (error == CURLE_OK )
	{
		long responseCode = 0;
		CURLcode code = curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &responseCode);
		if(responseCode != 200)
		{
			error = -responseCode;
		}
	}
}
if(curl)
	curl_easy_cleanup(curl);
s_post_httpHandle[item->whichThread] = 0;
CCAsyncHttpRequest::sharedManager()->pushHttpRespond(item->url.c_str(), item->LuaHandle, error, httpContent);
delete item;
return 0;

}

我替换了提供的地址下载最新的2.x版本的 libcurl,但是 error= curl_easy_perform(url)这段 始终无法在v6环境下访问,返回值一直是28后跟几次7.
之前看到有人说libcurl要支持ipv6,需要在编译的时候打开相应选项,但不知道这个地址下载的是否需要重新编译

Receiving data:index:139, len=89
Receiving data:index:140, len=49
Receiving data:index:141, len=89
Notify data len 89 to Cocos thread.
Notify data len 49 to Cocos thread.
Notify data len 89 to Cocos thread.
Receiving data:index:142, len=1023
ERR: lws_rx_sm: doing draining flow

@minggo,我遇到了这个问题。 差不多10次出现1-2次的样子,不稳定。求解,谢谢!
cocos2d-js v3.10 更新了 补丁的v104的curl和websocket。

我也遇到了相同的问题,请问你是怎么解决的?

@minggo 您好,windows 版本下的 lws_config.h 文件上传到哪了?

请问你这个连接库的问题怎么解决的?

@526596523 在这里啊:https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin/tree/v3/websockets/include/win32

@yaoqiang_cc 可以关注这个issue: https://github.com/cocos2d/cocos2d-x/issues/15767

现在更新了curl的库后 只能通过域名来访问了吗?求解答 很重要

quick cocos2d 2.26版本
我按照博主方法在ios能编译通过
但是编译安卓 运行build_native.sh,报错误如下

websocket 有解决支持吗? 3.9版本替换了3.11.1的第三方库及 network用的websocket 后 IPV6支持,用4G 却建不起连接, 是否要一开始判断是域名还是IP?

朋友你解决了吗?我也遇到相同的问题