A single connection to a socket.io endpoint.
More...
Inherits Ref.
|
SocketIO::SIODelegate * | getDelegate () |
| Get the delegate for the client.
|
|
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.
|
|
void | emit (const std::string &eventname, const std::string &args) |
| Emit the eventname and the args to the endpoint that _path point to.
|
|
void | on (const std::string &eventName, SIOEvent e) |
| Used to register a socket.io event callback.
|
|
void | setTag (const char *tag) |
| Set tag of SIOClient.
|
|
const char * | getTag () |
| Get tag of SIOClient.
|
|
void | retain () |
| Retains the ownership.
|
|
void | release () |
| Releases the ownership immediately.
|
|
Ref * | autorelease () |
| Releases the ownership sometime soon automatically.
|
|
unsigned int | getReferenceCount () const |
| Returns the Ref's current reference count.
|
|
virtual | ~Ref () |
| Destructor.
|
|
|
unsigned int | _ID |
| object id, ScriptSupport need public _ID
|
|
int | _luaID |
| Lua reference id.
|
|
void * | _scriptObject |
| scriptObject, support for swift
|
|
bool | _rooted |
| When true, it means that the object was already rooted.
|
|
A single connection to a socket.io endpoint.
NA
Get the delegate for the client.
- Returns
- the delegate object for the client
void send |
( |
const std::string & |
s | ) |
|
Send a message to the socket.io server.
- Parameters
-
void emit |
( |
const std::string & |
eventname, |
|
|
const std::string & |
args |
|
) |
| |
Emit the eventname and the args to the endpoint that _path point to.
- Parameters
-
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).
- Parameters
-
eventName | the name of event. |
e | the callback function. |
void setTag |
( |
const char * |
tag | ) |
|
Set tag of SIOClient.
The tag is used to distinguish the various SIOClient objects.
- Parameters
-
Get tag of SIOClient.
- Returns
- const char* the pointer point to the _tag.
The documentation for this class was generated from the following file: