#include <Channel.h>
|
| std::string | key |
| | This key must be unique on the server on which it is plugged.
|
| |
| std::queue< ClientData > | dataQueue |
| | This queue is used to store (and read) the data send to the Channel by the Server.
|
| |
| ChannelState | state |
| | Control if the channel is active or not.
|
| |
◆ Channel()
| Channel::Channel |
( |
const std::string & | key | ) |
|
Constructor of the Channel's class.
Channel is an abstract class, you need to implement its run method in its specialization.
- Parameters
-
◆ available()
| bool Channel::available |
( |
| ) |
|
Return true if data is available inside the dataQueue, false otherwise.
◆ getKey()
| const std::string & Channel::getKey |
( |
| ) |
|
◆ pull()
Pop the first data from the queue and return it.
Handles automatically the lock.
◆ push()
Add the given data at the end of the queue.
Handles automatically the lock.
- Parameters
-
| data | ClientData structure holding the data from the event. |
◆ run()
| virtual void Channel::run |
( |
std::stop_token | st | ) |
|
|
pure virtual |
◆ setKey()
| void Channel::setKey |
( |
const std::string & | key | ) |
|
Defined the Channel's key.
- Warning
- It will not update the key on the server. You should unplug the channel, change its key and then re-plugged it for the new key to be effective.
- Parameters
-
◆ setState()
◆ dataQueue
This queue is used to store (and read) the data send to the Channel by the Server.
◆ key
This key must be unique on the server on which it is plugged.
◆ state
Control if the channel is active or not.
The documentation for this class was generated from the following file: