tracker

package
v0.0.0-...-9cd278b Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2016 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var COMPLETED = "completed"
View Source
var NONE = ""
View Source
var STARTED = "started"
View Source
var STOPPED = "stopped"

Functions

This section is empty.

Types

type DialFunc

type DialFunc func(net, addr string) (net.Conn, error)

function that is used to dial out

type Request

type Request struct {
	InfoHash   []byte
	PeerId     []byte
	Downloaded int64
	Left       int64
	Uploaded   int64
	Event      string
	Addr       net.Addr
	NumWant    int32
}

type Response

type Response struct {
	Action      string `bencode:"action"`
	Interval    int32  `bencode:"interval"`
	MinInterval int32  `bencode:"min interval"`
	Leechers    int32  `bencode:"incomplete"`
	Seeders     int32  `bencode:"complete"`
	Peers       []byte `bencode:"peers"`
}

type TorrentStatter

type TorrentStatter interface {
	InfoHash() []byte
	Downloaded() int64
	Uploaded() int64
	Left() int64
	PeerId() []byte
}

type Tracker

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

func NewTracker

func NewTracker(s i2p.StreamSession, address string, stat TorrentStatter, peerChan chan i2p.I2PDestHash) (trk *Tracker, err error)

func (*Tracker) Announce

func (tkr *Tracker) Announce()

func (*Tracker) Start

func (tkr *Tracker) Start()

func (*Tracker) Stop

func (tkr *Tracker) Stop()

Jump to

Keyboard shortcuts

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