cocos2d-x  3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SocketIO Class Reference

Singleton and wrapper class to provide static creation method as well as registry of all sockets. More...

#include <SocketIO.h>

Classes

class  SIODelegate
 The delegate class to process socket.io events. More...
 

Static Public Member Functions

static SocketIOgetInstance ()
 Get instance of SocketIO. More...
 
var getInstance ()
 Get instance of SocketIO. More...
 
static void destroyInstance ()
var destroyInstance ()
static SIOClientconnect (const std::string &uri, SocketIO::SIODelegate &delegate)
 Static client creation method, similar to socketio.connect(uri) in JS. More...
 
static SIOClientconnect (SocketIO::SIODelegate &delegate, const std::string &uri)
 Static client creation method, similar to socketio.connect(uri) in JS. More...
 

Friends

class SIOClientImpl

Detailed Description

Singleton and wrapper class to provide static creation method as well as registry of all sockets.

Member Function Documentation

static SIOClient* connect ( const std::string &  uri,
SocketIO::SIODelegate delegate 
)
static

Static client creation method, similar to socketio.connect(uri) in JS.

Parameters
urithe URI of the socket.io server.
delegatethe delegate which want to receive events from the socket.io client.
Returns
SIOClient* an initialized SIOClient if connected successfully, otherwise nullptr.
var connect ( var  uri,
var  delegate 
)
static

Static client creation method, similar to socketio.connect(uri) in JS.

Parameters
urithe URI of the socket.io server.
delegatethe delegate which want to receive events from the socket.io client.
Returns
SIOClient* an initialized SIOClient if connected successfully, otherwise nullptr.
static SIOClient* connect ( SocketIO::SIODelegate delegate,
const std::string &  uri 
)
static

Static client creation method, similar to socketio.connect(uri) in JS.

Parameters
delegatethe delegate which want to receive events from the socket.io client.
urithe URI of the socket.io server.
Returns
SIOClient* an initialized SIOClient if connected successfully, otherwise nullptr.
var connect ( var  delegate,
var  uri 
)
static

Static client creation method, similar to socketio.connect(uri) in JS.

Parameters
delegatethe delegate which want to receive events from the socket.io client.
urithe URI of the socket.io server.
Returns
SIOClient* an initialized SIOClient if connected successfully, otherwise nullptr.
static void destroyInstance ( )
static
var destroyInstance ( )
static
static SocketIO* getInstance ( )
static

Get instance of SocketIO.

Returns
SocketIO* the instance of SocketIO.
var getInstance ( )
static

Get instance of SocketIO.

Returns
SocketIO* the instance of SocketIO.

Friends And Related Function Documentation

friend class SIOClientImpl
friend
var SIOClientImpl
friend

The documentation for this class was generated from the following file: