The delegate class is used to process websocket events. More...
Public Member Functions | |
virtual | ~Delegate () |
Destructor of Delegate. More... | |
var | ~Delegate () |
Destructor of Delegate. More... | |
virtual void | onOpen (WebSocket *ws)=0 |
This function to be called after the client connection complete a handshake with the remote server. More... | |
virtual void | onMessage (WebSocket *ws, const Data &data)=0 |
This function to be called when data has appeared from the server for the client connection. More... | |
virtual void | onClose (WebSocket *ws)=0 |
When the WebSocket object connected wants to close or the protocol won't get used at all and current _readyState is State::CLOSING,this function is to be called. More... | |
virtual void | onError (WebSocket *ws, const ErrorCode &error)=0 |
This function is to be called in the following cases: More... | |
The delegate class is used to process websocket events.
The most member function are pure virtual functions,they should be implemented the in subclass.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
When the WebSocket object connected wants to close or the protocol won't get used at all and current _readyState is State::CLOSING,this function is to be called.
The WebSocket object connected.
|
pure virtual |
When the WebSocket object connected wants to close or the protocol won't get used at all and current _readyState is State::CLOSING,this function is to be called.
The WebSocket object connected.
This function is to be called in the following cases:
|
pure virtual |
This function is to be called in the following cases: