| 14 | #include <iostream> |
| 15 | |
| 16 | class AsioTimer : public CppServer::Asio::Timer |
| 17 | { |
| 18 | public: |
| 19 | using CppServer::Asio::Timer::Timer; |
| 20 | |
| 21 | protected: |
| 22 | void onTimer(bool canceled) override |
| 23 | { |
| 24 | std::cout << "Asio timer " << (canceled ? "canceled" : "expired") << std::endl; |
| 25 | } |
| 26 | |
| 27 | void onError(int error, const std::string& category, const std::string& message) override |
| 28 | { |
| 29 | std::cout << "Asio timer caught an error with code " << error << " and category '" << category << "': " << message << std::endl; |
| 30 | } |
| 31 | }; |
| 32 | |
| 33 | int main(int argc, char** argv) |
| 34 | { |
nothing calls this directly
no outgoing calls
no test coverage detected