Documentation
¶
Index ¶
Constants ¶
View Source
const InitialConnectionID = 0x41727101980
View Source
const MTU = 1500
MTU yes this is the ipv6 mtu
View Source
const ScrapesPerPacket = 74
max number of scrapes per packet
View Source
const TransactionTimeout = time.Second * 30
TransactionTimeout 30 second timeout for transactions
Variables ¶
View Source
var ErrShortPacket = errors.New("short udp packet")
Functions ¶
This section is empty.
Types ¶
type Bucket ¶
func (*Bucket) ForEachTransaction ¶
func (b *Bucket) ForEachTransaction(v func(uint32, *Transaction))
func (*Bucket) NewTransaction ¶
func (b *Bucket) NewTransaction(swarms []model.Torrent) (t *Transaction)
func (*Bucket) VisitTransaction ¶
func (b *Bucket) VisitTransaction(tid uint32, v func(*Transaction))
type Scraper ¶
type Scraper struct { PacketsPerSecond uint // contains filtered or unexported fields }
bittorrent scraper
func (*Scraper) AddTracker ¶
func (sc *Scraper) AddTracker(conf *config.ScrapeConfig) (err error)
type Transaction ¶
type Transaction struct { TransactionID uint32 ConnectionID uint64 // contains filtered or unexported fields }
Transaction a scrape transaction on a udp tracker
func (*Transaction) Done ¶
func (t *Transaction) Done()
Done marks this transaction as done and removes it from parent
func (*Transaction) GotData ¶
func (t *Transaction) GotData(data []byte) (done bool)
handle data for transaction
func (*Transaction) IsTimedOut ¶
func (t *Transaction) IsTimedOut() bool
Click to show internal directories.
Click to hide internal directories.