How to use the webtorrent-fixtures.sintel.parsedTorrent function in webtorrent-fixtures

To help you get started, we’ve selected a few webtorrent-fixtures examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github webtorrent / ut_metadata / test / fetch.js View on Github external
if (ext === 'handshake') {
      t.pass('got extended handshake')
    } else if (ext === 'ut_metadata') {
      // note: this should get called twice,
      // once for each block of the sintel metadata
      t.pass('got extended ut_metadata message')

      // this is emitted for consistency's sake, but it's ignored
      // by the user since the ut_metadata package handles the
      // complexities internally
    } else {
      t.fail('unexpected handshake type')
    }
  })

  wire1.handshake(sintel.parsedTorrent.infoHash, id1)
})
github webtorrent / ut_metadata / test / fetch.js View on Github external
wire2.on('handshake', (infoHash, peerId, extensions) => {
    wire2.handshake(sintel.parsedTorrent.infoHash, id2)
  })