INNER CODE UNIT · JavaScript

downloadTorrentFile

webtorrent/instant.io · client/index.js:157

function downloadTorrentFile (file) {
  util.unsafeLog('Downloading torrent from <strong>' + escapeHtml(file.name) + '</strong>')
  getClient(function (err, client) {
    if (err) return util.error(err)
    client.add(file, onTorrent)
  })
}

function seed (files) {
  if (files.length === 0) return
  util.log('Seeding ' + files.length + ' files')

  // Seed from WebTorrent
  getClient(function (err, client) {
    if (err) return util.error(err)
    client.seed(files, onTorrent)
  })
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…