announce

package
v0.0.0-...-5088691 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventNone      = 0
	EventCompleted = 1
	EventStarted   = 2
	EventStopped   = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Announce

type Announce struct {
	WarningMessage string

	Interval    uint32
	MinInterval uint32

	NextAnnounce    time.Time
	NextMinAnnounce time.Time

	TrackerID string

	Complete   uint32
	Incomplete uint32

	Peers []Peer
}

func Decode

func Decode(data []byte) (*Announce, error)

type Announcer

type Announcer interface {
	Announce(state *state.State) (*Announce, error)
	AnnounceEvent(state *state.State, event uint32) (*Announce, error)
	Connect() error
}

type Peer

type Peer struct {
	IP     net.IP
	Port   uint16
	PeerID string
}

Jump to

Keyboard shortcuts

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