From bd09668dc184bba9d5e2147529cfcdd991116155 Mon Sep 17 00:00:00 2001 From: Theis Pieter Hollebeek Date: Wed, 25 Mar 2026 12:40:33 +0100 Subject: [PATCH] delete unused files --- backend/src/http.cpp | 23 ---------------------- backend/src/http.h | 36 ---------------------------------- backend/src/tcp.cpp | 2 +- backend/src/{tcp.h => tcp.hpp} | 0 4 files changed, 1 insertion(+), 60 deletions(-) delete mode 100644 backend/src/http.cpp delete mode 100644 backend/src/http.h rename backend/src/{tcp.h => tcp.hpp} (100%) diff --git a/backend/src/http.cpp b/backend/src/http.cpp deleted file mode 100644 index 2cfbffd..0000000 --- a/backend/src/http.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include "http.h" - -namespace mst { -auto HttpServer::start() -> Result -{ - while (1) { - auto res = this->listener.accept(); - if (res) { } - } -}; - -auto HttpServer::bind(const std::string& host, uint16_t port) - -> Result -{ - auto x = TcpListener::bind(host, port); - - if (!x) { - return std::unexpected(std::move(x.error())); - } - - return HttpServer(*x); -} -} diff --git a/backend/src/http.h b/backend/src/http.h deleted file mode 100644 index bac27b4..0000000 --- a/backend/src/http.h +++ /dev/null @@ -1,36 +0,0 @@ -#pragma once - -#include "tcp.h" -#include -#include -#include -#include - -namespace mst { -template using Result = std::expected; - -class HttpServer; - -class HttpDaemon { - -public: - HttpDaemon(HttpServer&, TcpConnection connection) - : connection(connection) { }; - -private: - TcpConnection connection; -}; - -class HttpServer { - -public: - auto start() -> Result; - static auto bind(const std::string& host, uint16_t port) - -> Result; - -private: - HttpServer(TcpListener listener) - : listener(listener) { }; - TcpListener listener; -}; -} diff --git a/backend/src/tcp.cpp b/backend/src/tcp.cpp index 74f1123..68dee7b 100644 --- a/backend/src/tcp.cpp +++ b/backend/src/tcp.cpp @@ -1,4 +1,4 @@ -#include "tcp.h" +#include "tcp.hpp" #include #include #include diff --git a/backend/src/tcp.h b/backend/src/tcp.hpp similarity index 100% rename from backend/src/tcp.h rename to backend/src/tcp.hpp