Would it be feasible to support file.createReadStream()?
The torrent.createServer() only works on environments that can bind to a local port and not browser or mobile. So for those there is no way to stream a file.
file.createReadStream() could be supported by creating a proxy stream on the client that would invoke/mirror calls on the server. It could be static support just the necessary events and methods to read the stream or could use Proxy() to support every Stream method.
Would it be feasible to support
file.createReadStream()?The
torrent.createServer()only works on environments that can bind to a local port and not browser or mobile. So for those there is no way to stream a file.file.createReadStream()could be supported by creating a proxy stream on the client that would invoke/mirror calls on the server. It could be static support just the necessary events and methods to read the stream or could useProxy()to support every Stream method.