mirror of
https://github.com/KeyZox71/webserv.git
synced 2025-05-11 00:08:46 +02:00
「🏗️」 wip: Socket creation should be working
This commit is contained in:
@ -1,12 +1,12 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* server.hpp :+: :+: :+: */
|
||||
/* Server.hpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/04/11 17:45:43 by adjoly #+# #+# */
|
||||
/* Updated: 2025/04/14 14:21:41 by adjoly ### ########.fr */
|
||||
/* Updated: 2025/04/17 11:48:36 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -45,11 +45,26 @@ class Server {
|
||||
*/
|
||||
void _handle_client(Client);
|
||||
|
||||
/**
|
||||
* @brief Can be used to fill the vector passed as parameters with all the
|
||||
* port and host in the config
|
||||
* @param The vector of host
|
||||
* @param The vector of port
|
||||
*/
|
||||
int _fillHostsPorts(std::vector<std::string> &, std::vector<int> &);
|
||||
|
||||
/**
|
||||
* @brief Can be used to open a socket with a specific port and host
|
||||
* @param The host
|
||||
* @param The port
|
||||
*/
|
||||
int _createSocket(std::string, int);
|
||||
|
||||
config::Config
|
||||
*_conf; ///> Pointer to the configuration class (with all config in)
|
||||
Logger *_log; ///> Pointer to the log class
|
||||
int _fd_server; ///> The fd of the socket
|
||||
std::vector<struct pollfd> _client_fds; ///> A vector of all the poll fd
|
||||
*_conf; // Pointer to the configuration class (with all config in)
|
||||
Logger *_log; // Pointer to the log class
|
||||
std::vector<int> _fds_server; // The fds of the sockets
|
||||
std::vector<struct pollfd> _client_fds; // A vector of all the poll fd
|
||||
};
|
||||
|
||||
}; // namespace webserv
|
@ -6,13 +6,14 @@
|
||||
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/02/11 13:29:05 by mmoussou #+# #+# */
|
||||
/* Updated: 2025/04/11 18:06:05 by adjoly ### ########.fr */
|
||||
/* Updated: 2025/04/17 11:05:59 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "server.hpp"
|
||||
#include "Server.hpp"
|
||||
#include "Client.hpp"
|
||||
|
||||
namespace webserv {
|
||||
|
||||
|
Reference in New Issue
Block a user