bittorrent

package
v0.6.1-0...-0e7be8e Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const MAX_METADATA_SIZE = 10 * 1024 * 1024

Variables

This section is empty.

Functions

This section is empty.

Types

type Metadata

type Metadata struct {
	InfoHash []byte
	// Name should be thought of "Title" of the torrent. For single-file torrents, it is the name
	// of the file, and for multi-file torrents, it is the name of the root directory.
	Name         string
	TotalSize    uint64
	DiscoveredOn int64
	// Files must be populated for both single-file and multi-file torrents!
	Files []persistence.File
}

type MetadataSink

type MetadataSink struct {
	// contains filtered or unexported fields
}

func NewMetadataSink

func NewMetadataSink(deadline time.Duration) *MetadataSink

func (*MetadataSink) Drain

func (ms *MetadataSink) Drain() <-chan Metadata

func (*MetadataSink) Sink

func (ms *MetadataSink) Sink(res mainline.TrawlingResult)

func (*MetadataSink) Terminate

func (ms *MetadataSink) Terminate()

type Peer

type Peer struct {
	Addr *net.TCPAddr
}

Jump to

Keyboard shortcuts

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