Socket is closed if server disconnects. Program checks if socket closed. disconnection is handled.
Removed a cout.