close connection part written, seems to have minor bug that the server continues to keep trying to send stuff even after deleting the connection
fin time out fixed by removing reset clock code from close