Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web (HTTP) Seeding #331

Merged
merged 3 commits into from Jul 3, 2015
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Prev

Use standard JS style

  • Loading branch information
olalonde committed May 28, 2015
commit 9df26f6fcd8e6fb32a81127cfd6bb84192604fa5
@@ -1,5 +1,4 @@
var auto = require('run-auto')
var DHT = require('bittorrent-dht/server')
var fs = require('fs')
var parseTorrent = require('parse-torrent')
var test = require('tape')
@@ -22,8 +21,8 @@ leavesParsed.announce = []
test('Download using webseed (via .torrent file)', function (t) {
t.plan(5)

var serve = serveStatic(path.join(__dirname, './content'));
var httpServer = http.createServer(function(req, res){
var serve = serveStatic(path.join(__dirname, './content'))
var httpServer = http.createServer(function (req, res) {
var done = finalhandler(req, res)
serve(req, res, done)
})
@@ -41,7 +40,7 @@ test('Download using webseed (via .torrent file)', function (t) {
},
client1: ['httpPort', function (cb, r) {

leavesParsed.urlList.push('http://localhost:' + r.httpPort + '/' + leavesFilename);
leavesParsed.urlList.push('http://localhost:' + r.httpPort + '/' + leavesFilename)

var client1 = new WebTorrent({
tracker: false,
@@ -62,7 +61,7 @@ test('Download using webseed (via .torrent file)', function (t) {
t.pass('client1 downloaded torrent from webseed')
cb(null, client1)
})
});
})

client1.add(leavesParsed)

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.