Provides a flood protection queue for commands.
More...
#include <IrcCommandQueue>
Inherits QObject.
◆ IrcCommandQueue()
IrcCommandQueue::IrcCommandQueue |
( |
QObject * |
parent = nullptr | ) |
|
|
explicit |
Constructs a new command queue with parent.
- Note
- If parent is an instance of IrcConnection, it will be automatically assigned to connection.
◆ ~IrcCommandQueue()
IrcCommandQueue::~IrcCommandQueue |
( |
| ) |
|
|
override |
Destructs the command queue.
◆ batch()
int IrcCommandQueue::batch |
( |
| ) |
const |
This property holds the batch size.
This is the amount of commands sent at once. The default value is 3
.
- Access functions:
- int batch() const
- void setBatch(int batch)
◆ clear
void IrcCommandQueue::clear |
( |
| ) |
|
|
slot |
This methods clears the command queue.
- Note
- Any queued commands are not sent.
- See also
- flush()
◆ connection()
This property holds the associated connection.
- Access functions:
- IrcConnection* connection() const
- void setConnection(IrcConnection* connection)
◆ flush
void IrcCommandQueue::flush |
( |
| ) |
|
|
slot |
This methods flushes the whole command queue without batching.
◆ interval()
int IrcCommandQueue::interval |
( |
| ) |
const |
This property holds the queue processing interval in seconds.
The default value is 2
seconds. A value equal to or less than 0
seconds disables command queueing.
- Access functions:
- int interval() const
- void setInterval(int seconds)
◆ size()
int IrcCommandQueue::size |
( |
| ) |
const |
This property holds the current size of the queue.
- Access function:
-
- Notifier signal:
- void sizeChanged(int size)
◆ sizeChanged
void IrcCommandQueue::sizeChanged |
( |
int |
size | ) |
|
|
signal |
This signal is emitted when the queue size has changed.