39 lines
746 B
C
39 lines
746 B
C
#ifndef _SERVER_H_
|
|
|
|
#define _SERVER_H_
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <arpa/inet.h>
|
|
#include <string.h>
|
|
#include <unistd.h>
|
|
#include <sys/types.h>
|
|
#include <netdb.h>
|
|
#include <sys/socket.h>
|
|
#include <netinet/in.h>
|
|
#include <errno.h>
|
|
#include <pthread.h>
|
|
|
|
|
|
#include "lib.h"
|
|
|
|
// DEFINITIONS
|
|
typedef struct{
|
|
int socket;
|
|
int index;
|
|
} pthread_arg_wrapper;
|
|
|
|
|
|
// VARIABLES
|
|
static pthread_t managers[maxClients]; // containa THREADS
|
|
static int a_managers[maxClients] = {0}; // contains THREADS actifs
|
|
|
|
/************************************************
|
|
**** Signatures ****
|
|
************************************************/
|
|
void* manageClient(void* pthread_args);
|
|
|
|
#endif
|