![]() |
NDEVR
API Documentation
|
A specific channel of communication within the SocketIO framework. More...
Public Member Functions | |
| const String & | name () const |
| Gets the name of this channel. | |
| void | sendData (const char *data, uint04 size) |
| Sends data over this channel. | |
| void | setRecieveDataCallback (std::function< void(const char *data, uint04 size)> data_callback) |
| Sets the callback to invoke when data is received on this channel. | |
| const UUID & | target () const |
| Gets the target UUID for this channel. | |
Protected Member Functions | |
| SocketIOChannel (const StringView &name, std::function< void(const char *data, uint04 size)> data_callback, UUID target=Constant< UUID >::Invalid) | |
| Constructs a channel with a data receive callback. | |
| SocketIOChannel (const StringView &name, UUID target=Constant< UUID >::Invalid) | |
| Constructs a channel with the given name and optional target. | |
| void | recieveData (const char *data, uint04 size) |
| Dispatches received data to the receive callback. | |
| void | setSendDataCallback (std::function< void(const char *data, uint04 size)> data_callback) |
| Sets the callback used to send data through the SocketIO connection. | |
Protected Attributes | |
| String | m_name |
| The channel name. | |
| std::function< void(const char *data, uint04 size)> | m_recieve_data_callback |
| Callback for incoming data. | |
| std::function< void(const char *data, uint04 size)> | m_send_data_callback |
| Callback for outgoing data. | |
| UUID | m_target |
| The target client UUID, or invalid for broadcast. | |
A specific channel of communication within the SocketIO framework.
Definition at line 41 of file SocketIOChannel.h.
|
inlineexplicitprotected |
Constructs a channel with the given name and optional target.
| [in] | name | The channel name. Must not be empty or contain '|'. |
| [in] | target | The UUID of the target client, or invalid for broadcast. |
Definition at line 49 of file SocketIOChannel.h.
References m_name, m_recieve_data_callback, m_target, name(), and target().
|
inlineprotected |
Constructs a channel with a data receive callback.
| [in] | name | The channel name. Must not be empty or contain '|'. |
| [in] | data_callback | Callback invoked when data is received. |
| [in] | target | The UUID of the target client, or invalid for broadcast. |
Definition at line 61 of file SocketIOChannel.h.
References m_name, m_recieve_data_callback, m_target, name(), and target().
|
inline |
Gets the name of this channel.
Definition at line 86 of file SocketIOChannel.h.
References m_name.
Referenced by SocketIOChannel(), and SocketIOChannel().
|
inlineprotected |
Dispatches received data to the receive callback.
| [in] | data | Pointer to the received data. |
| [in] | size | The number of bytes received. |
Definition at line 100 of file SocketIOChannel.h.
References m_recieve_data_callback.
|
inline |
Sends data over this channel.
| [in] | data | Pointer to the data buffer to send. |
| [in] | size | The number of bytes to send. |
Definition at line 77 of file SocketIOChannel.h.
References m_send_data_callback.
|
inline |
Sets the callback to invoke when data is received on this channel.
| [in] | data_callback | The receive data callback function. |
Definition at line 72 of file SocketIOChannel.h.
References m_recieve_data_callback.
|
inlineprotected |
Sets the callback used to send data through the SocketIO connection.
| [in] | data_callback | The send data callback function. |
Definition at line 95 of file SocketIOChannel.h.
References m_send_data_callback.
|
inline |
Gets the target UUID for this channel.
Definition at line 90 of file SocketIOChannel.h.
References m_target.
Referenced by SocketIOChannel(), and SocketIOChannel().