close_socket implemented