8 #include "iwebsocketclientendpoint.h"
9 #include "websocketinterface.h"
10 #include "websocketticket.h"
13 #include <nap/resource.h>
14 #include <nap/resourceptr.h>
36 template<
typename config>
39 template<
typename config>
63 virtual void onDestroy()
override;
68 bool isConnected()
const;
96 virtual void onConnectionOpened() = 0;
103 virtual void onConnectionClosed(
int code,
const std::string& reason) = 0;
110 virtual void onConnectionFailed(
int code,
const std::string& reason) = 0;
120 void connectionOpened();
122 void connectionClosed(
int code,
const std::string& reason);
124 void connectionFailed(
int code,
const std::string& reason);
128 std::atomic<bool> mOpen = {
false };
193 virtual void onConnectionOpened()
override;
201 virtual void onConnectionClosed(
int code,
const std::string& reason)
override;
209 virtual void onConnectionFailed(
int code,
const std::string& reason)
override;
Definition: websocketclientendpoint.h:39
Definition: websocketconnection.h:27
const WebSocketConnection & getConnection() const
Definition: websocketclient.h:84
Definition: websocketclientendpoint.h:20
WebSocketConnection mConnection
Web-socket connection.
Definition: websocketclient.h:91
Definition: objectptr.h:154
Definition: websocketservice.h:23
Definition: errorstate.h:19
Definition: websocketclient.h:150
Definition: websocketmessage.h:29
ResourcePtr< IWebSocketClientEndPoint > mEndPoint
Property: 'EndPoint' the client endpoint that manages all connections.
Definition: websocketclient.h:86
Definition: websocketclient.h:34
Definition: templateapp.h:17
Definition: websocketinterface.h:28
EWebSocketOPCode
Definition: websocketutils.h:29
std::string mURI
Property: "URI" Server URI to open connection to.
Definition: websocketclient.h:88