code: func (cl *Client) Close() {
  	cl.lock()
  	defer cl.unlock()
  	cl.closed.Set()
  	cl.eachDhtServer(func(s *dht.Server) { s.Close() })
  	cl.closeSockets()
  	for _, t := range cl.torrents {
  		t.close()
  	}
  	for _, f := range cl.onClose {
  		f()
  	}
  	cl.event.Broadcast()
  }
docs: // Stops the client. All connections to peers are closed and all activity will
  // come to a halt.