Documentation ¶
Index ¶
- Constants
- type TorrentFile
- func (tf *TorrentFile) BuildTrackerURL(peerID [20]byte, port uint16) (string, error)
- func (t *TorrentFile) CheckFilesIntegrity() bool
- func (t *TorrentFile) CheckIntegrity(pw [utils.PieceHashLen]byte, buf []byte) bool
- func (tf *TorrentFile) DownloadToFile() error
- func (tf *TorrentFile) Load(path string)
- func (tf *TorrentFile) Save(path string)
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)
Click to show internal directories.
Click to hide internal directories.