audio_trans/lib/tests/integration_test/server/TestPlugin.h

31 lines
609 B
C
Raw Permalink Normal View History

2025-04-07 11:31:21 +08:00
/**
*
* TestPlugin.h
*
*/
#pragma once
#include <drogon/plugins/Plugin.h>
using namespace drogon;
class TestPlugin : public Plugin<TestPlugin>
{
public:
TestPlugin()
{
}
/// This method must be called by drogon to initialize and start the plugin.
/// It must be implemented by the user.
void initAndStart(const Json::Value &config) override;
/// This method must be called by drogon to shutdown the plugin.
/// It must be implemented by the user.
void shutdown() override;
private:
std::thread workThread_;
bool stop_{false};
int interval_{0};
};