Webserv
Loading...
Searching...
No Matches
Public Member Functions | Data Fields | Static Public Attributes | Private Attributes
Master Class Reference

#include <Master.hpp>

Collaboration diagram for Master:
Collaboration graph
[legend]

Public Member Functions

 Master (ip_port_t listen)
 
 Master (int fd, Master *parent)
 
 ~Master (void)
 
void pre_select (void)
 
void post_select (Env *env)
 
Serverchoose_server (Env *env, string host)
 

Data Fields

ip_port_t _listen
 

Static Public Attributes

static fd_set _readfds
 
static int _max_fd = 0
 < The lower socket fd
 
static int _min_fd = INT_MAX
 < The sockets fd which will be select
 
static int _amount = 0
 < The higher one
 

Private Attributes

int _fd
 
std::vector< Client * > _childs
 
struct sockaddr_in _address
 

Detailed Description

Definition at line 4 of file Master.hpp.

Constructor & Destructor Documentation

◆ Master() [1/2]

Master::Master ( ip_port_t  listen)

Definition at line 25 of file Master.cpp.

◆ Master() [2/2]

Master::Master ( int  fd,
Master parent 
)

◆ ~Master()

Master::~Master ( void  )

Definition at line 11 of file Master.cpp.

Member Function Documentation

◆ choose_server()

Server * Master::choose_server ( Env env,
string  host 
)

Definition at line 113 of file Master.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ post_select()

void Master::post_select ( Env env)

< incomming master request

Definition at line 65 of file Master.cpp.

Here is the call graph for this function:

◆ pre_select()

void Master::pre_select ( void  )

Definition at line 50 of file Master.cpp.

Field Documentation

◆ _address

struct sockaddr_in Master::_address
private

Definition at line 7 of file Master.hpp.

◆ _amount

int Master::_amount = 0
static

< The higher one

Definition at line 20 of file Master.hpp.

◆ _childs

std::vector<Client *> Master::_childs
private

Definition at line 6 of file Master.hpp.

◆ _fd

int Master::_fd
private

Definition at line 5 of file Master.hpp.

◆ _listen

ip_port_t Master::_listen

Definition at line 18 of file Master.hpp.

◆ _max_fd

int Master::_max_fd = 0
static

< The lower socket fd

Definition at line 20 of file Master.hpp.

◆ _min_fd

int Master::_min_fd = INT_MAX
static

< The sockets fd which will be select

Definition at line 20 of file Master.hpp.

◆ _readfds

fd_set Master::_readfds
static

Definition at line 19 of file Master.hpp.


The documentation for this class was generated from the following files: