torrentmeta

package
v0.0.0-...-a441d8e Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const Port uint16 = 36010

Variables

This section is empty.

Functions

This section is empty.

Types

type TorrentFile

type TorrentFile struct {
	torrent.TorrentFile
	Bitfield   bitfield.Bitfield
	Downloaded int
	Uploaded   int
	Done       chan struct{}
	Count      chan int
	Out        chan struct{}
	InProgress bool
	IsDone     bool
}

func New

func New(path string, downloadPath string) TorrentFile

func (*TorrentFile) BuildTrackerURL

func (tf *TorrentFile) BuildTrackerURL(peerID [20]byte, port uint16) (string, error)

func (*TorrentFile) CheckFilesIntegrity

func (t *TorrentFile) CheckFilesIntegrity() bool

func (*TorrentFile) CheckIntegrity

func (t *TorrentFile) CheckIntegrity(pw [utils.PieceHashLen]byte, buf []byte) bool

func (*TorrentFile) DownloadToFile

func (tf *TorrentFile) DownloadToFile() error

func (*TorrentFile) Load

func (tf *TorrentFile) Load(path string)

func (*TorrentFile) Save

func (tf *TorrentFile) Save(path string)

Jump to

Keyboard shortcuts

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