Package Anomos :: Module Torrent :: Class Torrent
[hide private]
[frames] | no frames]

Class Torrent

source code

object --+
         |
        Torrent

Instance Methods [hide private]
 
__init__(self, infohash=None, make_upload=None, downloader=None, numpieces=None, context=None)
Create a new Torrent object
source code
 
add_active_stream(self, endpoint) source code
 
rm_active_stream(self, endpoint) source code
 
close_all_streams(self) source code
 
handle_exception(self, e) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, infohash=None, make_upload=None, downloader=None, numpieces=None, context=None)
(Constructor)

source code 

Create a new Torrent object

Parameters:
  • infohash (string) - The torrent's infohash
  • make_upload (function) - a function for performing uploads
  • downloader (downloader) - A downloader object, for downloading
  • numpieces (int) - the number of pieces
Overrides: object.__init__