When one stream need to talk to many
Want to see pretty graphs? Log in now!
npm install radio_static
|12||downloads in the last month|
|Last Published By|
|Version||0.0.3 last updated 7 months ago|
Creating a new instance
var RadioStatic = require('radio_static'); var radio = new RadioStatic();
Adding a new stream to the collective
var stream = new Stream(); radio.assimilate(stream);
Any data read from this stream will be written to all of the other assimilated streams (not itself). Also that data will be emitted as a 'data' event from radio.
Sending data to all assimilated streams
Any stream emitting an 'end' event will be remove from the collective.
calling the end method on radio will end all streams in the collective.