Class WsppWebSocket
Defined in File WsppWebSocket.h
Page Contents
Inheritance Relationships
Base Type
public axr::sdk::net::IWebSocket
(Class IWebSocket)
Class Documentation
-
class WsppWebSocket : public axr::sdk::net::IWebSocket
Implementation of the IWebSocket interface using the WebSocket++ library.
Public Functions
-
~WsppWebSocket()
-
virtual std::vector<CloseCallback>::const_iterator AddCloseHandler(CloseCallback callback) override
Registers the given callback function to be notified whenever a socket close event occurs.
- Parameters
callback – The callback function to notify on close events.
- Returns
The iterator referencing the registered callback. Use this to unregister the callback.
-
virtual void RemoveCloseHandler(std::vector<CloseCallback>::const_iterator iter) override
Unregisters the callback function at the given iterator. The iterator is provided from the
AddCloseHandler
function.- Parameters
iter – The iterator referencing the callback function to unregister.
-
virtual std::vector<MessageCallback>::const_iterator AddMessageHandler(MessageCallback callback) override
Registers the given callback function to be notified whenever a socket message event occurs.
- Parameters
callback – The callback function to notify on message events.
- Returns
The iterator referencing the registered callback. Use this to unregister the callback.
-
virtual void RemoveMessageHandler(std::vector<MessageCallback>::const_iterator iter) override
Unregisters the callback function at the given iterator. The iterator is provided from the
AddMessageHandler
function.- Parameters
iter – The iterator referencing the callback function to unregister.
-
virtual pplx::task<void> Connect(utility::string_t uri) override
Initiates a connection to the remote server at the given uri.
- Parameters
uri – The URI of the remote server to connect to.
-
virtual pplx::task<void> Close() override
Terminates the active socket connection with the remote server.
-
inline virtual WebSocketStatus GetStatus() override
Returns the current status of the connection with the remote server.
Sends the given message to the server through this connection.
- Parameters
message – The message to send.
-
~WsppWebSocket()