server search for client completed with host:port

This commit is contained in:
LuckyLaszlo
2022-08-06 04:46:40 +02:00
parent 79bdc1ecbf
commit 05c7faf1f3
10 changed files with 71 additions and 23 deletions

View File

@@ -58,14 +58,14 @@ class Webserv
private:
int _epfd;
std::vector<int> _listen_sockets;
std::vector<listen_socket> _listen_sockets;
std::vector<ServerConfig> _servers;
std::vector<Client> _clients;
std::map<int, std::string> _http_status;
std::map<std::string, std::string> _mime_types;
// accept.cpp
void _accept_connection(int fd);
void _accept_connection(listen_socket &lsocket);
// request.cpp
void _request(Client *client);
void _read_request(Client *client);
@@ -106,6 +106,7 @@ class Webserv
// close.cpp
void _close_client(int fd);
void _close_all_clients();
void _close_all_listen_sockets();
// init.cpp
void _bind(int socket_fd, in_port_t port, std::string host);
void _listen(int socket_fd, unsigned int max_connections);