Class: Torckapi::Tracker::UDP

Inherits:
Base
  • Object
show all
Defined in:
lib/torckapi/tracker/udp.rb

Overview

Instance Attribute Summary

Attributes inherited from Base

#url

Instance Method Summary collapse

Instance Method Details

#announce(info_hash, peer_id = SecureRandom.random_bytes(20)) ⇒ Object



10
11
12
13
# File 'lib/torckapi/tracker/udp.rb', line 10

def announce info_hash, peer_id=SecureRandom.random_bytes(20)
  super
  perform_request Announce, announce_request_data(info_hash, peer_id), info_hash
end

#scrape(info_hashes = []) ⇒ Object



15
16
17
18
# File 'lib/torckapi/tracker/udp.rb', line 15

def scrape info_hashes=[]
  super
  perform_request Scrape, scrape_request_data(info_hashes), info_hashes
end