28 lines
556 B
C++
28 lines
556 B
C++
#pragma once
|
|
|
|
#include <boost/signals2.hpp>
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
namespace detail
|
|
{
|
|
class CCServerImpl;
|
|
}
|
|
|
|
class CCServer final
|
|
{
|
|
public:
|
|
CCServer(const std::string& addressToListen, uint16_t portToListen, const std::string& docRoot, int threads);
|
|
~CCServer();
|
|
|
|
public:
|
|
void run();
|
|
bool isRunning() const;
|
|
void shutdown();
|
|
void clearCache();
|
|
boost::signals2::connection connectOnStopped(const boost::signals2::signal<void()>::slot_type& slot);
|
|
|
|
private:
|
|
std::unique_ptr<detail::CCServerImpl> m_impl;
|
|
};
|