16struct ControllerServerImpl;
23 static ControllerServer*
Get();
27 void Restart(
int port);
28 bool IsRunning()
const;
33 std::future<std::string> QueueCommand(std::function<std::string()> fn);
35 void SetLogRequests(
bool log);
36 bool GetLogRequests()
const;
42 void DrainAndCancelQueue();
44 static ControllerServer* sInstance;
46 std::unique_ptr<ControllerServerImpl> mImpl;
47 std::future<void> mServerFuture;
48 std::atomic<bool> mRunning{
false };
49 std::atomic<bool> mShuttingDown{
false };
50 std::atomic<bool> mLogRequests{
false };
53 std::mutex mQueueMutex;
54 std::queue<std::unique_ptr<ControllerCommand>> mCommandQueue;
bool IsShuttingDown()
Definition Engine.cpp:1042
void Tick()
Definition HttpClient.cpp:202