delete unused files

This commit is contained in:
Theis Pieter Hollebeek 2026-03-25 12:40:33 +01:00
parent 3646c5bf90
commit bd09668dc1
4 changed files with 1 additions and 60 deletions

View File

@ -1,23 +0,0 @@
#include "http.h"
namespace mst {
auto HttpServer::start() -> Result<void>
{
while (1) {
auto res = this->listener.accept();
if (res) { }
}
};
auto HttpServer::bind(const std::string& host, uint16_t port)
-> Result<HttpServer>
{
auto x = TcpListener::bind(host, port);
if (!x) {
return std::unexpected(std::move(x.error()));
}
return HttpServer(*x);
}
}

View File

@ -1,36 +0,0 @@
#pragma once
#include "tcp.h"
#include <cstdint>
#include <expected>
#include <netinet/in.h>
#include <string>
namespace mst {
template <typename T> using Result = std::expected<T, std::string>;
class HttpServer;
class HttpDaemon {
public:
HttpDaemon(HttpServer&, TcpConnection connection)
: connection(connection) { };
private:
TcpConnection connection;
};
class HttpServer {
public:
auto start() -> Result<void>;
static auto bind(const std::string& host, uint16_t port)
-> Result<HttpServer>;
private:
HttpServer(TcpListener listener)
: listener(listener) { };
TcpListener listener;
};
}

View File

@ -1,4 +1,4 @@
#include "tcp.h"
#include "tcp.hpp"
#include <arpa/inet.h>
#include <cstdlib>
#include <errno.h>