mirror of https://github.com/axmolengine/axmol.git
adds initializing value and corrects spelling of variable _endpointseparator
Signed-off-by: Chris Hannon <chris@channon.us>
This commit is contained in:
parent
e7c2436d85
commit
bd7f90f993
|
@ -84,7 +84,7 @@ protected:
|
|||
std::string _name;//event name
|
||||
std::vector<std::string> _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<std::string> _types;//types of messages
|
||||
|
@ -101,7 +101,7 @@ private:
|
|||
std::vector<std::string> _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");
|
||||
|
|
Loading…
Reference in New Issue