Module track
source code
Tools to track a download swarm.
|
|
|
string
|
|
string
|
|
string
|
|
string
|
|
boolean
|
|
string
|
|
logging.Logger
|
logger = logging.getLogger('DebTorrent.BT1.track')
the logger to send all log messages to for this module
|
list of (string, unknown,
string)
|
defaults = [('configfile', '', 'the configuration file to use,...
the parameter names, default values, and descriptions
|
string
|
alas = 'your file may exist elsewhere in the universe\nbut ala...
the message to send when the data is not found
|
|
DebTorrent.subnetparse.IP_List
|
local_IPs = <DebTorrent.subnetparse.IP_List instance at 0x2b55...
the list of IP subnets that are considered local
|
Regular Expression
|
http_via_filter = re.compile(r' for ([0-9\.]+)\Z')
the regular expression object to search 'via' header information
for the NAT IP address
|
Imports:
parseargs.parseargs,
parseargs.formatDefinitions,
RawServer.RawServer,
RawServer.autodetect_ipv6,
RawServer.autodetect_socket_style,
HTTPHandler.HTTPHandler,
HTTPHandler.months,
HTTPHandler.weekdays,
parsedir.parsedir,
NatCheck.NatCheck,
NatCheck.CHECK_PEER_ID_ENCRYPTED,
BTcrypto.CRYPTO_OK,
T2T.T2TList,
subnetparse.IP_List,
subnetparse.ipv6_to_ipv4,
subnetparse.to_ipv4,
subnetparse.is_valid_ip,
subnetparse.is_ipv4,
iprangeparse.IP_List,
torrentlistparse.parsetorrentlist,
threading.Event,
threading.Thread,
bencode.bencode,
bencode.bdecode,
bencode.Bencached,
zurllib.urlopen,
zurllib.quote,
zurllib.unquote,
Filter.Filter,
urlparse.urlparse,
os.rename,
os.getpid,
os.path.exists,
os.path.isfile,
cStringIO.StringIO,
time.time,
time.gmtime,
time.strftime,
time.localtime,
clock.clock,
random.shuffle,
random.seed,
random.randrange,
sha.sha,
types.StringType,
types.IntType,
types.LongType,
types.ListType,
types.DictType,
binascii.b2a_hex,
binascii.a2b_hex,
string.lower,
sys,
os,
logging,
signal,
re,
DebTorrent,
__init__.version,
__init__.createPeerID,
ConfigDir.ConfigDir
Check the saved state file for corruption.
- Parameters:
x (dictionary) - the dictionary of information retrieved from the state
file
- Raises:
ValueError - if the state file info is corrupt
|
Create an ISO formatted string of the time.
- Parameters:
secs (float) - number of seconds since the epoch (optional, default is to use
the current time)
- Returns:
string
- the ISO formatted string representation of the time
|
Extract the unNATed IP address from the headers.
- Parameters:
headers (dictionary) - the headers received from the client
- Returns:
string
- the extracted IP address
|
Extract the unNATed IP address from the headers.
- Parameters:
headers (dictionary) - the headers received from the client
- Returns:
string
- the extracted IP address (or None if one could not be
extracted)
|
Create a compact representation of peer contact info.
- Parameters:
ip (string) - the IP address of the peer
port (int) - the port number to contact the peer on
- Returns:
string
- the compact representation (or the empty string if there is no
compact representation)
|
Start the server and tracker.
- Parameters:
params (list) - the command line arguments to the tracker
- Returns:
boolean
- whether the server should be restarted
|
Format a byte size for reading by the user.
- Parameters:
s (long) - the number of bytes
- Returns:
string
- the formatted size with appropriate units
|
defaults
the parameter names, default values, and descriptions
- Type:
list of (string, unknown,
string)
- Value:
[('configfile',
'',
'the configuration file to use, if not specified then a file in /etc
/debtorrent will be used, followed by a file in the .DebTorrent direct
ory in the user\'s home directory'),
('cache_dir',
'',
'the directory to use to get/store cache files, if not specified the
...
|
|
alas
the message to send when the data is not found
- Type:
string
- Value:
'''your file may exist elsewhere in the universe
but alas, not here
'''
|
|