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"
#include <cstddef>
// Library includes
#include <spdlog/spdlog.h>
// Project includes
#include "tcp.hpp"
int main() {
spdlog::set_level(spdlog::level::debug);

View File

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

View File

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

View File

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