stream-set
Maintain a set of open streams
npm install stream-set
Usage
var streamSet =var net =var activeSockets =var server = netserver
API
var set = streamSet()
Create a new set
set.add(stream)
Add a stream to the set. If the stream ends/errors it will be removed from the set
set.remove(stream)
Manually remove a stream from the set
set.has(stream)
Check if a stream is in the set
set.streams
An array of streams in the set
set.size
The current size of the set
set.forEach(fn)
Iterate over all streams in the set
stream = set.get(index)
Get a stream from the set
License
MIT