formating
This commit is contained in:
parent
f3bdf28eed
commit
3a95041815
@ -1,4 +1,5 @@
|
||||
#include <webserv/client/Client.hpp>
|
||||
|
||||
#include <webserv/http/HttpHeaders.hpp> // for HttpHeaders
|
||||
#include <webserv/log/Log.hpp> // for Log, LOCATION
|
||||
#include <webserv/router/Router.hpp> // for Router
|
||||
|
||||
@ -2,14 +2,13 @@
|
||||
|
||||
// #include <webserv/http/HttpResponse.hpp>
|
||||
|
||||
#include "webserv/socket/ClientSocket.hpp"
|
||||
|
||||
#include <webserv/config/ServerConfig.hpp> // for ServerConfig
|
||||
#include <webserv/http/HttpConstants.hpp> // for OK
|
||||
#include <webserv/http/HttpRequest.hpp> // for HttpRequest
|
||||
#include <webserv/http/HttpResponse.hpp> // for HttpResponse
|
||||
#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 <cstdint> // for uint8_t
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
|
||||
#include <iostream> // for ios_base
|
||||
#include <string> // for allocator, basic_string, char_traits, operator+, string
|
||||
#include <vector> // for vector
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
#include "webserv/socket/ASocket.hpp"
|
||||
#include <webserv/server/Server.hpp>
|
||||
|
||||
#include <webserv/client/Client.hpp> // for Client
|
||||
#include <webserv/config/ConfigManager.hpp> // for ConfigManager
|
||||
#include <webserv/config/ServerConfig.hpp> // for ServerConfig
|
||||
#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/ServerSocket.hpp> // for ServerSocket
|
||||
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "webserv/socket/ASocket.hpp"
|
||||
|
||||
#include <webserv/client/Client.hpp>
|
||||
#include <webserv/config/ConfigManager.hpp>
|
||||
#include <webserv/config/ServerConfig.hpp> // for ServerConfig
|
||||
#include <webserv/router/Router.hpp> // for Router
|
||||
#include <webserv/socket/ASocket.hpp>
|
||||
#include <webserv/socket/ServerSocket.hpp> // for ServerSocket
|
||||
|
||||
#include <cstdint> // for uint32_t
|
||||
@ -17,6 +16,8 @@
|
||||
class Client;
|
||||
class ConfigManager;
|
||||
class ServerConfig;
|
||||
class ASocket;
|
||||
class ServerSocket;
|
||||
|
||||
class Server
|
||||
{
|
||||
|
||||
@ -1,9 +1,15 @@
|
||||
#include <webserv/log/Log.hpp> // for Log, LOCATION
|
||||
#include <webserv/socket/ASocket.hpp>
|
||||
|
||||
#include <fcntl.h> // For fcntl()
|
||||
#include <sys/socket.h>
|
||||
#include <unistd.h> // For close()
|
||||
#include <webserv/log/Log.hpp> // for Log, LOCATION
|
||||
|
||||
#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)
|
||||
{
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
#include <webserv/log/Log.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)
|
||||
{
|
||||
Log::trace(LOCATION);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <webserv/socket/ASocket.hpp>
|
||||
#include <webserv/socket/ASocket.hpp> // for ASocket
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
#include <webserv/log/Log.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)
|
||||
{
|
||||
Log::trace(LOCATION);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <webserv/socket/ASocket.hpp>
|
||||
#include <webserv/socket/ASocket.hpp> // for ASocket
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
@ -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 <memory>
|
||||
#include <stdexcept>
|
||||
#include <webserv/log/Log.hpp> // for Log, LOCATION
|
||||
#include <webserv/socket/ASocket.hpp> // for ASocket
|
||||
#include <webserv/socket/ClientSocket.hpp> // for ClientSocket
|
||||
|
||||
#include <arpa/inet.h> // For inet_addr
|
||||
#include <fcntl.h> // For fcntl()"
|
||||
#include <netinet/in.h> // For sockaddr_in
|
||||
#include <sys/socket.h>
|
||||
#include <unistd.h> // For close()
|
||||
#include <memory> // for allocator, make_unique, unique_ptr
|
||||
#include <stdexcept> // for runtime_error
|
||||
|
||||
#include <arpa/inet.h> // for htons, inet_addr
|
||||
#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))
|
||||
{
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "webserv/socket/ClientSocket.hpp"
|
||||
#include <webserv/socket/ASocket.hpp>
|
||||
#include <webserv/socket/ClientSocket.hpp>
|
||||
|
||||
#include <memory> // for unique_ptr
|
||||
#include <string> // for string
|
||||
|
||||
Loading…
Reference in New Issue
Block a user