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

Class Tracker

source code

object --+
         |
        Tracker

Instance Methods [hide private]
 
__init__(self, config, certificate, event_handler)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
allow_local_override(self, ip, given_ip) source code
 
get_file(self, infohash) source code
 
check_allowed(self, infohash, paramslist) source code
 
update_simpeer(self, paramslist, ip, peercert) source code
list
neighborlist(self, peerid)
Returns: {'ip': string, 'port': int, 'nid': chr} for each neighbor
source code
 
getTCs(self, peerid, infohash, count=3)
Gets a set of tracking codes from the specified peer to 'count' random peers with 'infohash'.
source code
 
validate_request(self, paramslist)
NOTE: MUST be called on input before it is passed to other methods.
source code
 
get(self, handler, path, headers) source code
 
handle_browser_connections(self, path) source code
 
connectback_result(self, peerid, result) source code
 
parse_allowed(self) source code
 
parse_blocked(self) source code
 
delete_peer(self, infohash, peerid) source code
 
expire_downloaders(self) 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, config, certificate, event_handler)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

update_simpeer(self, paramslist, ip, peercert)

source code 
Parameters:
  • paramslist (list) - Parameters from client's GET request
  • ip (string) - Client's IP address
  • peercert (M2Crypto.X509.X509)

neighborlist(self, peerid)

source code 
Parameters:
  • peerid - The peer to get the neighbors of
Returns: list
{'ip': string, 'port': int, 'nid': chr} for each neighbor

getTCs(self, peerid, infohash, count=3)

source code 

Gets a set of tracking codes from the specified peer to 'count' random peers with 'infohash'.

Parameters:
  • peerid (str) - PeerID of requesting peer
  • infohash (str) - Infohash of requested file
  • count (int) - Number of peers requested
  • is_seed (bool) - Whether or not this peer is a seeder.

validate_request(self, paramslist)

source code 

NOTE: MUST be called on input before it is passed to
      other methods.
@param paramslist: get request from client which has
                   been passed through cgi.parse_qs