Comments (2)
This is the code im running.
//192.168.1.101:9879
var dhtPort = 20001
var serverPort = 9879
var Protocol = require('bittorrent-protocol')
var net = require('net')
net.createServer(function(socket) {
var wire = new Protocol()
// pipe to and from the protocol
socket.pipe(wire).pipe(socket)
wire.on('handshake', function(infoHash, peerId) {
console.log('handshake')
})
wire.on('unchoke', function() {
console.log('peer is no longer choking us: ' + wire.peerChoking)
})
}).listen(serverPort);
The client im using is utorrent 2.2
More error:
bittorrent-protocol [7cfa097b] new wire +0ms
bittorrent-protocol [7cfa097b] Error: wire not speaking BitTorrent protocol (?!??♂??→?↨ ????§????m▬.¶??E;↨?&?♠? "?_♫z??R????DU?]???h???♣►☼?♠??
.?}??$?@?Zv?8???V???_??IJ???§↑?5?u'?-{↑???y??.B????`??♣?e???kF2???l???k?c??k??L[?- A?1>??;6??2?[♂5?
?e??SC?5?∟?☺??n?
B?Fb????) +204ms
bittorrent-protocol [7cfa097b] end +4ms
bittorrent-protocol [7cfa097b] got uninterested +0ms
bittorrent-protocol [7cfa097b] got choke +1ms
bittorrent-protocol [e8e24ae6] new wire +48s
&It?↔F↓??B?|??I?↔?♂?n#U?R)?u?↨?F|? ) +2mse not speaking BitTorrent protocol (?????
bittorrent-protocol [e8e24ae6] end +1ms
bittorrent-protocol [e8e24ae6] got uninterested +0ms
bittorrent-protocol [e8e24ae6] got choke +1ms
``
from bittorrent-protocol.
When you get the 'handshake'
event, you need to immediately respond with a wire.handshake()
back.
wire.on('handshake', function(infoHash, peerId) {
wire.handshake(infoHash, myPeerId)
})
from bittorrent-protocol.
Related Issues (20)
- Notification when wire closes. HOT 1
- Error: Package subpath './index.js' is not defined by "exports"
- How do _parseHandshake, _write, _onmessage and _onmessagelength work? HOT 3
- How the contract works? HOT 2
- please remove
- Action required: Greenkeeper could not be activated 🚨
- An in-range update of readable-stream is breaking the build 🚨 HOT 1
- An in-range update of standard is breaking the build 🚨 HOT 1
- Reset unchoked/interested state on 'end' HOT 2
- An in-range update of tape is breaking the build 🚨 HOT 1
- An in-range update of readable-stream is breaking the build 🚨 HOT 2
- An in-range update of standard is breaking the build 🚨 HOT 1
- npm install fails HOT 5
- TypeError: Cannot read property 'unref' of undefined HOT 3
- Switch from Tape to Jest HOT 1
- Dependency Dashboard
- use `buffer-xor/inplace.js` instead of default `buffer-xor` HOT 2
- Emit the wire's peerId on close HOT 5
- Handshake/extended API issue HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bittorrent-protocol.