The delegate class to process socket.io events.
More...
|
virtual | ~SIODelegate () |
| Destructor of SIODelegate. More...
|
|
virtual void | onConnect (SIOClient *client) |
| This is kept for backwards compatibility, connect is now fired as a socket.io event "connect". More...
|
|
virtual void | onMessage (SIOClient *client, const std::string &data) |
| This is kept for backwards compatibility, message is now fired as a socket.io event "message". More...
|
|
var | onMessage ( var client, var data) |
| This is kept for backwards compatibility, message is now fired as a socket.io event "message". More...
|
|
virtual void | onClose (SIOClient *client)=0 |
| Pure virtual callback function, this function should be overridden by the subclass. More...
|
|
var | onClose ( var client) |
| Pure virtual callback function, this function should be overridden by the subclass. More...
|
|
virtual void | onError (SIOClient *client, const std::string &data)=0 |
| Pure virtual callback function, this function should be overridden by the subclass. More...
|
|
var | onError ( var client, var data) |
| Pure virtual callback function, this function should be overridden 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.
This is kept for backwards compatibility, connect is now fired as a socket.io event "connect".
This function would be called when the related SIOClient object receive messages that mean it have connected to endpoint successfully.
- Parameters
-
var onConnect |
( |
var |
client | ) |
|
|
inlinevirtual |
This is kept for backwards compatibility, connect is now fired as a socket.io event "connect".
This function would be called when the related SIOClient object receive messages that mean it have connected to endpoint successfully.
- Parameters
-
virtual void onMessage |
( |
SIOClient * |
client, |
|
|
const std::string & |
data |
|
) |
| |
|
inlinevirtual |
This is kept for backwards compatibility, message is now fired as a socket.io event "message".
This function would be called when the related SIOClient object receive message or json message.
- Parameters
-
client | the connected SIOClient object. |
data | the message,it could be json message |
var onMessage |
( |
var |
client, |
|
|
var |
data |
|
) |
| |
|
inlinevirtual |
This is kept for backwards compatibility, message is now fired as a socket.io event "message".
This function would be called when the related SIOClient object receive message or json message.
- Parameters
-
client | the connected SIOClient object. |
data | the message,it could be json message |
Pure virtual callback function, this function should be overridden by the subclass.
This function would be called when the related SIOClient object disconnect or receive disconnect signal.
- Parameters
-
var onClose |
( |
var |
client | ) |
|
|
pure virtual |
Pure virtual callback function, this function should be overridden by the subclass.
This function would be called when the related SIOClient object disconnect or receive disconnect signal.
- Parameters
-
virtual void onError |
( |
SIOClient * |
client, |
|
|
const std::string & |
data |
|
) |
| |
|
pure virtual |
Pure virtual callback function, this function should be overridden by the subclass.
This function would be called when the related SIOClient object receive 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 overridden by the subclass.
This function would be called when the related SIOClient object receive 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 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. |
The documentation for this class was generated from the following file: