formating

This commit is contained in:
whaffman 2025-10-14 18:47:09 +02:00
parent f3bdf28eed
commit 3a95041815
12 changed files with 38 additions and 27 deletions

View File

@ -1,4 +1,5 @@
#include <webserv/client/Client.hpp> #include <webserv/client/Client.hpp>
#include <webserv/http/HttpHeaders.hpp> // for HttpHeaders #include <webserv/http/HttpHeaders.hpp> // for HttpHeaders
#include <webserv/log/Log.hpp> // for Log, LOCATION #include <webserv/log/Log.hpp> // for Log, LOCATION
#include <webserv/router/Router.hpp> // for Router #include <webserv/router/Router.hpp> // for Router

View File

@ -2,14 +2,13 @@
// #include <webserv/http/HttpResponse.hpp> // #include <webserv/http/HttpResponse.hpp>
#include "webserv/socket/ClientSocket.hpp"
#include <webserv/config/ServerConfig.hpp> // for ServerConfig #include <webserv/config/ServerConfig.hpp> // for ServerConfig
#include <webserv/http/HttpConstants.hpp> // for OK #include <webserv/http/HttpConstants.hpp> // for OK
#include <webserv/http/HttpRequest.hpp> // for HttpRequest #include <webserv/http/HttpRequest.hpp> // for HttpRequest
#include <webserv/http/HttpResponse.hpp> // for HttpResponse #include <webserv/http/HttpResponse.hpp> // for HttpResponse
#include <webserv/server/Server.hpp> #include <webserv/server/Server.hpp>
#include <webserv/socket/ClientSocket.hpp> // for Socket #include <webserv/socket/ClientSocket.hpp> // for ClientSocket
#include <webserv/socket/ClientSocket.hpp>
#include <cstddef> // for size_t #include <cstddef> // for size_t
#include <cstdint> // for uint8_t #include <cstdint> // for uint8_t

View File

