caca 1
This commit is contained in:
@@ -1,19 +1,20 @@
|
|||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
/* */
|
/* */
|
||||||
/* ::: :::::::: */
|
/* ::: :::::::: */
|
||||||
/* main.cpp :+: :+: :+: */
|
/* irc.hpp :+: :+: :+: */
|
||||||
/* +:+ +:+ +:+ */
|
/* +:+ +:+ +:+ */
|
||||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
/* By: vvaas <vvaas@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/11/24 10:40:01 by maldavid #+# #+# */
|
/* Created: 2023/11/29 13:24:01 by vvaas #+# #+# */
|
||||||
/* Updated: 2023/11/24 10:40:29 by maldavid ### ########.fr */
|
/* Updated: 2023/11/29 13:45:51 by vvaas ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
int main(int ac, char** av)
|
#ifndef IRC_H
|
||||||
{
|
# define IRC_H
|
||||||
(void)ac;
|
|
||||||
(void)av;
|
|
||||||
|
|
||||||
return 0;
|
# include <iostream>
|
||||||
}
|
# include <string>
|
||||||
|
# include <sys/socket.h>
|
||||||
|
# include <netinet/in.h>
|
||||||
|
#endif
|
||||||
34
srcs/main.cpp
Normal file
34
srcs/main.cpp
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
/* ************************************************************************** */
|
||||||
|
/* */
|
||||||
|
/* ::: :::::::: */
|
||||||
|
/* main.cpp :+: :+: :+: */
|
||||||
|
/* +:+ +:+ +:+ */
|
||||||
|
/* By: vvaas <vvaas@student.42.fr> +#+ +:+ +#+ */
|
||||||
|
/* +#+#+#+#+#+ +#+ */
|
||||||
|
/* Created: 2023/11/24 10:40:01 by maldavid #+# #+# */
|
||||||
|
/* Updated: 2023/11/29 14:03:14 by vvaas ### ########.fr */
|
||||||
|
/* */
|
||||||
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
#include "../includes/irc.hpp"
|
||||||
|
|
||||||
|
unsigned long get_port(char *port)
|
||||||
|
{
|
||||||
|
if (!port)
|
||||||
|
return (0);
|
||||||
|
return (std::atoi(port));
|
||||||
|
}
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
int s_socket;
|
||||||
|
struct sockaddr_in s_data;
|
||||||
|
|
||||||
|
s_data.sin_family = AF_INET;
|
||||||
|
s_data.sin_addr.s_addr = INADDR_ANY;
|
||||||
|
s_data.sin_port = get_port(argv[1]);
|
||||||
|
if (argc != 3)
|
||||||
|
return (1);
|
||||||
|
(void)argv;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user