Clean up includes

This commit is contained in:
Andreas Tsouchlos 2025-04-19 14:10:25 +02:00
parent 9aee820625
commit 47a2135093
4 changed files with 16 additions and 23 deletions

View File

@ -1,7 +1,10 @@
#include "tcp.hpp" // Library includes
#include <cstddef>
#include <spdlog/spdlog.h> #include <spdlog/spdlog.h>
// Project includes
#include "tcp.hpp"
int main() { int main() {
spdlog::set_level(spdlog::level::debug); spdlog::set_level(spdlog::level::debug);

View File

@ -1,18 +1,12 @@
#include "tcp.hpp" #include "tcp.hpp"
// C stdlib includes
#include <arpa/inet.h> #include <arpa/inet.h>
#include <cerrno>
#include <cstdint>
#include <expected>
#include <fcntl.h> #include <fcntl.h>
#include <netdb.h> #include <netdb.h>
#include <netinet/in.h>
#include <netinet/tcp.h> // Library includes
#include <poll.h>
#include <span>
#include <spdlog/spdlog.h> #include <spdlog/spdlog.h>
#include <sys/socket.h>
#include <sys/types.h>
namespace { namespace {

View File

@ -1,24 +1,16 @@
#pragma once #pragma once
// STL includes
#include <array> #include <array>
#include <cerrno> #include <cerrno>
#include <cstdint> #include <cstdint>
#include <expected> #include <expected>
#include <poll.h>
#include <span> #include <span>
#include <spdlog/spdlog.h>
#include <sys/socket.h>
// C stdlib includes // C stdlib includes
#include <arpa/inet.h>
#include <expected>
#include <fcntl.h>
#include <netdb.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <netinet/tcp.h> #include <sys/poll.h>
#include <sys/socket.h>
#include <sys/types.h>
namespace tcp { namespace tcp {

View File

@ -1,7 +1,11 @@
#include "tcp.hpp"
#include <gtest/gtest.h> #include <gtest/gtest.h>
// STL includes
#include <cstring>
// Project includes
#include "tcp.hpp"
TEST(TcpServer, Accept) { TEST(TcpServer, Accept) {
tcp::NonBlockingServer server{{.port = 1234}}; tcp::NonBlockingServer server{{.port = 1234}};