PcapPlusPlus
Next
|
A worker thread that periodically calls the provided callback with updated statistics. More...
#include <PcapLiveDevice.h>
Public Member Functions | |
StatisticsUpdateWorker (PcapLiveDevice const &pcapDevice, OnStatsUpdateCallback onStatsUpdateCallback, void *onStatsUpdateUserCookie=nullptr, unsigned int updateIntervalMs=1000) | |
Constructs and starts a worker thread that periodically calls the provided callback with updated statistics. More... | |
void | stopWorker () |
Stops the worker thread. | |
A worker thread that periodically calls the provided callback with updated statistics.
pcpp::PcapLiveDevice::StatisticsUpdateWorker::StatisticsUpdateWorker | ( | PcapLiveDevice const & | pcapDevice, |
OnStatsUpdateCallback | onStatsUpdateCallback, | ||
void * | onStatsUpdateUserCookie = nullptr , |
||
unsigned int | updateIntervalMs = 1000 |
||
) |
Constructs and starts a worker thread that periodically calls the provided callback with updated statistics.
pcapDevice | A pointer to the PcapLiveDevice instance to be monitored. |
onStatsUpdateCallback | A callback function to be called with updated statistics. |
onStatsUpdateUserCookie | A user-defined pointer that is passed to the callback function. |
updateIntervalMs | The interval in milliseconds between each callback invocation. |