37#include <sio_client.h>
45 class SocketIOChannel;
69 void OnNewMessage(std::string
const& name, message::ptr
const& data,
bool hasAck, message::list &ack_resp);
70 void OnUserJoined(std::string
const& name, message::ptr
const& data,
bool hasAck, message::list &ack_resp);
71 void OnUserLeft(std::string
const& name, message::ptr
const& data,
bool hasAck, message::list &ack_resp);
72 void OnLogin(std::string
const& name, message::ptr
const& data,
bool hasAck, message::list &ack_resp);
73 void OnConnected(std::string
const& nsp);
74 void OnClosed(client::close_reason
const& reason);
77 std::unique_ptr<client> _io;
81 String m_url =
"ws://localhost:3000";
A hash-based key-value store, useful for quick associative lookups. Key features include:
Definition Dictionary.h:61
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Definition Pointer.hpp:320
Provides the ability to communicate over a network using SocketIO (https://socket....
Definition SocketIO.h:51
DynamicPointer< SocketIOChannel > createChannel(const String &name, UUID target=Constant< UUID >::Invalid)
static DynamicPointer< SocketIO > GetSocketIO(const String &url="http://ndevr.org:3000")
bool connect(const String &url="http://ndevr.org:3000")
SocketIO(QObject *parent=0)
DynamicPointer< SocketIOChannel > createChannel(const String &name, std::function< void(const char *data, uint04 size)> data_callback, UUID target=Constant< UUID >::Invalid)
void addChannel(DynamicPointer< SocketIOChannel > &channel)
void setName(const String &name)
bool isConnected() const
Definition SocketIO.h:66
const Dictionary< UUID, String > & onlineClients() const
void removeChannel(DynamicPointer< SocketIOChannel > &channel)
void setRunID(const UUID &run_id)
const String & url() const
Definition SocketIO.h:67
The core String class for the NDEVR API.
Definition String.h:69
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:60
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved 'invali...
Definition BaseValues.hpp:233