-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.h
53 lines (43 loc) · 1.07 KB
/
common.h
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// common.h
#ifndef COMMON_H
#define COMMON_H
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>
#include <termios.h>
#include <pthread.h>
#include <semaphore.h>
#include <fcntl.h>
#include <signal.h>
#include <time.h>
#include <math.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/mman.h>
#include <sys/ipc.h>
#include <sys/sem.h> // obsoleta
#include <sys/socket.h>
#include <sys/shm.h>
#include <sys/msg.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <netdb.h>
#define BUFFER_SIZE 10
#define MAX_LEN 32
#define NUM_NOMI 100
#define SERVER_PORT 8080
#define SERVER_IP "127.0.0.1"
#define MAX_CONNECTIONS 5
#define ROSSO "\x1b[31m"
#define VERDE "\x1b[32m"
#define GIALLO "\x1b[33m"
#define BLU "\x1b[34m"
#define ARANCIONE "\x1b[38;5;208m" // ANSI escape code for orange
#define AZZURRO "\x1b[38;5;45m" // ANSI escape code for light blue
#define RESET "\x1b[0m"
#endif