标签:gets received row cocos nbsp sse socket href data
cocos 依赖的三方库涉及到 IPV6 问题的库为 curl, websocket, cocos 自己提供的模块需要适配的有:
如果你需要支持纯IPv6网络,只需要更新CURL和libwebsocket网络。
拷贝解压出来的文件夹中的 curl 目录到cocos2d-x/external, 替换原来的 curl目录. 如果编译报错,则:
在 XCode 项目输找到 cocos2d_lib > external > curl > ios 目录上右键, 选择 Add Files to ‘cocos2d_lib.xcodeproj‘:

选中 libcrypto.a 和 libssl.a, targets 选择 libcocos2d iOS, 确定, 重新编译, 搞定.
和 curl 类似, 拷贝 cocos2d-x-3rd-party-libs 中的 websockets 目录到 cocos2d-x/external, 替换原来的 websockets 目录.
因为最新版的 websockets api 变化挺大, 所以我们需要使用 cocos 最新的WebSocket.h 和 WebSocket.cpp 替换 cocos2d-x/cocos/network 中的 WebSocket .
编译, 会有一处错误发生在 WebSocket::WebSocket() 中, 是和 Director::EVENT_RESET 相关的消息, 我们注释掉这段代码即可.
{
|
标签:gets received row cocos nbsp sse socket href data
原文地址:http://www.cnblogs.com/ab0016/p/6751899.html