"github.com/RoaringBitmap/roaring"
"github.com/anacrolix/missinggo/v2"
- "github.com/anacrolix/torrent/types"
"golang.org/x/time/rate"
"github.com/anacrolix/torrent/metainfo"
pp "github.com/anacrolix/torrent/peer_protocol"
+ "github.com/anacrolix/torrent/types"
+ "github.com/anacrolix/torrent/types/infohash"
)
type (
func connIsIpv6(nc interface {
LocalAddr() net.Addr
-}) bool {
+},
+) bool {
ra := nc.LocalAddr()
rip := addrIpOrNil(ra)
return rip.To4() == nil && rip.To16() != nil
type (
pieceIndex = int
- InfoHash = metainfo.Hash
- IpPort = missinggo.IpPort
+ // Deprecated: Use infohash.T directly to avoid unnecessary imports.
+ InfoHash = infohash.T
+ IpPort = missinggo.IpPort
)
func boolSliceToBitmap(slice []bool) (rb roaring.Bitmap) {