Cocos2d-x  v3.10
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups
SocketIO Class Reference

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

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 ()
 Destroy the instance of SocketIO.
 
var destroyInstance ()
 Destroy the instance of SocketIO.
 
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...
 

Detailed Description

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

Member Function Documentation

static SocketIO* getInstance ( )
static

Get instance of SocketIO.

the instance of SocketIO.

var getInstance ( )
static

Get instance of SocketIO.

the instance of SocketIO.

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

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

the URI of the socket.io server. the delegate which want to receive events from the socket.io client. 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.

the URI of the socket.io server. the delegate which want to receive events from the socket.io client. 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.

the delegate which want to receive events from the socket.io client. the URI of the socket.io server. 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.

the delegate which want to receive events from the socket.io client. the URI of the socket.io server. an initialized SIOClient if connected successfully, otherwise nullptr.


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