substream
substream copied to clipboard
add event-emitter support across transport
Love substream and primus thanks for the modules!
This is a working attempt of adding event-emitter support to substreams (so that they emit events across the wire)
I am not super knowledgeable w/ substream, so please let me know if there are any side effects. Currently I am ignoring data
and end
events because they are already handled by substream.
I am also, unsure how you would like error
events to be emitted across the wire. I was thinking of using http://npmrepo.com/error-to-json to convert the error to json before sending it over the wire, and then parsing as an error on the receiving end.
Let me know what you think.
Thanks!