summaryrefslogtreecommitdiff
path: root/src/server.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/server.hh')
-rw-r--r--src/server.hh26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/server.hh b/src/server.hh
new file mode 100644
index 0000000..9e73c0d
--- /dev/null
+++ b/src/server.hh
@@ -0,0 +1,26 @@
+#ifndef SERVER_HH
+#define SERVER_HH
+
+#include <cstdint>
+#include <memory>
+#include <string>
+
+class Logger;
+
+class Server {
+ public:
+ virtual ~Server() = default;
+
+ static std::unique_ptr<Server> create();
+
+ virtual bool setup(std::shared_ptr<Logger> logger, std::string const& host,
+ uint16_t port) = 0;
+
+ virtual bool run(std::shared_ptr<Logger> logger) = 0;
+
+ protected:
+ Server() = default;
+ Server(Server const&) = delete;
+};
+
+#endif // SERVER_HH