diff --git a/cocos/network/SocketIO.cpp b/cocos/network/SocketIO.cpp index fdce6eb210..7aade376a0 100644 --- a/cocos/network/SocketIO.cpp +++ b/cocos/network/SocketIO.cpp @@ -84,7 +84,7 @@ protected: std::string _name;//event name std::vector _args;//we will be using a vector of strings to store multiple data std::string _endpoint;// - std::string _endpointseperator;//socket.io 1.x requires a ',' between endpoint and payload + std::string _endpointseparator;//socket.io 1.x requires a ',' between endpoint and payload std::string _type;//message type std::string _separator;//for stringify the object std::vector _types;//types of messages @@ -101,7 +101,7 @@ private: std::vector _typesMessage; }; -SocketIOPacket::SocketIOPacket() :_separator(":") +SocketIOPacket::SocketIOPacket() :_separator(":"), _endpointseparator("") { _types.push_back("disconnect"); _types.push_back("connect"); @@ -149,7 +149,7 @@ std::string SocketIOPacket::toString()const // Add the endpoint for the namespace to be used if not the default namespace "" or "/", and as long as it is not an ACK, heartbeat, or disconnect packet if (_endpoint != "/" && _endpoint != "" && _type != "ack" && _type != "heartbeat" && _type != "disconnect") { - encoded << _endpoint << _endpointseperator; + encoded << _endpoint << _endpointseparator; } encoded << this->_separator; @@ -231,7 +231,7 @@ std::string SocketIOPacket::stringify()const SocketIOPacketV10x::SocketIOPacketV10x() { _separator = ""; - _endpointseperator = ","; + _endpointseparator = ","; _types.push_back("disconnected"); _types.push_back("connected"); _types.push_back("heartbeat");