Code Monkey home page Code Monkey logo

Comments (4)

fanpei91 avatar fanpei91 commented on May 27, 2024

请提供下整个报错信息.

from torsniff.

xudongcc avatar xudongcc commented on May 27, 2024
/root/p2pspider/lib/wire.js:0



RangeError: index out of range
    at checkOffset (buffer.js:761:11)
    at Buffer.readUInt32BE (buffer.js:835:5)
    at Wire._onMessageLength (/root/p2pspider/lib/wire.js:43:25)
    at Wire._write (/root/p2pspider/lib/wire.js:231:14)
    at doWrite (_stream_writable.js:301:12)
    at writeOrBuffer (_stream_writable.js:287:5)
    at Writable.write (_stream_writable.js:215:11)
    at Socket.ondata (_stream_readable.js:536:20)
    at emitOne (events.js:90:13)
    at Socket.emit (events.js:182:7)

from torsniff.

xudongcc avatar xudongcc commented on May 27, 2024

使用的代码:

'use strict';

var P2PSpider = require('./lib');

var p2p = P2PSpider({
    nodesMaxSize: 200,   // be careful
    maxConnections: 400, // be careful
    timeout: 5000
});

p2p.ignore(function (infohash, rinfo, callback) {
    // false => always to download the metadata even though the metadata is exists.
    var theInfohashIsExistsInDatabase = false;
    callback(theInfohashIsExistsInDatabase);
});

p2p.on('metadata', function (metadata) {
    // At here, you can extract data and save into database.
    console.log(metadata);
});

p2p.listen(6881, '0.0.0.0');

from torsniff.

xudongcc avatar xudongcc commented on May 27, 2024
RangeError: index out of range
    at checkOffset (buffer.js:761:11)
    at Buffer.readUInt8 (buffer.js:799:5)
    at null.<anonymous> (/root/p2pspider/lib/wire.js:83:30)
    at Wire._write (/root/p2pspider/lib/wire.js:233:14)
    at doWrite (_stream_writable.js:301:12)
    at writeOrBuffer (_stream_writable.js:287:5)
    at Writable.write (_stream_writable.js:215:11)
    at Socket.ondata (_stream_readable.js:536:20)
    at emitOne (events.js:90:13)
    at Socket.emit (events.js:182:7)

还是有些问题。

from torsniff.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.