Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TorrentFile ¶
type TorrentFile struct {
Announce string
InfoHash [20]byte
PieceHashes [][20]byte
PieceLength int
Length int
Name string
}
TorrentFile struct of the torrent file
func Open ¶
func Open(path string) (TorrentFile, error)
Open is used to open the file,unmarshall the contents of the file and convert it to the form of a torrentFile
func (*TorrentFile) DownloadFile ¶
func (t *TorrentFile) DownloadFile(path string) error
DownloadFile is used generate a random id for us to be identified with and get a list of all the peer swith their ips and ports
Click to show internal directories.
Click to hide internal directories.