Hey everyone,
If I want to stream data from a file, it’s mega easy:
File.stream!("/path/to/file")
|> Stream.map(...)
|> Stream.filter(...)
|> ...consume the processed data here...
|> Stream.run
Is there a way to do the same with a network stream? If there is, I have no idea how to replace File.stream!
with it. I dabbled in :gen_tcp
but it does not seem to be compatible with Elixir’s Stream
module (or IO
for that matter).
What I am looking for is a data-origin-neutral way to stream receive data. In the above example that means I only want to be swapping out the top line and everything else must stay the same. It this possible?
Thank you.