added reset_socket() func