-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
38 lines (34 loc) · 1.46 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: pmontiel <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/02/10 12:05:52 by rcheiko #+# #+# */
/* Updated: 2022/02/15 15:16:29 by pmontiel ### ########.fr */
/* */
/* ************************************************************************** */
#include "server.hpp"
int main(int ac, char **av)
{
if (ac != 3)
{
std::cout << "error argument : ./ircserv <port> <password>" << std::endl;
exit(EXIT_FAILURE);
}
server serv;
serv.setPassword(av[2]);
serv.init_socket(std::atoi(av[1]));
serv.k_init();
return (0);
}
/*protoent *a; // FONCTION GET PROTO BY NAME
const char str[] = "TCP";
a = getprotobyname(str);
std::cout << "protocol : " << a->p_name << std::endl;
std::cout << "numero protocol : " << a->p_proto << std::endl;
for(int i = 0; a->p_aliases[i]; i++)
{
std::cout << "protocol : " << a->p_aliases << std::endl;
}*/