Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)
})
wire2.on('handshake', (infoHash, peerId, extensions) => {
wire2.handshake(sintel.parsedTorrent.infoHash, id2)
})