Class: QuartzTorrent::IncompletePiece

Inherits:
Object
  • Object
show all
Defined in:
lib/quartz_torrent/filemanager.rb

Overview

Represents a piece as it is being downloaded.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#completeBlockBitfieldObject

Which blocks have we downloaded of this piece



18
19
20
# File 'lib/quartz_torrent/filemanager.rb', line 18

def completeBlockBitfield
  @completeBlockBitfield
end

#indexObject

Piece index inside the torrent



24
25
26
# File 'lib/quartz_torrent/filemanager.rb', line 24

def index
  @index
end

#requestsObject

Which blocks have been requested. List of RequestedBlock objects.



21
22
23
# File 'lib/quartz_torrent/filemanager.rb', line 21

def requests
  @requests
end

Instance Method Details

#complete?Boolean

Do we have all pieces?

Returns:

  • (Boolean)


27
28
# File 'lib/quartz_torrent/filemanager.rb', line 27

def complete?
end