mirror of https://github.com/axmolengine/axmol.git
Merge pull request #16194 from minggo/socketio-issue
get correct control code
This commit is contained in:
commit
e3f6a16da7
|
@ -877,9 +877,8 @@ void SIOClientImpl::onMessage(WebSocket* ws, const WebSocket::Data& data)
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
{
|
{
|
||||||
const char second = payload.at(0);
|
int control2 = payload.at(0) - '0';
|
||||||
int control2 = atoi(&second);
|
CCLOGINFO("Message code: [%i]", control2);
|
||||||
CCLOGINFO("Message code: [%i]", control);
|
|
||||||
|
|
||||||
SocketIOPacket *packetOut = SocketIOPacket::createPacketWithType("event", _version);
|
SocketIOPacket *packetOut = SocketIOPacket::createPacketWithType("event", _version);
|
||||||
std::string endpoint = "";
|
std::string endpoint = "";
|
||||||
|
|
Loading…
Reference in New Issue