when I'm implementing a writeable stream in node, the only method I have to implement is "_write". But how do I know that there will be no more data?
The consumer of my stream ends his transmission with mystream.end(data), and he also receives an event "finish" when I'm done with writing. But how do I know about this within my writeable implementation?
you don't. you could also listen to the .on('finish') event.
however, i suggest just using transform streams instead.