def leech(torrentfilename): client = BittorrentClient() torrent = client.add_torrent(torrentfilename) torrent.strategy = torrentstrategy.connect_and_ask_n_peers(15) loop(client)
def seed(torrentfile, datafile): client = BittorrentClient(6882) torrent = client.add_torrent(torrentfile) torrent.load(datafile) torrent.tracker_update() loop(client)