1
2
3
4
5
6 #ifndef CMAJOR_BUILD_SERVER_EXECUTION_CONTEXT_INCLUDED
7 #define CMAJOR_BUILD_SERVER_EXECUTION_CONTEXT_INCLUDED
8 #include <cmajor/build/ExecutionContext.hpp>
9 #include <cmajor/build/SocketServer.hpp>
10 #include <thread>
11
12 namespace cmajor { namespace build {
13
14 class ServerExecutionContext : public ExecutionContext
15 {
16 public:
17 ServerExecutionContext(const std::string& serverName);
18 ~ServerExecutionContext();
19 void ExitServer() override;
20 private:
21 std::thread serverThread;
22 std::unique_ptr<SocketServer> socketServer;
23 };
24
25 } }
26
27 #endif // CMAJOR_BUILD_SERVER_EXECUTION_CONTEXT_INCLUDED