Class: Torckapi::Tracker::UDP
Overview
Implementation of www.bittorrent.org/beps/bep_0015.html
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #announce(info_hash, peer_id = SecureRandom.random_bytes(20)) ⇒ Object
- #scrape(info_hashes = []) ⇒ Object
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 |