p2p

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: 15 Imported by: 0

Documentation

Index

Constants

View Source
const MaxBacklog = 5
View Source
const MaxBlockSize = 16384

Variables

View Source
var LogStrings []string

Functions

func GetLogString

func GetLogString() string

func WriteToLog

func WriteToLog(str string)

Types

type File

type File struct {
	torrent.File
	Handler *os.File
}

type Torrent

type Torrent struct {
	Peers       []peers.Peer
	PeerID      [utils.PeerIDLen]byte
	InfoHash    [utils.InfoHashLen]byte
	PieceHashes [][utils.PieceHashLen]byte
	PieceLength int
	Name        string
	Length      int
	Files       []File
	Bitfield    bitfield.Bitfield
}

func (*Torrent) Download

func (t *Torrent) Download(done chan struct{}, count chan int)

Jump to

Keyboard shortcuts

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