/**
* Name
: Edison Chindrawaly
*
Class : CSCI 4330 Fall 2001
* File
: udpwhois.cpp
* Hw : #3
*/
#include <iostream.h>
#include
<fstream.h>
#include <fcntl.h>
#include
<ctype.h>
#include <time.h>
#include
<stdio.h>
#include <stdlib.h>
#include
<signal.h>
#include <string.h>
#include
<sys/socket.h>
#include <sys/types.h>
#include
<sys/time.h>
#include <sys/errno.h>
#include
<sys/un.h>
#include <sys/wait.h>
#include
<arpa/inet.h>
#include <netdb.h>
#include
<unistd.h>
#include <netinet/in.h>
#define STDIN
0
#define STDOUT 1
#define ERROR -1
#define READ 0
#define
WRITE 1
#define MAXSIZE 30
//#define MAXSIZE 65536
#define
BACKLOG 5
#define MAXCONNECTION 5
//for error handling
flags:
#define socket_flag 0
#define bind_flag 1
#define
listen_flag 2
#define accept_flag 3
#define send_flag 4
#define
receive_flag 5
#define pipe_flag 6
#define write_flag 7
#define
read_flag 8
#define select_flag 9
typedef struct MESSAGE
{
int command;
char msg[MAXSIZE];
};
void
verify(int,int,int);
void closeConnection(int);