fixes bug in socketio extension when connecting to socketio servers v1+ (incorrect separator in v1 packet strings)

Signed-off-by: Chris Hannon <chris@channon.us>
This commit is contained in:
Chris Hannon 2015-09-19 20:31:48 -04:00
parent cf342a830a
commit e7c2436d85
2 changed files with 3 additions and 3 deletions

View File

@ -230,7 +230,7 @@ std::string SocketIOPacket::stringify()const
SocketIOPacketV10x::SocketIOPacketV10x() SocketIOPacketV10x::SocketIOPacketV10x()
{ {
_separator = ":"; _separator = "";
_endpointseperator = ","; _endpointseperator = ",";
_types.push_back("disconnected"); _types.push_back("disconnected");
_types.push_back("connected"); _types.push_back("connected");

View File

@ -195,7 +195,7 @@ void SocketIOTest::closedSocketAction(network::SIOClient* client)
void SocketIOTest::onMenuSIOClientClicked(cocos2d::Ref *sender) void SocketIOTest::onMenuSIOClientClicked(cocos2d::Ref *sender)
{ {
//create a client by using this static method, url does not need to contain the protocol //create a client by using this static method, url does not need to contain the protocol
_sioClient = SocketIO::connect("ws://dev.channon.us:3010", *this); _sioClient = SocketIO::connect("ws://localhost:3010", *this);
//you may set a tag for the client for reference in callbacks //you may set a tag for the client for reference in callbacks
_sioClient->setTag("Test Client"); _sioClient->setTag("Test Client");
@ -212,7 +212,7 @@ void SocketIOTest::onMenuSIOClientClicked(cocos2d::Ref *sender)
void SocketIOTest::onMenuSIOEndpointClicked(cocos2d::Ref *sender) void SocketIOTest::onMenuSIOEndpointClicked(cocos2d::Ref *sender)
{ {
//repeat the same connection steps for the namespace "testpoint" //repeat the same connection steps for the namespace "testpoint"
_sioEndpoint = SocketIO::connect("ws://dev.channon.us:3010/testpoint", *this); _sioEndpoint = SocketIO::connect("ws://localhost:3010/testpoint", *this);
//a tag to differentiate in shared callbacks //a tag to differentiate in shared callbacks
_sioEndpoint->setTag("Test Endpoint"); _sioEndpoint->setTag("Test Endpoint");