readme
This commit is contained in:
parent
b4df62450c
commit
bb029ca16d
|
@ -41,6 +41,10 @@ net.createServer(function (socket) {
|
||||||
To add support for BEP 9, simply modify your code like this:
|
To add support for BEP 9, simply modify your code like this:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
var Protocol = require('bittorrent-protocol')
|
||||||
|
var net = require('net')
|
||||||
|
var ut_metadata = require('ut_metadata')
|
||||||
|
|
||||||
net.createServer(function (socket) {
|
net.createServer(function (socket) {
|
||||||
var wire = new Protocol()
|
var wire = new Protocol()
|
||||||
socket.pipe(wire).pipe(socket)
|
socket.pipe(wire).pipe(socket)
|
||||||
|
@ -74,7 +78,6 @@ net.createServer(function (socket) {
|
||||||
})
|
})
|
||||||
|
|
||||||
}).listen(6881)
|
}).listen(6881)
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## methods
|
## methods
|
||||||
|
|
Loading…
Reference in New Issue