metawire

package module
v0.0.0-...-a690e9f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2017 License: MIT Imports: 10 Imported by: 0

README

metawire

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)

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrExtHeader    = errors.New("metawire: invalid extention header response")
	ErrInvalidPiece = errors.New("metawire: invalid piece response")
	ErrTimeout      = errors.New("metawire: time out")
)

Functions

func Timeout

func Timeout(t time.Duration) option

Types

type Wire

type Wire struct {
	// contains filtered or unexported fields
}

func New

func New(infohash string, from string, options ...option) *Wire

func (*Wire) Fetch

func (w *Wire) Fetch() ([]byte, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL