benc

package
v0.0.0-...-051fae4 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Torrent

type Torrent struct {
	InfoHash     [20]byte // hash of the info field (used as torrent ID)
	Announce     string   // announce URL, for the tracker
	CreationDate int64    `mapstructure:"creation date"`
	CreatedBy    string   `mapstructure:"created by"`
	Comment      string
	// contains filtered or unexported fields
}

Torrent metainfo structure, parsed from .torrent files

func ParseTorrent

func ParseTorrent(fileContents []byte) (*Torrent, error)

Parse metainfo structure from the contents of a standard torrent file

type TrackerResponse

type TrackerResponse struct {
	Peers string // connected peers in a compact model
	// contains filtered or unexported fields
}

func ParseTrackerResponse

func ParseTrackerResponse(responseContents []byte) (*TrackerResponse, error)

Jump to

Keyboard shortcuts

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