Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InfoDownloader ¶
InfoDownloader downloads all blocks of a piece from a peer.
func (*InfoDownloader) Done ¶
func (d *InfoDownloader) Done() bool
Done returns true if all pieces of the metadata is downloaded.
func (*InfoDownloader) GotBlock ¶
func (d *InfoDownloader) GotBlock(index uint32, data []byte) error
GotBlock must be called when a metadata block is received from the peer.
func (*InfoDownloader) RequestBlocks ¶
func (d *InfoDownloader) RequestBlocks(queueLength int)
RequestBlocks is called to request remaining blocks of metadata from the peer.
Click to show internal directories.
Click to hide internal directories.