@ -6,6 +6,7 @@
#include <iostream> // for ios_base #include <iostream> // for ios_base
#include <string> // for allocator, basic_string, char_traits, operator+, string #include <string> // for allocator, basic_string, char_traits, operator+, string
#include <vector> // for vector
int main(int argc, char **argv) int main(int argc, char **argv)
{ {

View File

@ -1,10 +1,10 @@
#include "webserv/socket/ASocket.hpp" #include <webserv/server/Server.hpp>
#include <webserv/client/Client.hpp> // for Client #include <webserv/client/Client.hpp> // for Client
#include <webserv/config/ConfigManager.hpp> // for ConfigManager #include <webserv/config/ConfigManager.hpp> // for ConfigManager
#include <webserv/config/ServerConfig.hpp> // for ServerConfig #include <webserv/config/ServerConfig.hpp> // for ServerConfig
#include <webserv/log/Log.hpp> // for Log, LOCATION #include <webserv/log/Log.hpp> // for Log, LOCATION
#include <webserv/server/Server.hpp> #include <webserv/socket/ASocket.hpp>
#include <webserv/socket/ClientSocket.hpp> // for ClientSocket #include <webserv/socket/ClientSocket.hpp> // for ClientSocket
#include <webserv/socket/ServerSocket.hpp> // for ServerSocket #include <webserv/socket/ServerSocket.hpp> // for ServerSocket

View File

@ -1,11 +1,10 @@
#pragma once #pragma once
#include "webserv/socket/ASocket.hpp"
#include <webserv/client/Client.hpp> #include <webserv/client/Client.hpp>
#include <webserv/config/ConfigManager.hpp> #include <webserv/config/ConfigManager.hpp>
#include <webserv/config/ServerConfig.hpp> // for ServerConfig #include <webserv/config/ServerConfig.hpp> // for ServerConfig
#include <webserv/router/Router.hpp> // for Router #include <webserv/router/Router.hpp> // for Router
#include <webserv/socket/ASocket.hpp>
#include <webserv/socket/ServerSocket.hpp> // for ServerSocket #include <webserv/socket/ServerSocket.hpp> // for ServerSocket
#include <cstdint> // for uint32_t #include <cstdint> // for uint32_t
@ -17,6 +16,8 @@
class Client; class Client;
class ConfigManager; class ConfigManager;
class ServerConfig; class ServerConfig;
class ASocket;
class ServerSocket;
class Server class Server
{ {

View File

@ -1,9 +1,15 @@
#include <webserv/log/Log.hpp> // for Log, LOCATION
#include <webserv/socket/ASocket.hpp> #include <webserv/socket/ASocket.hpp>
#include <fcntl.h> // For fcntl() #include <webserv/log/Log.hpp> // for Log, LOCATION
#include <sys/socket.h>
#include <unistd.h> // For close() #include <stdexcept> // for runtime_error
#include <string> // for basic_string
#include <system_error> // for generic_category, system_error
#include <errno.h> // for errno
#include <fcntl.h> // for fcntl, F_SETFL, O_NONBLOCK
#include <sys/socket.h> // for recv, send
#include <unistd.h> // for close
ASocket::ASocket(int fd) : fd_(fd) ASocket::ASocket(int fd) : fd_(fd)
{ {

View File

@ -1,6 +1,8 @@
#include <webserv/log/Log.hpp>
#include <webserv/socket/CGISocket.hpp> #include <webserv/socket/CGISocket.hpp>
#include <webserv/log/Log.hpp> // for LOCATION, Log
#include <webserv/socket/ASocket.hpp> // for ASocket
CGISocket::CGISocket(int fd) : ASocket(fd) CGISocket::CGISocket(int fd) : ASocket(fd)
{ {
Log::trace(LOCATION); Log::trace(LOCATION);

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include <webserv/socket/ASocket.hpp> #include <webserv/socket/ASocket.hpp> // for ASocket
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/types.h> #include <sys/types.h>

View File

@ -1,6 +1,8 @@
#include <webserv/log/Log.hpp>
#include <webserv/socket/ClientSocket.hpp> #include <webserv/socket/ClientSocket.hpp>
#include <webserv/log/Log.hpp> // for LOCATION, Log
#include <webserv/socket/ASocket.hpp> // for ASocket
ClientSocket::ClientSocket(int fd) : ASocket(fd) ClientSocket::ClientSocket(int fd) : ASocket(fd)
{ {
Log::trace(LOCATION); Log::trace(LOCATION);

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include <webserv/socket/ASocket.hpp> #include <webserv/socket/ASocket.hpp> // for ASocket
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/types.h> #include <sys/types.h>

View File

@ -1,17 +1,16 @@
#include "webserv/socket/ASocket.hpp"
#include "webserv/socket/ClientSocket.hpp"
#include <webserv/log/Log.hpp>
#include <webserv/socket/ServerSocket.hpp> #include <webserv/socket/ServerSocket.hpp>
#include <memory> #include <webserv/log/Log.hpp> // for Log, LOCATION
#include <stdexcept> #include <webserv/socket/ASocket.hpp> // for ASocket
#include <webserv/socket/ClientSocket.hpp> // for ClientSocket
#include <arpa/inet.h> // For inet_addr #include <memory> // for allocator, make_unique, unique_ptr
#include <fcntl.h> // For fcntl()" #include <stdexcept> // for runtime_error
#include <netinet/in.h> // For sockaddr_in
#include <sys/socket.h> #include <arpa/inet.h> // for htons, inet_addr
#include <unistd.h> // For close() #include <netinet/in.h> // for sockaddr_in, in_addr
#include <sys/socket.h> // for AF_INET, accept, bind, listen, setsockopt, socket, SOCK_STREAM, SOL_SOCKET, SO_REUSEADDR
#include <unistd.h> // for close
ServerSocket::ServerSocket() : ASocket(socket(AF_INET, SOCK_STREAM, 0)) ServerSocket::ServerSocket() : ASocket(socket(AF_INET, SOCK_STREAM, 0))
{ {

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
#include "webserv/socket/ClientSocket.hpp"
#include <webserv/socket/ASocket.hpp> #include <webserv/socket/ASocket.hpp>
#include <webserv/socket/ClientSocket.hpp>
#include <memory> // for unique_ptr #include <memory> // for unique_ptr
#include <string> // for string #include <string> // for string