class QuartzTorrent::TrackerDynamicRequestParams
Dynamic parameters needed when making a request to the tracker.
Attributes
downloaded[RW]
Number of bytes downloaded
left[RW]
Number of bytes left to download before torrent is completed
peerId[RW]
port[RW]
uploaded[RW]
Number of bytes uploaded
Public Class Methods
new(dataLength = nil)
click to toggle source
# File lib/quartz_torrent/trackerclient.rb, line 62 def initialize(dataLength = nil) @uploaded = 0 @downloaded = 0 if dataLength @left = dataLength.to_i else @left = 0 end @port = 6881 @peerId = "-QR0001-" # Azureus style @peerId << Process.pid.to_s @peerId = @peerId + "x" * (20-@peerId.length) end