#include /* for printf() and fprintf() */ #include /* for socket(), bind(), and connect() */ #include /* for sockaddr_in and inet_ntoa() */ #include /* for atoi() and exit() */ #include /* for memset() */ #include /* for close() */ void DieWithError(char *errorMessage); /* Error handling function */ void HandleTCPClient(int clntSocket); /* TCP client handling function */ int CreateTCPServerSocket(unsigned short port); /* Create TCP server socket */ int AcceptTCPConnection(int servSock); /* Accept TCP connection request */