rendered paste body#include <stdio.h> /* for printf() and fprintf() */
#include <sys/types.h> /* for Socket data types */
#include <sys/socket.h> /* for socket(), connect(), send(), and recv() */
#include <netinet/in.h> /* for IP Socket data types */
#include <arpa/inet.h> /* for sockaddr_in and inet_addr() */
#include <stdlib.h> /* for atoi() */
#include <string.h> /* for memset() */
#include <unistd.h> /* for close() */
#include <signal.h>
/* Variables à définir suivant l'envie */
// Nombre de connexions maximales
#define MAX_CONNECT 5
// Taille du buffer
#define BUFF_SIZE 64
/* *********************************** *
* Fonction d'initialisation de socket *
* argument: numéro de port *
* retour: struct sockaddr_in *
* *********************************** */
struct sockaddr_in socket_init(int port);