A single connection to a socket.io endpoint. More...
#include <SocketIO.h>
Public Member Functions | |
SIOClient (const std::string &host, int port, const std::string &path, SIOClientImpl *impl, SocketIO::SIODelegate &delegate) | |
Construtor of SIOClient class. More... | |
virtual | ~SIOClient (void) |
Destructior of SIOClient class. More... | |
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. More... | |
void | send (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 (std::string eventname, 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... | |
Ref * | autorelease () |
Releases the ownership sometime soon automatically. More... | |
unsigned int | getReferenceCount () const |
Returns the Ref's current reference count. More... | |
virtual | ~Ref () |
Destructor. More... | |
Friends | |
class | SIOClientImpl |
Additional Inherited Members | |
Protected Member Functions inherited from Ref | |
Ref () | |
Constructor. More... | |
Ref () | |
Constructor. More... | |
Protected Attributes inherited from Ref | |
unsigned int | _referenceCount |
count of references More... | |
local | _referenceCount |
count of references More... | |
A single connection to a socket.io endpoint.
SIOClient | ( | const std::string & | host, |
int | port, | ||
const std::string & | path, | ||
SIOClientImpl * | impl, | ||
SocketIO::SIODelegate & | delegate | ||
) |
Construtor of SIOClient class.
host | the string that represent the host address. |
port | the int value represent the port number. |
path | the string that represent endpoint. |
impl | the SIOClientImpl object. |
delegate | the SIODelegate object. |
var SIOClient | ( | var | host, |
var | port, | ||
var | path, | ||
var | impl, | ||
var | delegate | ||
) |
Construtor of SIOClient class.
host | the string that represent the host address. |
port | the int value represent the port number. |
path | the string that represent endpoint. |
impl | the SIOClientImpl object. |
delegate | the SIODelegate object. |
void disconnect | ( | ) |
Disconnect from the endpoint, onClose will be called for the delegate when complete.
var disconnect | ( | ) |
Disconnect from the endpoint, onClose will be called for the delegate when complete.
void emit | ( | std::string | eventname, |
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 |
|
inline |
Get the delegate for the client.
|
inline |
Get the delegate for the client.
|
inline |
Get tag of SIOClient.
|
inline |
Get tag of SIOClient.
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. | |
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. | |
e | the callback function. |
void send | ( | 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. |
|
inline |
|
inline |
|
friend |
|
friend |