Webserv
Loading...
Searching...
No Matches
Master.hpp
Go to the documentation of this file.
1#pragma once
2#include "webserv.hpp"
3
4class Master {
5 int _fd;
6 std::vector<Client *> _childs;
7 struct sockaddr_in _address;
8
9 public:
10 Master(ip_port_t listen);
11 Master(int fd, Master *parent);
12 ~Master(void);
13
14 void pre_select(void);
15 void post_select(Env *env);
16 Server *choose_server(Env *env, string host);
17
19 static fd_set _readfds;
20 static int _max_fd, _min_fd, _amount;
21};
Definition: Env.hpp:4
Definition: Master.hpp:4
static fd_set _readfds
Definition: Master.hpp:19
static int _amount
< The higher one
Definition: Master.hpp:20
struct sockaddr_in _address
Definition: Master.hpp:7
void post_select(Env *env)
Definition: Master.cpp:65
static int _max_fd
< The lower socket fd
Definition: Master.hpp:20
Server * choose_server(Env *env, string host)
Definition: Master.cpp:113
static int _min_fd
< The sockets fd which will be select
Definition: Master.hpp:20
void pre_select(void)
Definition: Master.cpp:50
~Master(void)
Definition: Master.cpp:11
int _fd
Definition: Master.hpp:5
Master(int fd, Master *parent)
std::vector< Client * > _childs
Definition: Master.hpp:6
ip_port_t _listen
Definition: Master.hpp:18
Definition: Server.hpp:4