The delegate class to process socket.io events.
More...
#include <SocketIO.h>
|
virtual | ~SIODelegate () |
| Destructor of SIODelegate. More...
|
|
virtual void | onConnect (SIOClient *client)=0 |
| Pure virtual callback function, this function should be overrided by the subclass. More...
|
|
virtual void | onMessage (SIOClient *client, const std::string &data)=0 |
| Pure virtual callback function, this function should be overrided by the subclass. More...
|
|
virtual void | onClose (SIOClient *client)=0 |
| Pure virtual callback function, this function should be overrided by the subclass. More...
|
|
var | onClose ( var client) |
| Pure virtual callback function, this function should be overrided by the subclass. More...
|
|
virtual void | onError (SIOClient *client, const std::string &data)=0 |
| Pure virtual callback function, this function should be overrided by the subclass. More...
|
|
var | onError ( var client, var data) |
| Pure virtual callback function, this function should be overrided by the subclass. More...
|
|
virtual void | fireEventToScript (SIOClient *client, const std::string &eventName, const std::string &data) |
| Fire event to script when the related SIOClient object receive the fire event signal. More...
|
|
The delegate class to process socket.io events.
virtual void fireEventToScript |
( |
SIOClient * |
client, |
|
|
const std::string & |
eventName, |
|
|
const std::string & |
data |
|
) |
| |
|
inlinevirtual |
Fire event to script when the related SIOClient object receive the fire event signal.
- Parameters
-
client | the connected SIOClient object. |
eventName | the event's name. |
data | the event's data information. |
var fireEventToScript |
( |
var |
client, |
|
|
var |
eventName, |
|
|
var |
data |
|
) |
| |
|
inlinevirtual |
Fire event to script when the related SIOClient object receive the fire event signal.
- Parameters
-
client | the connected SIOClient object. |
eventName | the event's name. |
data | the event's data information. |
Pure virtual callback function, this function should be overrided by the subclass.
This function would be called when the related SIOClient object disconnect or recevie disconnect signal.
- Parameters
-
var onClose |
( |
var |
client | ) |
|
|
pure virtual |
Pure virtual callback function, this function should be overrided by the subclass.
This function would be called when the related SIOClient object disconnect or recevie disconnect signal.
- Parameters
-
Pure virtual callback function, this function should be overrided by the subclass.
This function would be called when the related SIOClient object recevie messages that mean it have connected to endpoint sucessfully.
- Parameters
-
var onConnect |
( |
var |
client | ) |
|
|
pure virtual |
Pure virtual callback function, this function should be overrided by the subclass.
This function would be called when the related SIOClient object recevie messages that mean it have connected to endpoint sucessfully.
- Parameters
-
virtual void onError |
( |
SIOClient * |
client, |
|
|
const std::string & |
data |
|
) |
| |
|
pure virtual |
Pure virtual callback function, this function should be overrided by the subclass.
This function would be called wwhen the related SIOClient object recevie error signal or didn't connect the endpoint but do some network operation,eg.,send and emit,etc.
- Parameters
-
client | the connected SIOClient object. |
data | the error message |
var onError |
( |
var |
client, |
|
|
var |
data |
|
) |
| |
|
pure virtual |
Pure virtual callback function, this function should be overrided by the subclass.
This function would be called wwhen the related SIOClient object recevie error signal or didn't connect the endpoint but do some network operation,eg.,send and emit,etc.
- Parameters
-
client | the connected SIOClient object. |
data | the error message |
virtual void onMessage |
( |
SIOClient * |
client, |
|
|
const std::string & |
data |
|
) |
| |
|
pure virtual |
Pure virtual callback function, this function should be overrided by the subclass.
This function would be called wwhen the related SIOClient object recevie message or json message.
- Parameters
-
client | the connected SIOClient object. |
data | the message,it could be json message |
var onMessage |
( |
var |
client, |
|
|
var |
data |
|
) |
| |
|
pure virtual |
Pure virtual callback function, this function should be overrided by the subclass.
This function would be called wwhen the related SIOClient object recevie message or json message.
- Parameters
-
client | the connected SIOClient object. |
data | the message,it could be json message |
The documentation for this class was generated from the following file:
- /Users/minggo/SourceCode/cocos2d-x/cocos/network/SocketIO.h