2017-04-01 15:01:36 +00:00
|
|
|
#ifndef _LIB_HEADER_H_
|
|
|
|
#define _LIB_HEADER_H_
|
|
|
|
|
|
|
|
|
|
|
|
/* global */
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <pthread.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
/* sys */
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
|
|
|
|
|
|
|
|
/* socket */
|
|
|
|
#include <unistd.h> // close
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#include <netdb.h> // getaddrinfo, getnameinfo
|
|
|
|
#include <arpa/inet.h>
|
|
|
|
|
|
|
|
#include "debug.h"
|
2017-04-06 11:36:51 +00:00
|
|
|
#include "data.h"
|
2017-04-01 15:01:36 +00:00
|
|
|
|
|
|
|
/* vars */
|
|
|
|
#define SRV_HOST "localhost"
|
|
|
|
#define TCP_PORT 4444
|
|
|
|
#define UDP_PORT 4444
|
|
|
|
|
|
|
|
#define MAX_BUF_LEN 512
|
|
|
|
#define MAX_TCP_THR 10
|
|
|
|
#define MAX_UDP_THR 10
|
|
|
|
#define maxHostLen 64
|
|
|
|
#define maxPortLen 6
|
|
|
|
|
|
|
|
#endif
|