code: func (t *Torrent) numTotalPeers() int {
  	peers := make(map[string]struct{})
  	for conn := range t.conns {
  		ra := conn.conn.RemoteAddr()
  		if ra == nil {
  			// It's been closed and doesn't support RemoteAddr.
  			continue
  		}
  		peers[ra.String()] = struct{}{}
  	}
  	for addr := range t.halfOpen {
  		peers[addr] = struct{}{}
  	}
  	t.peers.Each(func(peer Peer) {
  		peers[fmt.Sprintf("%s:%d", peer.IP, peer.Port)] = struct{}{}
  	})
  	return len(peers)
  }
docs: // The total number of peers in the torrent.