BitTorrent Extension for Peers to Fetch Metadata Files (BEP 9)
Install
go get github.com/fanpei91/metawire
Uasge
import "github.com/fanpei91/metawire"
API
var (
ErrExtHeader = errors.New("metawire: invalid extention header response")
ErrInvalidPiece = errors.New("metawire: invalid piece response")
ErrTimeout = errors.New("metawire: time out")
)
func Timeout
func Timeout(t time.Duration) option
type Wire
type Wire struct {
}
func New
func New(infohash string, from string, options ...option) *Wire
func (*Wire) Fetch
func (w *Wire) Fetch() ([]byte, error)