26int main(
int ac,
char **av) {
30 throw std::runtime_error(
"Too many arguments");
31 std::string config_file =
"default.json";
34 std::ifstream file(config_file.c_str());
36 throw std::runtime_error(
"File not found");
37 cout <<
"Parsing configuration file from JSON conf file.\n";
38 cout <<
"You must be sure the syntax is correct\n";
42 cout <<
"Initialization of server...\n";
46 }
catch (
const std::exception &e) {
47 std::cerr << e.what() <<
'\n';
void cycle(void)
A Wevserv cycle:
static int _amount
< The higher one
static int _max_fd
< The lower socket fd
static int _min_fd
< The sockets fd which will be select
int main(int ac, char **av)
< The amount of sockets listens