bias_torrent

package
v0.0.0-...-1364d92 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type CacheTracker

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

The CacheTracker is component which allows usage of bias neighbour election together with the CacheTorrent protocol.

func (*CacheTracker) Neighbours

func (t *CacheTracker) Neighbours(id string) interface{}

func (*CacheTracker) New

func (t *CacheTracker) New(util TorrentNodeUtil) TorrentNode

func (*CacheTracker) OnJoin

func (t *CacheTracker) OnJoin()

func (*CacheTracker) Recv

func (t *CacheTracker) Recv(m interface{})

type Tracker

type Tracker struct {
	*torrent.Tracker
	// contains filtered or unexported fields
}

The Tracker implements the biased selection protocol. Instead of providing unbiased selection, when asked for a node's neighbours the Tracker returns KPercent% external(different ISP) neighbours and (100 - KPercent)% internal neighbours.

func (*Tracker) Neighbours

func (t *Tracker) Neighbours(id string) interface{}

func (*Tracker) New

func (t *Tracker) New(util TorrentNodeUtil) TorrentNode

func (*Tracker) OnJoin

func (t *Tracker) OnJoin()

func (*Tracker) Recv

func (t *Tracker) Recv(m interface{})

Jump to

Keyboard shortcuts

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