added makefile for project
added keepalive and exiting for closed sockets