29 lines
840 B
C
29 lines
840 B
C
#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
|