hyperswarm
Hyperswarm is an experimental mdns swarm with a shared distributed state.
It relies heavily on multicast-dns and hyperemitter.
Install
npm install --save hyperswarm
Use
var hswarm = require('hyperswarm')
var a = hswarm('superswarm')
var b = hswarm('superswarm')
a.setState({ volume : 5 })
setTimeout(function() {
b.state.get('volume')
},100)
var c = hswarm('superswarm')
setTimeout(function() {
c.state.get('volume')
},100)
a.close()
b.close()
c.close()
Changelog
1.0.1
- Fixed path to proto file when used as module
- Change event passes changeset instead of merged state, one can always get the state
1.0.0
enjoy.