Creato server-client daytime e print_ip_client
This commit is contained in:
28
basic.h
Normal file
28
basic.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#ifndef __BASIC__
|
||||
#define __BASIC__
|
||||
|
||||
#include <sys/types.h> /* basic system data types */
|
||||
#include <sys/socket.h> /* basic socket definitions */
|
||||
#include <sys/time.h> /* timeval{} for select() */
|
||||
#include <time.h> /* timespec{} for pselect() */
|
||||
#include <netinet/in.h> /* sockaddr_in{} and other Internet defns */
|
||||
#include <arpa/inet.h> /* inet(3) functions */
|
||||
#include <errno.h>
|
||||
#include <fcntl.h> /* for nonblocking */
|
||||
#include <netdb.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h> /* for S_xxx file mode constants */
|
||||
#include <sys/uio.h> /* for iovec{} and readv/writev */
|
||||
#include <unistd.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/un.h> /* for Unix domain sockets */
|
||||
|
||||
#define MAXLINE 256
|
||||
#define PORT 12345
|
||||
#define BACKLOG 5
|
||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user