You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Broadcasting component on top of a communication overlay. It uses a bounded
growing cache to collect the unique identifier of each message. Therefore, if
the cache size is large enough, the messages are broadcast only once per peer in
the network.
Installation
$ npm install bounded-broadcast-definition
or
$ bower install bounded-broadcast-definition
Usage
The module has been browserified and
uglified. To include it within your
browser, put the following line in your html:
varBoundedBroadcast=require('bounded-broadcast-definition');varRandomPeerSampling=require('random-peer-sampling-example');// #1 initialize the protocolsrps=newRandomPeerSampling(args1);broadcast=newBoundedBroadcast(rps,size);// #2 define the receive event of broadcastbroadcast.on('receive',function(receivedBroadcastMessage){console.log('I received the message: '+receiveBroadcastMessage);});// #3 send a message to the whole networkbroadcast.send(toBroadcastMessage);
About
You know what they put on French fries in Holland instead of ketchup?