A single connection to a socket.io endpoint. More...
Inherits Ref.
Public Member Functions | |
SocketIO::SIODelegate * | getDelegate () |
Get the delegate for the client. More... | |
void | disconnect () |
Disconnect from the endpoint, onClose will be called for the delegate when complete. | |
void | send (const std::string &s) |
Send a message to the socket.io server. More... | |
var | send ( var s) |
Send a message to the socket.io server. More... | |
void | emit (const std::string &eventname, const std::string &args) |
Emit the eventname and the args to the endpoint that _path point to. More... | |
var | emit ( var eventname, var args) |
Emit the eventname and the args to the endpoint that _path point to. More... | |
void | on (const std::string &eventName, SIOEvent e) |
Used to register a socket.io event callback. More... | |
void | setTag (const char *tag) |
Set tag of SIOClient. More... | |
const char * | getTag () |
Get tag of SIOClient. More... | |
var | getTag () |
Get tag of SIOClient. More... | |
Public Member Functions inherited from Ref | |
void | retain () |
Retains the ownership. More... | |
void | release () |
Releases the ownership immediately. More... | |
local | release () |
Releases the ownership immediately. More... | |
Ref * | autorelease () |
Releases the ownership sometime soon automatically. More... | |
unsigned int | getReferenceCount () const |
Returns the Ref's current reference count. More... | |
local | getReferenceCount () |
Returns the Ref's current reference count. More... | |
virtual | ~Ref () |
Destructor. More... | |
Additional Inherited Members | |
Public Attributes inherited from Ref | |
unsigned int | _ID |
object id, ScriptSupport need public _ID | |
local | _ID |
object id, ScriptSupport need public _ID | |
int | _luaID |
Lua reference id. | |
local | _luaID |
Lua reference id. | |
void * | _scriptObject |
scriptObject, support for swift | |
local | _scriptObject |
scriptObject, support for swift | |
bool | _rooted |
When true, it means that the object was already rooted. | |
local | _rooted |
When true, it means that the object was already rooted. | |
A single connection to a socket.io endpoint.
|
inline |
Get the delegate for the client.
|
inline |
Get the delegate for the client.
void send | ( | const std::string & | s | ) |
Send a message to the socket.io server.
s | message. |
var send | ( | var | s | ) |
Send a message to the socket.io server.
s | message. |
void emit | ( | const std::string & | eventname, |
const std::string & | args | ||
) |
Emit the eventname and the args to the endpoint that _path point to.
eventname | |
args |
var emit | ( | var | eventname, |
var | args | ||
) |
Emit the eventname and the args to the endpoint that _path point to.
eventname | |
args |
void on | ( | const std::string & | eventName, |
SIOEvent | e | ||
) |
Used to register a socket.io event callback.
Event argument should be passed using CC_CALLBACK2(&Base::function, this).
eventName | the name of event. |
e | the callback function. |
var on | ( | var | eventName, |
var | e | ||
) |
Used to register a socket.io event callback.
Event argument should be passed using CC_CALLBACK2(&Base::function, this).
eventName | the name of event. |
e | the callback function. |
void setTag | ( | const char * | tag | ) |
var setTag | ( | var | tag | ) |
|
inline |
Get tag of SIOClient.
|
inline |
Get tag of SIOClient.