hyperswarm
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -34,8 +34,7 @@ const { EventEmitter } = require('events') | ||
if (opts.bootstrap) networkOpts.bootstrap = opts.bootstrap | ||
this.dht = new DHT(networkOpts) | ||
this.dht = opts.dht || new DHT(networkOpts) | ||
this.server = this.dht.createServer({ | ||
firewall: this._handleFirewall.bind(this), | ||
onconnection: this._handleServerConnection.bind(this) | ||
}) | ||
firewall: this._handleFirewall.bind(this) | ||
}, this._handleServerConnection.bind(this)) | ||
@@ -42,0 +41,0 @@ this.destroyed = false |
{ | ||
"name": "hyperswarm", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "A distributed networking stack for connecting peers", | ||
"dependencies": { | ||
"@hyperswarm/dht": "next", | ||
"events": "^3.3.0", | ||
"shuffled-priority-queue": "^2.1.0" | ||
@@ -8,0 +9,0 @@ }, |
@@ -7,3 +7,3 @@ # hyperswarm | ||
Note that this is the README for v3 which is tagged under next. To see the v2 documentation/code go to https://github.com/hyperswarm/dht/tree/v2 | ||
Note that this is the README for v3 which is tagged under next. To see the v2 documentation/code go to https://github.com/hyperswarm/hyperswarm/tree/v2 | ||
@@ -50,4 +50,5 @@ As v3 fully matures over the next month it will be shifted to npm latest. | ||
* `seed`: A unique, 32-byte, random seed that can be used to deterministically generate the key pair. | ||
* `maxPeers`: The maximum number of peer connections to allow | ||
* `maxPeers`: The maximum number of peer connections to allow. | ||
* `firewall`: A sync function of the form `remotePublicKey => (true|false)`. If true, the connection will be rejected. Defaults to allowing all connections. | ||
* `dht`: A DHT instance. Defaults to a new instance. | ||
@@ -54,0 +55,0 @@ #### `swarm.connections` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
57083
159
3
1420
+ Addedevents@^3.3.0
+ Addedevents@3.3.0(transitive)