Go语言实现的BitTorrent客户端包和工具类:torrent

fn67 10年前

这个项目用Go语言实现了BitTorrent相关的包和命令行工具。

还支持加密协议, DHT, PEX, uTP, 和各种扩展。还提供了几个存储后端, blob, file, mmap。You can use the provided binaries in./cmd, or usetorrentas a library for your own applications.

package torrent

import "github.com/anacrolix/torrent"

Package torrent implements a torrent client.

示例:

c, _ := NewClient()  t, _, c.AddMagnet("magnet:?xt=urn:btih:ZOCMZQIPFFW7OLLMIC5HUB6BPCSDEOQU")  t.DownloadAll()  c.WaitAll()  log.Print("erhmahgerd, torrent downloaded")  c.Close()

项目主页:http://www.open-open.com/lib/view/home/1426930856414