Final Version 1.0

exit application when socket is closed