有一台机器登录服务器可以正常连接,但是游戏服务器无法连接。看了一下c++;
void WebSocket::onUIThreadReceiveMessage(WsMessage* msg)这个函数一直进入
WS_MSG_TO_UITHREAD_ERROR。
void WebSocket::onUIThreadReceiveMessage(WsMessage* msg)
{
switch (msg->what) {
case WS_MSG_TO_UITHREAD_OPEN:
{
_delegate->onOpen(this);
}
break;
case WS_MSG_TO_UITHREAD_MESSAGE:
{
Data* data = (Data*)msg->obj;
_delegate->onMessage(this, *data);
CC_SAFE_DELETE_ARRAY(data->bytes);
CC_SAFE_DELETE(data);
}
break;
case WS_MSG_TO_UITHREAD_CLOSE:
{
//Waiting for the subThread safety exit
_wsHelper->joinSubThread();
_delegate->onClose(this);
}
break;
case WS_MSG_TO_UITHREAD_ERROR:
{
// FIXME: The exact error needs to be checked.
WebSocket::ErrorCode err = ErrorCode::CONNECTION_FAILURE;
_delegate->onError(this, err);
}
break;
default:
break;
}
msg的数据是{what:WS_MSG_TO_UITHREAD_ERROR, value:0x00000000};
不知道什么原因一直ErrorCode::timeout。